Message5762
In Jython the __import__ function works differently than the one in CPython, CPython allows an empty string as globals while Jython doesn't.
__import__('csv','') works in CPython while it doesn't work in Jython
svekle@blackdevil:~> jython
Jython 2.5.1+ (unknown:exported, May 6 2010, 12:31:38)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_15
Type "help", "copyright", "credits" or "license" for more information.
>>> __import__('csv','')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: str indices must be integers
svekle@blackdevil:~> python2.5
Python 2.5.4 (r254:67916, Jan 20 2010, 21:44:03)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> __import__('csv','')
<module 'csv' from '/usr/lib/python2.5/csv.pyc'> |
|
Date |
User |
Action |
Args |
2010-05-06 15:35:40 | sven | set | recipients:
+ sven |
2010-05-06 15:35:39 | sven | set | messageid: <1273160139.62.0.500447625084.issue1607@psf.upfronthosting.co.za> |
2010-05-06 15:35:39 | sven | link | issue1607 messages |
2010-05-06 15:35:37 | sven | create | |
|