Message1032

Author jwpye
Recipients
Date 2006-05-14.00:51:00
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1044177

I have experienced a __file__ related issue as well. It
seems that this is one of the subtle features that most
Python implementations seem to miss(ironpython seems to be
the only one that got it right, but they seem to be missing
the os module, so I dunno if they are actually "better")

jwp@lit:~/jythonRelease_2_2alpha1 % uname -a
FreeBSD lit 6.1-RC FreeBSD 6.1-RC #5: Mon Apr 24 21:21:02
MST 2006     root@lit:/usr/obj/usr/src/sys/void  amd64
jwp@lit:~/jythonRelease_2_2alpha1 % cat ../printfile.py
print '__file__ =', repr(__file__)
jwp@lit:~/jythonRelease_2_2alpha1 % ./jython ../printfile.py
__file__ =Traceback (innermost last):
  File "../printfile.py", line 1, in ?
NameError: __file__

Also, interestingly, it appears to have printed the first
element in the print statement(printing while iterating over
the list?)

Oh, and it does the same thing when I try to import the
'printfile' module.

If this is not deemed a bug, perhaps it should be mentioned
in the FAQ. Similarly, I can't find much of anything on
ironpython's lack of an os module for posix systems.
History
Date User Action Args
2008-02-20 17:17:25adminlinkissue1284344 messages
2008-02-20 17:17:25admincreate