Как я могу отправить между сокетами kivy.properties.ObjectProperty? - PullRequest
0 голосов
/ 13 апреля 2020

Мне нужно отправить через сокеты этот объект и я не могу найти способ сделать это (pickle здесь не работает, также не может преобразовать этот объект в байты)

ObjectProperty(FileSystemLocal(), baseclass=FileSystemAbstract)

Это FileSystemLocal:

class FileSystemLocal(FileSystemAbstract):
'''Implementation of :class:`FileSystemAbstract` for local files.

.. versionadded:: 1.8.0
'''

def listdir(self, fn):
    return listdir(fn)

def getsize(self, fn):
    return getsize(fn)

def is_hidden(self, fn):
    if platform == 'win':
        if not _have_win32file:
            return False
        try:
            return GetFileAttributesExW(fn)[0] & FILE_ATTRIBUTE_HIDDEN
        except error:
            # This error can occurred when a file is already accessed by
            # someone else. So don't return to True, because we have lot
            # of chances to not being able to do anything with it.
            Logger.exception('unable to access to <%s>' % fn)
            return True

    return basename(fn).startswith('.')

def is_dir(self, fn):
    return isdir(fn)
...