BINARY DATA, SCIPY, MIO (...again)

chr_w at gmx.de chr_w at gmx.de
Mon Oct 15 04:51:45 EDT 2001


Hi.

I get this by typing the dir(types) command:

>>> dir(types)
['BufferType', 'BuiltinFunctionType', 'BuiltinMethodType', 'ClassType',
'CodeType', 'ComplexType', 'DictType', 'DictionaryType', 'EllipsisType',
'FileType', 'FloatType', 'FrameType', 'FunctionType', 'InstanceType', 'IntType',
'LambdaType', 'ListType', 'LongType', 'MethodType', 'ModuleType', 'NoneType',
'SliceType', 'StringType', 'TracebackType', 'TupleType', 'TypeType',
'UnboundMethodType', 'UnicodeType', 'XRangeType', '__builtins__', '__doc__', '__file__',
'__name__']

Can you give me any hints about how to use the fort_read (fortran read)
thing mentioned in the sparse docu of scipy.io.mio??? Am I doing it the right
way?

christian


> This seems strange. What happens if you start a vanilla python session
> and import the types module.
> 
> Python 2.1 (#1, Jul 20 2001, 22:26:10) 
> [GCC 2.95.4 20010319 (Debian prerelease)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> import types
> >>> dir(types)
> ['BufferType', ... , 'ListType', ... , 'TupleType', ...]
> 
> And your loop is definitely very slow. It would be better to
> fread(2000,'l') and create the two wanted arrays by slicing.
> 
> HTH,
> __Janko
> 
> -- 
>   Institut fuer Meereskunde             phone: 49-431-597 3989
>   Dept. Theoretical Oceanography        fax  : 49-431-565876
>   Duesternbrooker Weg 20                email: jhauser at ifm.uni-kiel.de
>   24105 Kiel, Germany
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net





More information about the Python-list mailing list