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: wrong options are set to python.exe
Type: Stage:
Components: Installation Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, quiver, tim.peters
Priority: high Keywords:

Created on 2004-09-03 18:46 by quiver, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (9)
msg22342 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2004-09-03 18:46
When I tried to run a script(just double-clicked it) with 
Python
2.4 on Win 2000, I ran into an error message:

  C:\WINNT\system32\cmd.exe /c test.py
  Unknown option: -n
  usage: C:\Python24\python.exe [option] ... [-c cmd | 
file | -] [arg] ...
  Try `python -h' for more information.
  shell returned 2
  Hit any key to close this window...

The problem seems to be the associations of Python 
related file
types.

In this case, "Python file" (Extension is ".py") is 
associated
with two actions:
-  Edit with IDLE
-  open            (default)

If you look at the "Application used to perform action" 
text box
of 'open', you can see:
  "C:\Python24\python.exe" -n -e "%1"

But neither -n nor -e is a valid option for python.exe and 
it
results in an error message. These options are for IDLE!
Line #1016 to #1020 of mis.py may be relevant to this.

# Tools/msi/mis.py

  # add_data(db, "MIME") XXX
  add_data(db, "Verb",
          [("py", "open", 1, None, r'-n -e "%1"'),
          ("pyw", "open", 1, None, r'-n -e "%1"'),
          ("pyc", "open", 1, None, r'-n -e "%1"'),
          ("pyo", "open", 1, None, r'-n -e "%1"')])
msg22343 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-09-03 23:25
Logged In: YES 
user_id=21627

Python 2.4 has not been released yet. What precisely have
you been using?
msg22344 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2004-09-04 01:04
Logged In: YES 
user_id=31435

He's using the 2.4a3 just released; a number of reports like 
this appeared on c.l.py soon after the release, and George 
was the first to do the right thing about it <wink>.
msg22345 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2004-09-04 04:20
Logged In: YES 
user_id=671362

Sorry for not being clearer.
I meant Python 2.4a3 by Python 2.4.
msg22346 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-09-05 09:01
Logged In: YES 
user_id=21627

Thanks for your report. I have re-rolled the package, and
Anthony has made it available from 

http://www.python.org/ftp/python/2.4/python-2.4a3.2.msi

I will commit the changes to msi.py shortly.
I have left the Itanium installer untouched - Itanium users
will either fix the extensions themselves, or wait for 2.4b1.
msg22347 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2004-09-08 15:14
Logged In: YES 
user_id=671362

Hi, Martin.

Your fix doesn't look enough for me.
I tried a new installer but noticed that all command-line 
argumetns(install, --help, etc) are ignored.

I think adding %* after "%1" is necessary.

Then the file association to *.py files looks like:
  "C:\Python24\python.exe" "%1" %*
or
  "C:\Python24\python.exe" -console "%1" %*   # CVS HEAD

Thanks in advance.
msg22348 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-09-08 18:09
Logged In: YES 
user_id=21627

I see. Until yesterday, I didn't even know you can use the
open verb in contexts other than double-clicking.
msg22349 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-09-10 12:00
Logged In: YES 
user_id=21627

This should be fixed in msi.py 1.10. Please try the installer at

http://www.dcl.hpi.uni-potsdam.de/home/loewis/python-2.4a3.3.msi
msg22350 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2004-09-11 01:55
Logged In: YES 
user_id=671362

Looks fine to me.

FWI, the new installer made the associations on my PC as 
follows:

"C:\Python24\pythonw.exe" "C:\Python24\Lib\idlelib\idle.pyw" -
n -e "%1"

- py(Edit with Idle)
- pyw(Edit with Idle)

"C:\Python24\pythonw.exe" "%1"  %*

- py(open)
- pyc(open)
- pyo(open)
- pyw(open)


Many thanks for your work.
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40863
2004-09-03 18:46:54quivercreate