Home | Trees | Indices | Help |
|
---|
|
object --+ | utils.graph.DetailNode --+ | any_type.AnyType --+ | simple_type.SimpleType --+ | object --+ | | | utils.graph.DetailNode --+ | | | any_type.AnyType --+ | | | BinaryType --+ | BinarySimpleType --+ | object --+ | | | editable.EditableBase --+ | | | editable.EditableLineEdit --+ | ZString
String of variable length (null terminated).
>>> from tempfile import TemporaryFile >>> f = TemporaryFile() >>> s = ZString() >>> if f.write('abcdefghijklmnopqrst\x00'.encode("ascii")): pass # b'abc...' >>> if f.seek(0): pass # ignore result for py3k >>> s.read(f) >>> str(s) 'abcdefghijklmnopqrst' >>> if f.seek(0): pass # ignore result for py3k >>> s.value = 'Hi There!' >>> s.write(f) >>> if f.seek(0): pass # ignore result for py3k >>> m = ZString() >>> m.read(f) >>> str(m) 'Hi There!'
|
|||
Inherited from |
|
|||
|
|||
str |
|
||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
_maxlen = 1000 The maximum length. |
|||
Inherited from |
|
|||
value A property which wraps the actual data. |
|||
Inherited from |
|
|
|
|
|
|
|
|
valueA property which wraps the actual data. This property always calls set_value to assign the value, and ensures that the value is valid (type, range, ...). Unless you know what you are doing, always use the value property to change the data.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Oct 10 19:03:56 2011 | http://epydoc.sourceforge.net |