yex.parse.FileSource
yex.parse.FileSource(f, name=None)
#
Bases: yex.parse.source.Source
A source based on a text file on disk, such as a TeΧ source file.
Spaces (ASCII 32) at the end of each line are dropped. All linefeeds (ASCII 10) and carriage returns (ASCII 13) at the end of each line are replaced by a single carriage return. The final line will always end with a carriage return.
Attributes:
| Name | Type | Description |
|---|---|---|
f |
yex.parse.parser.TextIO
|
a filehandle to read from. You should probably put the filename, if you have it, in the "name" parameter to aid debugging and status messages. |
Source code in yex/parse/source.py
244 245 246 247 248 249 250 251 252 | |