On Mar 31, 2005, at 11:10 AM, Bob Ippolito wrote:


On Mar 31, 2005, at 10:59 AM, Charles Hartman wrote: <snip>
2. (Then I need to set a path variable to say which one will be used in various contexts, such as debugging, building with py2app, etc.?)

When typing "python":
- If /usr/bin comes before /usr/local/bin in your PATH then Python 2.3.0 will be used, if /usr/local/bin comes first, then Python 2.4.1 will be used (of course, with sufficient other crap installed, this may not be true).


When typing "python2.3"
- Will always choose 2.3.0 (unless you have other crap installed)

When typing "python2.4"
- Will always choose 2.4.1 (unless you have other crap installed, or /usr/local/bin is not in the path)


When running scripts installed by Python packages, their "#!" lines are rewritten to point to a *specific* Python. In those cases, it's whichever you installed most recently. For example, the bdist_mpkg script that comes with py2app.
-bob



It has been a dense day as I've had my head around an OOP design pattern approach, so I'm sure I'm missing the obvious with this side track :~)


Having a little trouble getting at Python 2.4 and wondered what I need to set to get such by default. Do I need to reset the whole sys.path each time? I also wanted Wing to access 2.4 in interactive mode before I setup a project, so I wanted something outside of Wing to stick.

I used 2.4 previously but that was through Applications/MacPython-2.4/PythonIDE so I tried copying the Wing folder over to Applications/MacPython-2.4/ (from Applications/) but then Wing comes all garbled still (trying to) referencing 2.3. The Terminal try follows, in turn followed by the PythonIDE in 2.4 sys.path:

***Terminal***
Chinook ~ 240 $python2.4
-bash: python2.4: command not found
Chinook ~ 241 $python
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python23.zip', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/Numeric', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/PyObjC', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/wx-2.5.3-mac-ansi', '/Users/Chinook/Library/Python/2.3/site-packages', '/Users/Chinook/PythonWIP/PythonScripts', '/Users/Chinook/PythonProjects']
>>>


***PythonIDE (in 2.4)***
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)]
Type "copyright", "credits" or "license" for more information.
MacPython IDE 1.0.2
>>> import sys
>>> sys.path
['/Applications/MacPython-2.4/PythonIDE.app/Contents/Resources', '/Library/Frameworks/Python.framework/Versions/2.4/Mac/Tools/IDE', '/Applications/MacPython-2.4/PythonIDE.app/Contents/Resources', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python24.zip', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat- darwin', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat- mac', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat- mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib- tk', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib- dynload', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/py2app', '/Users/Chinook/Library/Python/2.4/site-packages', '/Users/Chinook/PythonWIP/PythonScripts', '/Users/Chinook/PythonProjects']
>>>


Thanks,
Lee C


_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to