On 10/07/2010 11:55 AM, Tim Hanson wrote: > I feel a little silly. I am learning Python by reading _Learning_Python_ by > Mark Lutz. I made it all the way to "Hello World" before my first question. > :-) > > The program isn't too complicated. > print "Hello World" > print 2**100 > > I saved it to a directory for which I have rw permissions that I moved to > with > cd ~/prog. I set the execute bit. I started the file with > #!/usr/bin/python. > I think I did everything right, and the program ran properly, both as a shell > command (python foo.py) and as a standalone (./foo.py). > > No *.pyc. .py is there. What am I doing wrong?
Nothing's wrong. The 'main' script (the one you called on the command line will not be converted to .pyc) if you had main.py and mysubmodule.py and if main.py had imported mysubmodule.py, then you would have seen mysubmodule.pyc > > Oh, yeah: 2.6.5, Ubuntu 10.04. -- http://mail.python.org/mailman/listinfo/python-list