direct.stdpy.file
from direct.stdpy.file import StreamIOWrapper, execfile, exists, getmtime, getsize, isdir, isfile, lexists, listdir, open, walk
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.
Inheritance diagram
- class StreamIOWrapper(stream, needsVfsClose=False)[source]
Bases:
IOBase
This is a file-like object that wraps around a C++ istream and/or ostream object. It only deals with binary data; to work with text I/O, create an io.TextIOWrapper object around this, or use the open() function that is also provided with this module.