Re: Windows and python execution

2005-12-29 Thread Peter Hansen
Thorsten Kampe wrote: > If you installed Python the normal way, .py files are already > associated with Python. Windows uses the registry and doesn't make any > difference whether you doubleclick a file or type the name on the > command line The difference is whether you can execute the script by

Re: Windows and python execution

2005-12-29 Thread Thorsten Kampe
* Mark Carter (2005-12-26 23:06 +0100) > I had installed python 2.4 in the standard way, so py files were already > associated with python when you double-clicked them from Explorer. Using > my set meant that if I wanted to use py files from the command line, I > could just type out the script n

Re: Windows and python execution

2005-12-28 Thread Roger Upole
The PATHEXT allows you to execute the script without typing the .py extension. Roger "BartlebyScrivener" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Some of the confusion probably comes from which installation people > use. I used the latest ActiveState distribution of Pyth

Re: Windows and python execution

2005-12-28 Thread BartlebyScrivener
Some of the confusion probably comes from which installation people use. I used the latest ActiveState distribution of Python. As one of the other posters observed it automatically adds the .py extension in the PATHEXT system variable. At least I didn't put it there. Then, as we've discussed, as lo

Re: Windows and python execution

2005-12-27 Thread Daniel Dittmar
Tim Roberts wrote: > Mark Carter <[EMAIL PROTECTED]> wrote: >>What you need to do is include the following line in autoexec.bat: >>set .py=c:\python24\python.exe >> >>This will achieve the desired result. I'm suprised more people don't use it. > > > They don't use it, because it doesn't do anythi

Re: Windows and python execution

2005-12-27 Thread Peter Hansen
Peter Hansen wrote: > BartlebyScrivener wrote: What you need to do is include the following line in autoexec.bat: set .py=c:\python24\python.exe >> >>Whatever works for you. I don't have that command in my autoexec.bat >>file and my python scripts execute from any location because the >>dir

Re: Windows and python execution

2005-12-27 Thread Peter Hansen
BartlebyScrivener wrote: >>>What you need to do is include the following line in autoexec.bat: >>>set .py=c:\python24\python.exe > > > Whatever works for you. I don't have that command in my autoexec.bat > file and my python scripts execute from any location because the > directory they are store

Re: Windows and python execution

2005-12-26 Thread Tim Roberts
Mark Carter <[EMAIL PROTECTED]> wrote: >rzed wrote: >> Mark Carter <[EMAIL PROTECTED]> wrote in >> news:[EMAIL PROTECTED]: >> >> >>>What I would like to do it type something like >>> myscript.py >>> >>>instead of >>> python myscript.py > >> As another poster points out, be sure that you

Re: Windows and python execution

2005-12-26 Thread Mark Carter
rzed wrote: > I should have asked which Windows version you had. XP Pro My bad. On Win2k > or XP, adding .py (for instance) to the PATHEXT variable means that > you can execute "myNeatProgram.py" with this command-line: > prompt>myNeatProgram Oh, now I see! It's beginning to make sense to me

Re: Windows and python execution

2005-12-26 Thread rzed
Mark Carter <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Bengt Richter wrote: > And there is a PATHEXT environment variable, >>> >>>Aha. You'bve provided a significant clue. >>> >>>What you need to do is include the following line in >>>autoexec.bat: set .py=c:\python24\python.exe

Re: Windows and python execution

2005-12-26 Thread Mark Carter
Bengt Richter wrote: >>>And there is a PATHEXT environment variable, >> >>Aha. You'bve provided a significant clue. >> >>What you need to do is include the following line in autoexec.bat: >>set .py=c:\python24\python.exe >> >>This will achieve the desired result. I'm suprised more people don't us

Re: Windows and python execution

2005-12-26 Thread Bengt Richter
On Mon, 26 Dec 2005 14:53:28 +, Mark Carter <[EMAIL PROTECTED]> wrote: >rzed wrote: >> Mark Carter <[EMAIL PROTECTED]> wrote in >> news:[EMAIL PROTECTED]: >> >> >>>What I would like to do it type something like >>> myscript.py >>> >>>instead of >>> python myscript.py > >> As another

Re: Windows and python execution

2005-12-26 Thread BartlebyScrivener
>>What I was trying to do was execute a python script without having to type the word "python" explicitly. For that, you need the "set" command that I listed in a previous post.<< I'm not confused and I like to keep my scripts in oddball places too. Namely d:\python. All I'm saying is I don't use

Re: Windows and python execution

2005-12-26 Thread Mark Carter
BartlebyScrivener wrote: > The installer can put python.exe in his PATH but if he's storing his > scripts in some oddball place then he has to tell Windows where to find > them. I think you're misunderstanding what I was after. python.exe is already in my PATH. What I was trying to do was execute

Re: Windows and python execution

2005-12-26 Thread BartlebyScrivener
The installer can put python.exe in his PATH but if he's storing his scripts in some oddball place then he has to tell Windows where to find them. rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows and python execution

2005-12-26 Thread rbt
Mark Carter wrote: > rzed wrote: >> Mark Carter <[EMAIL PROTECTED]> wrote in >> news:[EMAIL PROTECTED]: >> >>> What I would like to do it type something like >>> myscript.py >>> >>> instead of >>> python myscript.py > >> As another poster points out, be sure that your Python is on your p

Re: Windows and python execution

2005-12-26 Thread BartlebyScrivener
>> What you need to do is include the following line in autoexec.bat: >> set .py=c:\python24\python.exe Whatever works for you. I don't have that command in my autoexec.bat file and my python scripts execute from any location because the directory they are stored in is in my PATH variable. -- ht

Re: Windows and python execution

2005-12-26 Thread Mark Carter
rzed wrote: > Mark Carter <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > >>What I would like to do it type something like >> >>>myscript.py >> >>instead of >> >>>python myscript.py > As another poster points out, be sure that your Python is on your > path. > > And there is a PATH

Re: Windows and python execution

2005-12-26 Thread rzed
Mark Carter <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > What I would like to do it type something like > > myscript.py > instead of > > python myscript.py > on a Windows console. I know its possible because Ruby scripts > manage to do this - I just don't know the registry settings that

Re: Windows and python execution

2005-12-26 Thread Tim Williams (gmail)
On 26/12/05, Mark Carter <[EMAIL PROTECTED]> wrote: What I would like to do it type something like > myscript.pyinstead of > python myscript.py Open an explorer window or open "My Computer" Click on TOOLS then FOLDER OPTIONS Select the "FILE TYPES tab and click on NEW EnterĀ  PY as the file

Re: Windows and python execution

2005-12-26 Thread BartlebyScrivener
Well, can't help with the registry, but I suppose you could search google for "edit system variables path registry" and find the hard way. The easy way is: You need to add the path of the directory where you keep myscript.py to your system path. You do this by going to Control Panel | System | Adv

Windows and python execution

2005-12-26 Thread Mark Carter
What I would like to do it type something like > myscript.py instead of > python myscript.py on a Windows console. I know its possible because Ruby scripts manage to do this - I just don't know the registry settings that need to be tweaked to enable it. Any ideas (I'd prefer to know the registr