running .py files on Linux

Tingting HAN hihighsky at gmail.com
Thu May 6 05:49:29 EDT 2010


Dear Officer,
I want to run two .py files to generate .h5 files.
hantingting at tityro:~$ python2.5
Python 2.5.4 (r254:67916, Jan 20 2010, 21:43:02)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

When ruuning gentest_sphere.py, the problem is as following:
hantingting at tityro:~/Downloads/triMC3D/python$ python2.5 gentest_sphere.py
gsphere.h5
Usage: gentest_sphere.pynEl Testfile.h5
options:
        n:      number of elements
hantingting at tityro:~/Downloads/triMC3D/python$
I guess I should write the command in the format of usage, but I don't know
how to do it.

When ruuning test_detector.py, the problem is as following:
hantingting at tityro:~/Downloads/triMC3D/python$ python2.5 test_detector.py
tdetector.h5
h5/Opaque_material/ext_Trabecular_Bone-int_Cartilage/Nonenm/SourceNone/
lamb =  None
Traceback (most recent call last):
  File "test_detector.py", line 600, in <module>
    main()
  File "test_detector.py", line 567, in main
    hdf5.subs_lamb( materials, lamb )
  File "/home/hantingting/Downloads/triMC3D/python/local_modules/hdf5.py",
line 703, in subs_lamb
    m.mu_s = m.mu_s(l)
  File
"/home/hantingting/Downloads/triMC3D/python/local_modules/matslib.py", line
71, in <lambda>
    [1550.0,1460.0,1360.0,1300.0,1240.0,1220.0,1220.0,1200.0,1160.0], s=300
))
  File "/usr/lib/python2.5/site-packages/scipy/interpolate/fitpack.py", line
485, in splev
    y,ier=_fitpack._spl_(x,der,t,c,k)
TypeError: array cannot be safely cast to required type
hantingting at tityro:~/Downloads/triMC3D/python$ python2.5 test_detector.py
usage: test_detector.py outputfile.h5 [options]
options:
    -c  Cage Material
    -e  External Material
    -i  Internal Material
    -l  Lambda
    -o  Output String
    -s  Source Number
    -h  Shows this help
hantingting at tityro:~/Downloads/triMC3D/python$
Could you please give me some advice to solve these two problems? I
sincerely apologize that I am new for python.
-- 
Best regards,
HAN Tingting
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100506/368b545f/attachment.html>


More information about the Python-list mailing list