basictypes.bytes
index
p:\properties\basictypes\bytes.py

Simple class providing formatting of byte values (gigabytes, megabytes, etceteras)

 
Modules
       
basictypes.basic_types

 
Classes
       
long(object)
Bytes
Bytes

 
class Bytes(long)
    Special data-type for byte values
 
 
Method resolution order:
Bytes
long
object

Class methods defined here:
coerce(cls, value) from type
Coerce the value to byte value
format(cls, value, multiplier=None) from type
Format as a string which is back-coercable
 
multiplier -- pass in the appropriate multiplier for
        the value (i.e. request 'KB' to get back as kilobytes,
        default (None) indicates that the near

Data and other attributes defined here:
GIGABYTES = 1073741824.0
KILOBYTES = 1024.0
MEGABYTES = 1048576.0
TERABYTES = 1099511627776.0
__dict__ = <dictproxy object at 0x01C53750>
dictionary for instance variables (if defined)
displayNames = [(1099511627776.0, 'TB'), (1073741824.0, 'GB'), (1048576.0, 'MB'), (1024.0, 'KB'), (0, 'B')]

Methods inherited from long:
__abs__(...)
x.__abs__() <==> abs(x)
__add__(...)
x.__add__(y) <==> x+y
__and__(...)
x.__and__(y) <==> x&y
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__coerce__(...)
x.__coerce__(y) <==> coerce(x, y)
__div__(...)
x.__div__(y) <==> x/y
__divmod__(...)
x.__divmod__(y) <==> xdivmod(x, y)y
__float__(...)
x.__float__() <==> float(x)
__floordiv__(...)
x.__floordiv__(y) <==> x//y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getnewargs__(...)
__hash__(...)
x.__hash__() <==> hash(x)
__hex__(...)
x.__hex__() <==> hex(x)
__int__(...)
x.__int__() <==> int(x)
__invert__(...)
x.__invert__() <==> ~x
__long__(...)
x.__long__() <==> long(x)
__lshift__(...)
x.__lshift__(y) <==> x<<y
__mod__(...)
x.__mod__(y) <==> x%y
__mul__(...)
x.__mul__(y) <==> x*y
__neg__(...)
x.__neg__() <==> -x
__nonzero__(...)
x.__nonzero__() <==> x != 0
__oct__(...)
x.__oct__() <==> oct(x)
__or__(...)
x.__or__(y) <==> x|y
__pos__(...)
x.__pos__() <==> +x
__pow__(...)
x.__pow__(y[, z]) <==> pow(x, y[, z])
__radd__(...)
x.__radd__(y) <==> y+x
__rand__(...)
x.__rand__(y) <==> y&x
__rdiv__(...)
x.__rdiv__(y) <==> y/x
__rdivmod__(...)
x.__rdivmod__(y) <==> ydivmod(y, x)x
__repr__(...)
x.__repr__() <==> repr(x)
__rfloordiv__(...)
x.__rfloordiv__(y) <==> y//x
__rlshift__(...)
x.__rlshift__(y) <==> y<<x
__rmod__(...)
x.__rmod__(y) <==> y%x
__rmul__(...)
x.__rmul__(y) <==> y*x
__ror__(...)
x.__ror__(y) <==> y|x
__rpow__(...)
y.__rpow__(x[, z]) <==> pow(x, y[, z])
__rrshift__(...)
x.__rrshift__(y) <==> y>>x
__rshift__(...)
x.__rshift__(y) <==> x>>y
__rsub__(...)
x.__rsub__(y) <==> y-x
__rtruediv__(...)
x.__rtruediv__(y) <==> y/x
__rxor__(...)
x.__rxor__(y) <==> y^x
__str__(...)
x.__str__() <==> str(x)
__sub__(...)
x.__sub__(y) <==> x-y
__truediv__(...)
x.__truediv__(y) <==> x/y
__xor__(...)
x.__xor__(y) <==> x^y

Data and other attributes inherited from long:
__new__ = <built-in method __new__ of type object at 0x1E0C4290>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
Bytes_DT = class Bytes(long)
    Special data-type for byte values
 
 
Method resolution order:
Bytes
long
object

Class methods defined here:
coerce(cls, value) from type
Coerce the value to byte value
format(cls, value, multiplier=None) from type
Format as a string which is back-coercable
 
multiplier -- pass in the appropriate multiplier for
        the value (i.e. request 'KB' to get back as kilobytes,
        default (None) indicates that the near

Data and other attributes defined here:
GIGABYTES = 1073741824.0
KILOBYTES = 1024.0
MEGABYTES = 1048576.0
TERABYTES = 1099511627776.0
__dict__ = <dictproxy object at 0x01C53770>
dictionary for instance variables (if defined)
displayNames = [(1099511627776.0, 'TB'), (1073741824.0, 'GB'), (1048576.0, 'MB'), (1024.0, 'KB'), (0, 'B')]

Methods inherited from long:
__abs__(...)
x.__abs__() <==> abs(x)
__add__(...)
x.__add__(y) <==> x+y
__and__(...)
x.__and__(y) <==> x&y
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__coerce__(...)
x.__coerce__(y) <==> coerce(x, y)
__div__(...)
x.__div__(y) <==> x/y
__divmod__(...)
x.__divmod__(y) <==> xdivmod(x, y)y
__float__(...)
x.__float__() <==> float(x)
__floordiv__(...)
x.__floordiv__(y) <==> x//y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getnewargs__(...)
__hash__(...)
x.__hash__() <==> hash(x)
__hex__(...)
x.__hex__() <==> hex(x)
__int__(...)
x.__int__() <==> int(x)
__invert__(...)
x.__invert__() <==> ~x
__long__(...)
x.__long__() <==> long(x)
__lshift__(...)
x.__lshift__(y) <==> x<<y
__mod__(...)
x.__mod__(y) <==> x%y
__mul__(...)
x.__mul__(y) <==> x*y
__neg__(...)
x.__neg__() <==> -x
__nonzero__(...)
x.__nonzero__() <==> x != 0
__oct__(...)
x.__oct__() <==> oct(x)
__or__(...)
x.__or__(y) <==> x|y
__pos__(...)
x.__pos__() <==> +x
__pow__(...)
x.__pow__(y[, z]) <==> pow(x, y[, z])
__radd__(...)
x.__radd__(y) <==> y+x
__rand__(...)
x.__rand__(y) <==> y&x
__rdiv__(...)
x.__rdiv__(y) <==> y/x
__rdivmod__(...)
x.__rdivmod__(y) <==> ydivmod(y, x)x
__repr__(...)
x.__repr__() <==> repr(x)
__rfloordiv__(...)
x.__rfloordiv__(y) <==> y//x
__rlshift__(...)
x.__rlshift__(y) <==> y<<x
__rmod__(...)
x.__rmod__(y) <==> y%x
__rmul__(...)
x.__rmul__(y) <==> y*x
__ror__(...)
x.__ror__(y) <==> y|x
__rpow__(...)
y.__rpow__(x[, z]) <==> pow(x, y[, z])
__rrshift__(...)
x.__rrshift__(y) <==> y>>x
__rshift__(...)
x.__rshift__(y) <==> x>>y
__rsub__(...)
x.__rsub__(y) <==> y-x
__rtruediv__(...)
x.__rtruediv__(y) <==> y/x
__rxor__(...)
x.__rxor__(y) <==> y^x
__str__(...)
x.__str__() <==> str(x)
__sub__(...)
x.__sub__(y) <==> x-y
__truediv__(...)
x.__truediv__(y) <==> x/y
__xor__(...)
x.__xor__(y) <==> x^y

Data and other attributes inherited from long:
__new__ = <built-in method __new__ of type object at 0x1E0C4290>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
Data
        __file__ = r'p:\properties\basictypes\bytes.pyc'
__name__ = 'basictypes.bytes'