How to execute/run a *.py file, win7, py3.2..?

V

vmars316

Greetings,
windows7, portablePython3.2:
What if i wanted to send myProg.py to a friend to RUN (who has python
installed).
Isn't there a way just to doubleClick on myProg.py, to get it into the
interpret/RUN?
Could i RUN a myProg.o ?
There must be a way to initiate the RUNning of a myProg.py without
IDLE or pyScript, or the like.
What if i wanted to write my own program in maybe "C",
who's job it is to initiate interpret/run any *.py program.
How does IDLE or pyScript do it?
And yes. i am interested in py2exe or the like, for windows7.
And would like to know what's available, like py2exe.

Thanks...vm
 
S

Steven D'Aprano

Greetings,
windows7, portablePython3.2:
What if i wanted to send myProg.py to a friend to RUN (who has python
installed).


If your friend has Python installed, then double-clicking the .py file
should work fine.

Isn't there a way just to doubleClick on myProg.py, to get it into the
interpret/RUN?

Have you tried it? What makes you think it doesn't work?

And yes. i am interested in py2exe or the like, for windows7. And would
like to know what's available, like py2exe.

Have you tried py2exe?
 
A

alex23

windows7, portablePython3.2:

Is there a reason why you're using Portable Python over the standard
install?
What if i wanted to send myProg.py to a friend to RUN (who has python
installed).
Isn't there a way just to doubleClick on myProg.py, to get it into the
interpret/RUN?

This is what the standard install of Python does by default under
Windows. You're missing the environment setup because you're using
Portable Python. If you absolutely must use it, you might get better
answers from https://groups.google.com/group/portablepython
Could i RUN a myProg.o ?

Yes, you can run .pyc & .pyo files:

Z:\>cat test.py
print "foo"

Z:\>python -O -m py_compile test.py

Z:\>del test.py

Z:\>python test.pyo
foo

Z:\>test.pyo
foo
There must be a way to initiate the RUNning of a myProg.py without
IDLE or pyScript, or the like.

There is: use a non-portable version of Python, or launch it by
explicitly prefixing it with 'python'.
What if i wanted to write my own program in maybe "C",
who's job it is to initiate interpret/run any *.py program.

Um, yours, who else is going to do it for you?
How does IDLE or pyScript do it?

I've never had to look into it because it always just works when using
a system-installed Python.
 

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

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top