Python scripts from DOS

Rebelo puntabluda at gmail.com
Fri Jul 9 07:05:49 EDT 2010


On 9 srp, 11:37, Mark Carter <alt.mcar... at gmail.com> wrote:
> On my machine, I can go to a DOS shell, and type
>    myscript.py
> This will cause the script to be run as a python script. So that bit
> works.
>
> On another machine, on which python was set up without admin
> privileges, if I type
>    myscript.py
> it will open the "Open With" dialog box. It wont let me execute it
> with python.exe. It asks me the same question every time, too. If I
> type
>    python myscript.py
> then everything works fine.
>
> Is there a way of setting up the "other" machine so that it replicates
> the behaviour of my machine?

http://docs.python.org/release/2.6.5/using/windows.html for python
2.6.5 on windows
especially chapter 3.3.4. Executing scripts

for python 2.7 :
http://docs.python.org/using/windows.html
same chapter

for python 3.0 :
http://docs.python.org/py3k/using/windows.html#executing-scripts





More information about the Python-list mailing list