Module Spyder :: Class Data
[hide private]
[frames] | no frames]

Class Data

source code

object --+
         |
        Data

Instance Methods [hide private]
 
__init__(self, s)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
constructor_fromany(self, s) source code
 
cast(self, target) source code
 
convert(self, target)
Data class conversion method Equivalent to a cast, unless Data is Spyder-subclassed
source code
 
str(self) source code
 
__str__(self)
str(x)
source code
 
__print__(self, spaces, mode) source code
 
repr(self) source code
 
__repr__(self)
repr(x)
source code
 
length(self) source code
 
__len__(self) source code
 
validate(self)
<empty>
source code
 
data(self)
Returns the underlying data as binary C string
source code
 
textdata(self)
Returns the underlying data as Python ASCII string: non-text characters are converted to whitespace
source code
 
tofile(self, filename) source code
 
totempfile(self) source code
 
dict(self)
Called by the dict function of Spyder classes...
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]
 
fromfile(c, filename, fastparse=False) source code
Static Methods [hide private]
 
typename() source code
Class Variables [hide private]
  __constructor__ = "constructor_fromany"
Data objects behave as strings or buffers.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, s)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

dict(self)

source code 
Called by the dict function of Spyder classes
 that have Data members
For internal use only


Class Variable Details [hide private]

__constructor__

Data objects behave as strings or buffers. It should be used to store
binary data or file contents. It cannot be printed directly, but its
 contents can be accessed with the data() or textdata() methods

It has a convert method, but the conversion engine is never used,
 convert() on a Data object is equivalent to cast()
This behavior is NOT inherited if Data is Spyder-subclassed,
 in that case, convert() works normally

It can be constructed from String or Data, but there is no parsing constructor
In File objects, Data is considered to be a general format,
 convertible into and from everything

Value:
"constructor_fromany"