|
Panda3D
|
Classes | |
| class | StreamIOWrapper |
Functions | |
| execfile (path, globals=None, locals=None) | |
| exists (path) | |
| getmtime (path) | |
| getsize (path) | |
| isdir (path) | |
| isfile (path) | |
| lexists (path) | |
| listdir (path) | |
| open (file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True) | |
| walk (top, topdown=True, onerror=None, followlinks=True) | |
Variables | |
| _vfs = core.VirtualFileSystem.getGlobalPtr() | |
| file = open | |
| FileExistsError = IOError | |
| FileNotFoundError = IOError | |
| IsADirectoryError = IOError | |
| PermissionError = IOError | |
| strType = str | |
| unicodeType = unicode | |
This module reimplements Python's file I/O mechanisms using Panda constructs. This enables Python to interface more easily with Panda's virtual file system, and it also better-supports Panda's SIMPLE_THREADS model, by avoiding blocking all threads while waiting for I/O to complete.
| execfile | ( | path, | |
| globals = None, | |||
| locals = None ) |
| exists | ( | path | ) |
| getmtime | ( | path | ) |
| getsize | ( | path | ) |
| isdir | ( | path | ) |
| isfile | ( | path | ) |
| lexists | ( | path | ) |
| listdir | ( | path | ) |
Implements os.listdir over vfs.
| open | ( | file, | |
| mode = 'r', | |||
| buffering = -1, | |||
| encoding = None, | |||
| errors = None, | |||
| newline = None, | |||
| closefd = True ) |
This function emulates the built-in Python open() function, additionally providing support for Panda's virtual file system. It takes the same arguments as Python's built-in open() function.
| walk | ( | top, | |
| topdown = True, | |||
| onerror = None, | |||
| followlinks = True ) |
Implements os.walk over vfs. Note: we don't support onerror or followlinks; errors are ignored and links are always followed.
|
protected |
| file = open |
| FileExistsError = IOError |
| FileNotFoundError = IOError |
| IsADirectoryError = IOError |
| PermissionError = IOError |
| tuple strType = str |
| unicodeType = unicode |