However, the include directive syntax is controlled by a regular
expression, so it can be configured.
See the
|
|
__init__(self,
source,
includeRegex='^%include\s"([^"]+)"',
maxNestLevel=100,
outputFile=None)
Create a new Includer object. |
|
|
|
|
name(self)
Get the name of the file being processed. |
|
|
|
|
|
|
string
|
next(self)
A file object is its own iterator. |
|
|
|
|
close(self)
Close the includer, preventing any further I/O operations. |
|
|
|
int
|
fileno(self)
Get the file descriptor. |
|
|
|
|
isatty(self)
Determine whether the file being processed is a TTY or not. |
|
|
|
|
seek(self,
pos,
mode=0)
Seek to the specified file offset in the include-processed
file. |
|
|
|
int
|
tell(self)
Get the current file offset. |
|
|
|
|
read(self,
n=-1)
Read n bytes from the open file. |
|
|
|
|
readline(self,
length=-1)
Read the next line from the file. |
|
|
|
array
|
readlines(self,
sizehint=0)
Read all remaining lines in the file. |
|
|
|
|
truncate(self,
size=None)
Not supported, since Includer objects are
read-only. |
|
|
|
|
write(self,
s)
Not supported, since Includer objects are
read-only. |
|
|
|
|
writelines(self,
iterable)
Not supported, since Includer objects are
read-only. |
|
|
|
|
|
|
string
|
getvalue(self)
Retrieve the entire contents of the file, which includes expanded,
at any time before the close() method is called. |
|
|
|
|
| _processIncludes(self,
fileIn,
filename,
isURL,
fileOut) |
|
|
|
|
| _open(self,
nameToOpen,
enclosingFile,
enclosingFileIsURL) |
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|