However, the include directive syntax is controlled by a regular
expression, so it can be configured.
See the module documentation for details.
|
|
__init__(self,
source,
include_regex='^%include\\s"([^"]+)"',
max_nest_level=100,
output=None)
Create a new Includer object. |
source code
|
|
|
|
|
|
string
|
|
|
|
close(self)
Close the includer, preventing any further I/O operations. |
source code
|
|
|
int
|
|
|
|
|
|
|
seek(self,
pos,
mode=0)
Seek to the specified file offset in the include-processed file. |
source code
|
|
|
int
|
|
|
|
|
|
str
|
|
|
array
|
|
|
|
truncate(self,
size=None)
Not supported, since Includer objects are read-only. |
source code
|
|
|
|
write(self,
s)
Not supported, since Includer objects are read-only. |
source code
|
|
|
|
writelines(self,
iterable)
Not supported, since Includer objects are read-only. |
source code
|
|
|
|
|
|
string
|
getvalue(self)
Retrieve the entire contents of the file, which includes expanded,
at any time before the close() method is called. |
source code
|
|
|
|
| __process_includes(self,
file_in,
filename,
is_url,
file_out) |
source code
|
|
|
|
| __open(self,
name_to_open,
enclosing_file,
enclosing_file_is_url) |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|