Newbie ?? Running hello1.py and compiling?

Greg Fortune gfortune at micron.net
Sun Jul 23 21:16:12 EDT 2000


<OneDay at ATime.net> wrote in message news:8lejm0$d3o$1 at earth.superlink.net...
> Hello all,
>
>        At Python's site I started with Example 2.1, Our First Program. I
> opened IDLE, Opened a new window and copied/wrote the commands
> and saved it as hello1.py.
>
>         To run the program it says to "run the script as usual"
>                                 $ python hello1.py
>
>         Where do I type this, I don't know what "as usual" means.

It sounds like you are running Windows.  Assuming that is true, pop up a
console (MS-Dos window) and change to the directory containing the file you
created.  Then type "python hello1.py".  All that does is tell python to run
your script.


>
>         After I wrote hello1.py, I noticed a compiled version in my
explorer.
> Which I can run from there. How did that happen?

Sounds like you got hello1.py to run.  Whenever a script is run, it checks
for a compiled version of the file.  If none exist, it compiles the script
into byte code.  If the .py file is newer than the .pyc (compiled file), the
.py file is compiled again.

>
>          When I copied/wrote hello2.py, following the above steps, I did
not
> get a compiled version. What did I do wrong?

Hmmmm, must not have ran this one.

>
>
> Thank you for your time and patience,
> Al

Not a problem ;)
good luck,

Greg Fortune






More information about the Python-list mailing list