Trees | Indices | Help |
|
---|
|
object --+ | dict --+ | point.KeyedPoints --+ | Xearths
Since: 0.5.1
|
|||
new empty dictionary |
|
||
str
|
|
||
dict
|
|
||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|
Xearth objects rendered for use with Xearth/Xplanet >>> markers = Xearths(open("xearth")) >>> print(markers) 52.015000 -0.221000 "Home" 52.633300 -2.500000 "Telford"
|
Parse Xearth data files import_locations() returns a dictionary with keys containing the xearth name, and values consisting of a Xearth object and a string containing any comment found in the marker file. It expects Xearth marker files in the following format: # Comment 52.015 -0.221 "Home" # James Rowe's home 52.6333 -2.5 "Telford" Any empty line or line starting with a '#' is ignored. All data lines
are whitespace-normalised, so actual layout should have no effect. The
above file processed by import_locations() will return the
following {'Home': point.Point(52.015, -0.221, "James Rowe's home"), 'Telford': point.Point(52.6333, -2.5, None)} >>> markers = Xearths(open("xearth")) >>> for key, value in sorted(markers.items()): ... print("%s - %s" % (key, value)) Home - James Rowe's home (N52.015°; W000.221°) Telford - N52.633°; W002.500°
Note: This function also handles the extended xplanet marker files whose points can optionally contain added xplanet specific keywords for defining colours and fonts. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue May 20 12:41:52 2008 | http://epydoc.sourceforge.net |