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 / pythonw replacement in C
Type: Stage:
Components: macOS Versions: Python 2.4
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: jackjansen Nosy List: bob.ippolito, jackjansen, mdehoon
Priority: normal Keywords: patch

Created on 2004-10-29 05:26 by mdehoon, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pythonm.c mdehoon, 2004-10-29 05:26 C Source code of the new python2.4
Messages (3)
msg47179 - (view) Author: Michiel de Hoon (mdehoon) * Date: 2004-10-29 05:26
I rewrote the shell script pythonw2.4 (which usually
lives in /usr/local/bin) in C. With a link from python
to this C program, users can:
a) Run "python" to use the framework version of Python,
which exists in a valid application bundle (unlike the
current python in /usr/local/bin);
b) Use "#!/usr/local/bin/python" as the first line in
python scripts (unlike the current pythonw in
/usr/local/bin, which Mac OS X interprets to be a shell
script).
Hence, (I believe) this C program avoids the problems
with python and pythonw that are in /usr/local/bin now.
The setup in /usr/local/bin would be:

lrwxr-xr-x python -> python2.4
-rwxr-xr-x python2.4

where python2.4 is the C program calling
/Library/Frameworks/Python.framework/Versions/2.4/bin/python
with the appropriate command-line arguments.

Some modification of the C code may be needed for it to
be consistent with the Python installation process.
Note also that for the non-framework build, python2.4
can just be a link (as it is now).
msg47180 - (view) Author: Michiel de Hoon (mdehoon) * Date: 2004-10-29 05:35
Logged In: YES 
user_id=488897

I just noticed that Nathan Gray had already submitted a
similar patch (my impression from the pythonmac-sig archive
was that that hadn't happened yet, but I guess I should have
checked existing patches before submitting one). Well I hope
maybe it is still useful for something.
msg47181 - (view) Author: Bob Ippolito (bob.ippolito) * (Python committer) Date: 2006-07-15 16:32
Logged In: YES 
user_id=139309

This is a duplicate of http://python.org/sf/1038911

Python 2.5 has similar functionality (but does not descend from this patch)
History
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 41101
2004-10-29 05:26:46mdehooncreate