[Tutor] Re: Bug in my program

Magnus Lycka magnus@thinkware.se
Tue Oct 29 12:00:06 2002


At 10:56 2002-10-29 -0500, Kyle Babich wrote:
>I guess it has to be there because it returns a blank list []
>But I can't find it anywhere, so I did a little experimenting.  Eventually=
 I
>got all the way to the very top of the file and doing this:
>
>#! c:\python22\python

This pound-bang trick doesn't work in Windows, does it?
But it sholdn't matter. Windows uses the extension .py
to find the interpreter. This is just a comment to Python.


>print file
>
>still returns this:
>
>[]

Really? You can get away from the problem by
adding "file=3Dopen" in the beginning of the file
I guess, but this should certainly not happen.

There isn't even any import before your print file?

What if you open the python interpreter and
type

 >>> print file

in interactive mode? Same there?


You didn't need to quote all below... ;)
>----- Original Message -----
...



--=20
Magnus Lyck=E5, Thinkware AB
=C4lvans v=E4g 99, SE-907 50 UME=C5
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se