Home | Trees | Indices | Help |
|
---|
|
object --+ | FileFormat
|
|||
Data Base class for representing data in a particular format. |
|
|||
Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
|
|
|||
Inherited from |
|
Converts version string into an integer. This default implementation simply returns zero at all times, and works for formats that are not versioned. Override for versioned formats.
|
Intelligently split a name into parts:
>>> FileFormat.name_parts("hello_world") ['hello', 'world'] >>> FileFormat.name_parts("HELLO_WORLD") ['HELLO', 'WORLD'] >>> FileFormat.name_parts("HelloWorld") ['Hello', 'World'] >>> FileFormat.name_parts("helloWorld") ['hello', 'World'] >>> FileFormat.name_parts("xs:NMTOKEN") ['xs', 'NMTOKEN'] >>> FileFormat.name_parts("xs:NCName") ['xs', 'N', 'C', 'Name'] >>> FileFormat.name_parts('this IS a sillyNAME') ['this', 'IS', 'a', 'silly', 'N', 'A', 'M', 'E'] >>> FileFormat.name_parts('tHis is A Silly naME') ['t', 'His', 'is', 'A', 'Silly', 'na', 'M', 'E'] |
Converts an attribute name, as in the description file, into a name usable by python. >>> FileFormat.name_attribute('tHis is A Silly naME') 't_his_is_a_silly_na_m_e' >>> FileFormat.name_attribute('Test:Something') 'test_something' >>> FileFormat.name_attribute('unknown?') 'unknown'
|
Converts a class name, as in the xsd file, into a name usable by python. >>> FileFormat.name_class('this IS a sillyNAME') 'ThisIsASillyNAME'
|
A generator which yields the data of all files in directory top whose filename matches the regular expression RE_FILENAME. The argument top can also be a file instead of a directory. Errors coming from os.walk are ignored. Note that the caller is not responsible for closing the stream. This function is for instance used by pyffi.spells to implement modifying a file after reading and parsing.
|
A generator which yields all files in directory top whose filename matches the regular expression RE_FILENAME. The argument top can also be a file instead of a directory. Errors coming from os.walk are ignored. Note that the caller is not responsible for closing the stream. This function is for instance used by pyffi.spells to implement modifying a file after reading and parsing.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Oct 10 19:03:56 2011 | http://epydoc.sourceforge.net |