no .pyc

T

Tim Hanson

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?

Oh, yeah: 2.6.5, Ubuntu 10.04.
 
N

News123

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,069
Latest member
SimplyleanKetoReviews

Latest Threads

Top