| Home | Trees | Indices | Help |
|
|---|
|
|
|
|||
|
isiterable(o) Tests if an object is iterable. |
||
|
quote(name) Extended quote for the DAP spec. |
||
|
encode_atom(atom) Atomic types encoding. |
||
|
escape(s) Escape a string. |
||
| _test() | ||
|
|||
|
__author__ = 'Roberto De Almeida <rob@pydap.org>'
|
||
|
__version__ = (2, 2, 5)
|
||
|
__dap__ = (2, 0)
|
||
|
USER_AGENT = 'pydap/2.2.5'
|
||
|
INDENT = ' '
|
||
|
VERBOSE = False
|
||
|
CACHE = None
|
||
|
FORTY_TWO = 42
|
||
|
_ = 5
|
||
|
division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0...
|
||
Imports: urllib
|
|||
>>> print isiterable(range(10)) True >>> print isiterable({}) True >>> def a(): ... for i in range(10): yield i >>> print isiterable(a()) True >>> print isiterable('string') False >>> print isiterable(1) False |
Extended quote for the DAP spec. The period MUST be escaped in names (DAP spec, item 5.1):>>> quote("White space") 'White%20space' >>> urllib.quote("Period.") 'Period.' >>> quote("Period.") 'Period%2E' |
Atomic types encoding. Encoding atomic types for the DAS. Integers should be printed using the base 10 ASCII representation of its value:>>> encode_atom(42) '42'Floating point values are printed using the base 10 ASCII representation of its value, conforming to ANSI C's description of printf using the %g format and precision 6. >>> encode_atom(1/3) '0.333333'String and URLs are printed in ASCII, escaped according to escape(). >>> encode_atom('This is a "string".') '"This is a \\"string\\"."' |
Escape a string. Enclose strings with double quotes, escape double quotes and backslashes:>>> escape('String') '"String"' >>> escape('This is a "test".') '"This is a \\"test\\"."' |
|
|
|||
__author__None
|
__version__None
|
__dap__None
|
USER_AGENTNone
|
INDENTNone
|
VERBOSENone
|
CACHENone
|
FORTY_TWONone
|
_None
|
divisionNone
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Mon Nov 13 21:49:05 2006 | http://epydoc.sourceforge.net |