This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: python executable optionally should search script on PATH
Type: enhancement Stage:
Components: None Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cconrad, georg.brandl, loewis, nnorwitz
Priority: normal Keywords:

Created on 2005-12-13 15:13 by cconrad, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (11)
msg54690 - (view) Author: Christoph Conrad (cconrad) Date: 2005-12-13 15:13
I've seen that with perl - parameter -S means search
script on path. Very helpful.
msg54691 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-12-15 21:40
Logged In: YES 
user_id=1188172

I don't know... if the script is in the PATH, isn't it
normally executable too?
msg54692 - (view) Author: Christoph Conrad (cconrad) Date: 2005-12-15 22:00
Logged In: YES 
user_id=21338

i meant the windows operating system.
msg54693 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-01-14 18:34
Logged In: YES 
user_id=21627

On windows, you should be able to just invoke the_script.py
(i.e. without a preceding python.exe). Does this not work
for you?
msg54694 - (view) Author: Christoph Conrad (cconrad) Date: 2006-01-16 10:59
Logged In: YES 
user_id=21338

> On windows, you should be able to just invoke the_script.py
> (i.e. without a preceding python.exe). Does this not work
> for you?

It works - but command line args are not given to the called
script. If i prepend python.exe, command line args are
transferred correctly.
msg54695 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-01-16 21:29
Logged In: YES 
user_id=21627

That (arguments not passed to the script) was a bug in some
versions of the Windows installer. Please verify that the
registry, at
(HKCU|HKLM)\Software\Classes\Python.File\open\command has
the value '[path]python.exe "%1" %*'. The %* part should
arrange for arguments being passed.
msg54696 - (view) Author: Christoph Conrad (cconrad) Date: 2006-02-20 08:12
Logged In: YES 
user_id=21338

I checked the registry. It's ok. It's windows 2000.
msg54697 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-02-20 09:14
Logged In: YES 
user_id=1188172

Do you mean that the registry setting is ok, but the
parameters are not passed correctly?
msg54698 - (view) Author: Christoph Conrad (cconrad) Date: 2006-02-20 11:10
Logged In: YES 
user_id=21338

(1)

(HKCU|HKLM)\Software\Classes\Python.File\open\command

really is

(HKCU|HKLM)\Software\Classes\Python.File\shell\open\command

(2)

with python 24 a new behaviour occurs: i try to execute the
script on the commandline, but a dialog boy appears with:

the file "[...correct complete path to the script...]" could
not be found. Again, if i prepend python.exe, everything
works as expected. windows 2000 professional.
msg54699 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-03-16 06:39
What's the status of this?  Is it a bug report?
msg54700 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-03-16 15:41
I believe this was fixed some time ago. cconrad, if it still doesn't work for you, please give precise instructions on how to reproduce the problem: what exact Python version are you using (it's supposed to work for 2.4.4 and 2.5.0 atleast), what path did you install Python to what does your demo script  look like, where is it installed, and what is the precise error that you get when you run it.
History
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42688
2005-12-13 15:13:31cconradcreate