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 Acron constructs. This enables Python to interface more easily with Acron’s virtual file system, and it also better-supports Acron’s SIMPLE_THREADS model, by avoiding blocking all threads while waiting for I/O to complete.
Inheritance diagram
digraph inheritance7c3cec360d { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "IOBase" [URL="https://docs.python.org/3/library/io.html#io.IOBase",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="The abstract base class for all I/O classes."]; "StreamIOWrapper" [URL="direct.stdpy.file.html#direct.stdpy.file.StreamIOWrapper",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="This is a file-like object that wraps around a C++ istream and/or"]; "IOBase" -> "StreamIOWrapper" [arrowsize=0.75,style=""]; }- class StreamIOWrapper(stream, needsVfsClose=False)[source]¶
Bases:
IOBaseThis 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.