ANN: PyLogo 0.1
Ralf Schmitt
ralf at brainbot.com
Wed Nov 19 15:18:40 EST 2003
Ian Bicking <ianb at colorstudy.com> writes:
> On Nov 19, 2003, at 4:17 AM, user at domain.invalid wrote:
>> Just tried it, and this is what I get
>> ++++++++++++++++++
>> Traceback (most recent call last):
>> File "/usr/bin/pylogo", line 6, in ?
>> if os.path.basename(os.path.dirname(__file__)) == 'scripts':
>> NameError: name '__file__' is not defined
>> ++++++++++++++++++
>>
>> This is from both cvs and 0.1 release.
>
> Well, it's hard for me to follow up on this without your email
> address. I'm not quite sure why this is happening (though I admit it
> has happened to be before in other situations, it's not happening to
> me now). I'm not sure why __file__ exists sometimes, and not other
> times. I made a change to CVS to use sys.argv[0] is __file__ is
> missing (since it seems like this only occurs when calling a file as a
> script, as "pylogo" is called).
__file__ being defined in scripts is new in python 2.3.
>
> --
> Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
--
brainbot technologies ag
boppstrasse 64 . 55118 mainz . germany
fon +49 6131 211639-1 . fax +49 6131 211639-2
http://brainbot.com/ mailto:ralf at brainbot.com
More information about the Python-list
mailing list