GXRA class¶
- class GXRA(handle=0)[source]¶
GXRA class.
The
GXRA
class is used to access ASCII files sequentially or by line number. The files are opened in read-only mode, so no write operations are defined- classmethod create(file)[source]¶
Creates
GXRA
New in version 5.0.
License: Geosoft Open License
- classmethod create_sbf(sbf, file)[source]¶
-
New in version 5.0.
License: Geosoft Open License
Note: This method allows you to open an
GXRA
in a structured file storage (anGXSBF
). SBFs can be created inside other data containers, such as workspaces, maps, images and databases. This lets you store application specific information together with the data to which it applies.See also
sbf.gxh
- gets(strbuff)[source]¶
Get next full line from
GXRA
- Parameters:
strbuff (str_ref) – Buffer in which to place string
- Returns:
0 - Ok 1 - End of file
- Return type:
int
New in version 5.0.
License: Geosoft Open License
- is_null()[source]¶
Check if this is a null (undefined) instance
- Returns:
True if this is a null (undefined) instance, False otherwise.
- Return type:
bool
- len()[source]¶
Returns the total number of lines in
GXRA
- Returns:
# of lines in the
GXRA
.- Return type:
int
New in version 5.0.
License: Geosoft Open License
- line()[source]¶
Returns current line #, 0 is the first
- Returns:
The current read line location.
- Return type:
int
New in version 5.0.
License: Geosoft Open License
Note: This will be the next line read.
- seek(line)[source]¶
Position next read to specified line #
- Parameters:
line (int) – Line #, 0 is the first.
- Returns:
0 if seeked line is within the range of lines, 1 if outside range, line pointer will not be moved.
- Return type:
int
New in version 5.0.
License: Geosoft Open License