#!/usr/bin/env python
# -*- coding:utf-8 -*-
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import QApplication

app = QApplication([])
clipboard = app.clipboard()
def on_clipboard_change():
    data = clipboard.mimeData()
    if data.hasFormat('text/uri-list'):
        for path in data.urls():
            print(path)
    if data.hasText():
        print(data.text())

clipboard.dataChanged.connect(on_clipboard_change)
app.exec_()
5ee65c0bacc76a7358aa4febf0c98573cc0ebcef
<mask token>


def on_clipboard_change():
    data = clipboard.mimeData()
    if data.hasFormat('text/uri-list'):
        for path in data.urls():
            print(path)
    if data.hasText():
        print(data.text())


<mask token>

<mask token>


def on_clipboard_change():
    data = clipboard.mimeData()
    if data.hasFormat('text/uri-list'):
        for path in data.urls():
            print(path)
    if data.hasText():
        print(data.text())


clipboard.dataChanged.connect(on_clipboard_change)
app.exec_()

<mask token>
app = QApplication([])
clipboard = app.clipboard()


def on_clipboard_change():
    data = clipboard.mimeData()
    if data.hasFormat('text/uri-list'):
        for path in data.urls():
            print(path)
    if data.hasText():
        print(data.text())


clipboard.dataChanged.connect(on_clipboard_change)
app.exec_()

from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import QApplication
app = QApplication([])
clipboard = app.clipboard()


def on_clipboard_change():
    data = clipboard.mimeData()
    if data.hasFormat('text/uri-list'):
        for path in data.urls():
            print(path)
    if data.hasText():
        print(data.text())


clipboard.dataChanged.connect(on_clipboard_change)
app.exec_()

#!/usr/bin/env python
# -*- coding:utf-8 -*-
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import QApplication

app = QApplication([])
clipboard = app.clipboard()
def on_clipboard_change():
    data = clipboard.mimeData()
    if data.hasFormat('text/uri-list'):
        for path in data.urls():
            print(path)
    if data.hasText():
        print(data.text())

clipboard.dataChanged.connect(on_clipboard_change)
app.exec_()