[Pythonmac-SIG] MachoPython 2.2.2 build works; 3 minor
questions
Russell E Owen
owen@astro.washington.edu
Thu, 7 Nov 2002 16:26:29 -0800
Thank you. That did the trick! Robin's file
<http://wxpython.org/BUILD.osx.txt> had the instructions.
Updated instructions for building Python 2.2.2 on MacOS 10.2 are at
<http://www.astro.washington.edu/owen/> (including XML support,
thanks to Andrew Shearer).
There are a few fairly minor unresolved issues:
1) Readlines support is missing when python is run via the shell
script in pythonw, though one can activate it by doing "import
readline". Any idea how to get that done automatically at startup?
2) Is it possible to make a Python/Tkinter source file that can be
run as a command (i.e. that has a working #! line in it)? I tried the
obvious, but it fails. Example:
#!/usr/local/bin/pythonw
"""Test of #!/usr/local/bin/pythonw; the file does exist and does work"""
Results in:
/usr/local/bin/pythonw: Event not found.
I suspect the failure may be something to do with the fact that
pythonw executes in a sub shell.
Ideally, I'd like to set it up so /usr/local/bin/python could be used
for *everything* involving the command line, meaning I could type
"python" at the command line or use #!/usr/local/bin/python in my
source code and it would all work (including with Tkinter).
3) pythonw does the following when run with a source file as its argument:
% pythonw TUI.py
original argc=2
original argv[0] = "/Applications/Python.app/Contents/MacOS/python"
original argv[1] = "TUI.py"
modified argc=2
modified argv[0] = "/Applications/Python.app/Contents/MacOS/python"
modified argv[1] = "TUI.py"
I'm guessing this is a known oddity in 2.2.2 that is resolved in 2.3,
but if there's some trivial way to stop it, I'll put it in the
documentation.
-- Russell
>On Thursday, November 7, 2002, at 02:29 PM, Russell E Owen wrote:
>>If anyone has any suggestions, please let me know.
>
>check out what the wxMacPython folks are doing. Robin is
>distributing a build that they are using with wxPython. I imagine
>the issues are similar, so I'd find out how he's building that.
>
>-Chris
>
>
>Christopher Barker, Ph.D.
>Oceanographer
>
>NOAA/OR&R/HAZMAT (206) 526-6959 voice
>7600 Sand Point Way NE (206) 526-6329 fax
>Seattle, WA 98115 (206) 526-6317 main reception
>
>Chris.Barker@noaa.gov