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
* 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
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
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
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
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
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
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
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
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
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
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
>>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
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
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
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
>> 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
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
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
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
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
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
22 matches
Mail list logo