PythonQt
|
implements importing of python files into PythonQt More...
#include <PythonQtImporter.h>
Classes | |
struct | ModuleInfo |
Public Types | |
enum | ModuleType { MI_NOT_FOUND , MI_MODULE , MI_PACKAGE , MI_SHAREDLIBRARY } |
implements importing of python files into PythonQt
also compiles/marshalls/unmarshalls py/pyc files and handles time stamps correctly
Definition at line 67 of file PythonQtImporter.h.
Enumerator | |
---|---|
MI_NOT_FOUND | |
MI_MODULE | |
MI_PACKAGE | |
MI_SHAREDLIBRARY |
Definition at line 71 of file PythonQtImporter.h.
|
static |
Given a string buffer containing Python source code, compile it return and return a code object as a new reference.
|
static |
Returns the filename of the cache file for the given source file, e.g. test.pyc for test.py.
|
static |
Return the code object for the module named by 'fullname' from the Zip archive as a new reference.
gets the compiled code for the given *.py file if there is a valid pyc file, otherwise compiles the file and writes the pyc
Given a buffer, return the long that is represented by the first 4 bytes, encoded as little endian. This partially reimplements marshal.c:r_long()
|
static |
Get the code object associated with the module specified by 'fullname'. In Python3, modpath will always be the path to the *.py file and cachemodpath the path to the *.pyc file (if it exists).
|
static |
Return if module exists and is a package or a module.
get time stamp of file
Returns the filename of the source file for the given cache file, e.g. test.py for test.pyc.
get the last name of a dot chain (first.second.last)
replace extension of file
|
static |
Given the contents of a .py[co] file in a buffer, unmarshal the data and return the code object. Return None if it the magic word doesn't match (we do this instead of raising an exception as we fall back to .py if available and we don't want to mask other errors). Returns a new reference.
|
static |
writes the python code to disk, marshalling and writing the time stamp