Package libxyz :: Package core :: Module userdata :: Class UserData |
[hide private]
[frames] | no frames]

# Class UserData

source code

    object --+
             |
            UserData

Common interface for access data-files in user directory

Instance Methods | [hide private]
__init__(self) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
openfile(self, filename, mode, subdir=None) Open data file and return open file-object For instance: > openfile("keycodes", "rb", "data") Will open file ~/.xyzcmd/data/keycodes for binary reading etc. | source code
delfile(self, filename, subdir=None) Delete file in user-directory | source code
makepath(self, filename, subdir=None) Make absolute path to file | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### openfile(self, filename, mode, subdir=None) | source code
Open data file and return open file-object For instance: > openfile("keycodes", "rb", "data") Will open file ~/.xyzcmd/data/keycodes for binary reading etc. Parameters: `filename` - File name `mode` - Open mode `subdir` - Optional subdirectory @return open file-object or XYZRuntimeError raised on error