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 --+ | SizedString
Basic type for strings. The type starts with an unsigned int which describes the length of the string.
>>> from tempfile import TemporaryFile >>> f = TemporaryFile() >>> s = SizedString() >>> if f.write('\x07\x00\x00\x00abcdefg'.encode("ascii")): pass # ignore result for py3k >>> if f.seek(0): pass # ignore result for py3k >>> s.read(f) >>> str(s) 'abcdefg' >>> if f.seek(0): pass # ignore result for py3k >>> s.set_value('Hi There') >>> s.write(f) >>> if f.seek(0): pass # ignore result for py3k >>> m = SizedString() >>> m.read(f) >>> str(m) 'Hi There'
|
|||
Inherited from |
|
|||
|
|||
Whatever is appropriate. |
|
||
|
|||
str |
|
||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
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 |