Ignore:
Timestamp:
25/10/08 00:17:16 (4 years ago)
Author:
Paul Kienzle
Message:

python: make proper package (step 1) Refs #101.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bindings/python/nxsunit.py

    r1117 r1120  
    1919Usage example: 
    2020 
    21     u = nxsunit.Converter('mili*metre')  # Units stored in mm 
     21    import nxs.unit 
     22    u = nxs.unit.Converter('mili*metre')  # Units stored in mm 
    2223    v = u(3000,'m')  # Convert the value 3000 mm into meters 
    2324 
     
    3031    units = [for attr,value in file.attrs() if attr == 'units'] 
    3132    # 3. set up the converter (assumes that units actually exists) 
    32     u = nxsunit.Converter(units[0]) 
     33    u = nxs.unit.Converter(units[0]) 
    3334    # 4. read the data and convert to the correct units 
    3435    v = u(file.read(),'radians') 
     
    4344getting the dimension from the units as we are currently doing. 
    4445""" 
     46 
     47__all__ = ['Converter'] 
    4548 
    4649# TODO: Add udunits to NAPI rather than reimplementing it in python 
Note: See TracChangeset for help on using the changeset viewer.