From simon.brunning at gmail.com Thu Sep 1 16:59:05 2005 From: simon.brunning at gmail.com (Simon Brunning) Date: Thu, 1 Sep 2005 15:59:05 +0100 Subject: [Pythonmac-SIG] Python 2.4.1 not replacing earlier versions. In-Reply-To: <4316028F.7000206@ucsd.edu> References: <8c7f10c60508300953742b2874@mail.gmail.com> <8dc0c28f05083011594b8ca217@mail.gmail.com> <8c7f10c605083106562457c074@mail.gmail.com> <8dc0c28f05083108266c8ac273@mail.gmail.com> <8c7f10c605083108474a863cce@mail.gmail.com> <3f085ecd050831115310490917@mail.gmail.com> <4316028F.7000206@ucsd.edu> Message-ID: <8c7f10c605090107592058d5c9@mail.gmail.com> On 8/31/05, Robert Kern wrote: > It selects the first executable named "python" in the PATH. The shebang > line requires an explicit executable. For example, Thanks, All. I've got it all working now, with your help. I'm glad to see that the Python Mac community is as beyond-the-call helpful as the rest of Pythondom. ;-) -- Cheers, Simon B, simon at brunningonline.net, http://www.brunningonline.net/simon/blog/ From ronaldoussoren at mac.com Thu Sep 1 21:36:48 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 1 Sep 2005 21:36:48 +0200 Subject: [Pythonmac-SIG] py2app and Bittornado In-Reply-To: <4164bfb2050830164636b23b73@mail.gmail.com> References: <4164bfb2050830164636b23b73@mail.gmail.com> Message-ID: On 31-aug-2005, at 1:46, Brandon Sharitt wrote: > I'm trying to get Bittornado to run on Mac OS X (10.4 with Python > 2.3.5) but I've only ever dealt with Python at lower lever scripting > stuff, never wxPython or another GUI stuff. py2app is supposed to be > the tool to create Mac friendly Python applications(like py2exe on > Windows), but the documentation for py2app doesn't seem to be much > help. The setup.py script that comes with BitTornado doesn't run > when I > type python setup.py py2app and produces the following error: > > usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] > or: setup.py --help [cmd1 cmd2 ...] > or: setup.py --help-commands > or: setup.py cmd --help > > error: invalid command 'py2app' (no module named > 'distutils.command.py2app') That's because py2app isn't part of the core distutils. You have to update the setup.py file (and install py2app) if you want to use py2app. The py2app source distribution contains a number of examples, including some wxPython ones. Addapting from py2exe should be fairly straightforward because py2app uses a simular API. > > When I drag the script to PackageInstaller, it creates a Mac installer > package, but all that does is mostly copy the the sane stuff stuff to > /usr/local/bin and when I try to run btdownloadgui.py all I get is: > > Traceback (most recent call last): > File "btdownloadgui.py", line 29, in ? > from BitTornado.ConfigReader import configReader > File "/Library/Python/2.3/site-pack ages/BitTornado/ > ConfigReader.p y", > line 40, in ? > _CHECKINGCOLOR = > ColorToHex(wxSystemSettings_Ge tColour(wxSYS_COLOUR_3DSHADOW) ) > File > "/BinaryCache/wxWidgets/wxWidg ets-2.root~174/System/Library/ > Frameworks/Python.framework/Ve rsions/2.3/Extras/lib/python/w > x-2.5.3-mac-unicode/wx/_misc.p y", > line 145, in SystemSettings_GetColour > wx._core.PyNoAppError: The wx.App object must be created first! I don't know bittornado, but this is either a bug in that program or btdownloadgui.py is not the main entry point of the program. BTW. Unless btdownloadgui.py startswith '#!/usr/bin/env /usr/bin/ pythonw' (or ... /usr/local/bin/pythonw) it won't work anyway, the default python interpreter cannot start full-fledged GUI apps due to a "feature" of OSX. > I also made my own setup file using the sparse documentation on > py2app, but that just produces a broken app. Maybe I got the setup.py > wrong. > > Any help would be appreciated. Either reply to this or email me. > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From altern2 at gmail.com Fri Sep 2 10:29:43 2005 From: altern2 at gmail.com (altern) Date: Fri, 02 Sep 2005 10:29:43 +0200 Subject: [Pythonmac-SIG] opening an application from python Message-ID: <43180D77.3080905@gmail.com> hi I am trying to launch a sound application (Pure Data) from a python program. For this I am using this code: # execdir = os.path.dirname(sys.argv[0]) pdexc = os.path.join(execdir, "/Pd-0.38-4-extended-RC1.app/Contents/MacOS/Pd") arg = os.path.join(execdir, "audio.pd") os.spawnl(os.P_NOWAIT, pdexc, arg) # etc ... i need to pass arguments to the application, PD is a command line application so it can be run from the terminal and several start up flags can be passed. My problem is that it kind of runs but not properly. I get the process running, it is there if i do 'top' on the terminal. But the application never fully opens. I was wondering if there is some problem with doing this from Python, or if i should be using some other command. thanks! -- altern From bob at redivi.com Fri Sep 2 10:59:43 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 2 Sep 2005 01:59:43 -0700 Subject: [Pythonmac-SIG] opening an application from python In-Reply-To: <43180D77.3080905@gmail.com> References: <43180D77.3080905@gmail.com> Message-ID: <95A737E0-5104-459C-9A25-61976C11F6EA@redivi.com> On Sep 2, 2005, at 1:29 AM, altern wrote: > hi > > I am trying to launch a sound application (Pure Data) from a python > program. For this I am using this code: > # > execdir = os.path.dirname(sys.argv[0]) > pdexc = os.path.join(execdir, > "/Pd-0.38-4-extended-RC1.app/Contents/MacOS/Pd") > arg = os.path.join(execdir, "audio.pd") > os.spawnl(os.P_NOWAIT, pdexc, arg) > # etc ... > > i need to pass arguments to the application, PD is a command line > application so it can be run from the terminal and several start up > flags can be passed. > > My problem is that it kind of runs but not properly. I get the process > running, it is there if i do 'top' on the terminal. But the > application > never fully opens. I was wondering if there is some problem with doing > this from Python, or if i should be using some other command. You should be using LaunchServices to launch the process with an open document event, directly or indirectly. You can do that with PyObjC, or with Python 2.4's LaunchServices module, or with /usr/bin/open (man open). -bob From aryeh at bigfoot.com Fri Sep 2 11:00:24 2005 From: aryeh at bigfoot.com (ah) Date: Fri, 2 Sep 2005 11:00:24 +0200 Subject: [Pythonmac-SIG] general bundle question Message-ID: <002301c5af9c$c17f46b0$f30101c0@dev03> Hello all, Can someone on the list be kind enough to explain why my bundle (created with bundlebuider) won't start when I double click it in the finder or when I type : >open MyApp.app but runs fine when I type : >MyApp.app/Contents/MacOs/Myapp in a terminal window. The icon of my bundle won't show either in the finder, but appears nicely in the dock when the app runs. Any help would be greatly appreciated. Arye. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050902/46e5ea2f/attachment.html From altern2 at gmail.com Fri Sep 2 13:13:34 2005 From: altern2 at gmail.com (altern) Date: Fri, 02 Sep 2005 13:13:34 +0200 Subject: [Pythonmac-SIG] opening an application from python In-Reply-To: <95A737E0-5104-459C-9A25-61976C11F6EA@redivi.com> References: <43180D77.3080905@gmail.com> <95A737E0-5104-459C-9A25-61976C11F6EA@redivi.com> Message-ID: <431833DE.6070702@gmail.com> Bob Ippolito(e)k dio: > > On Sep 2, 2005, at 1:29 AM, altern wrote: > >> hi >> >> I am trying to launch a sound application (Pure Data) from a python >> program. For this I am using this code: >> # >> execdir = os.path.dirname(sys.argv[0]) >> pdexc = os.path.join(execdir, >> "/Pd-0.38-4-extended-RC1.app/Contents/MacOS/Pd") >> arg = os.path.join(execdir, "audio.pd") >> os.spawnl(os.P_NOWAIT, pdexc, arg) >> # etc ... >> >> i need to pass arguments to the application, PD is a command line >> application so it can be run from the terminal and several start up >> flags can be passed. >> >> My problem is that it kind of runs but not properly. I get the process >> running, it is there if i do 'top' on the terminal. But the application >> never fully opens. I was wondering if there is some problem with doing >> this from Python, or if i should be using some other command. > > > You should be using LaunchServices to launch the process with an open > document event, directly or indirectly. You can do that with PyObjC, > or with Python 2.4's LaunchServices module, or with /usr/bin/open (man > open). > > -bob quite obvious, of course. sometimes it is difficult to see in front of oneself :) thanks bob, i will try all this -- altern From teemu.rinne at helsinki.fi Fri Sep 2 15:41:57 2005 From: teemu.rinne at helsinki.fi (Teemu Rinne) Date: Fri, 02 Sep 2005 16:41:57 +0300 Subject: [Pythonmac-SIG] matplotlib vector graphics Message-ID: <75E455D60AA92ABC7C845138@ag5.psych.helsinki.fi> Hi, Can the vector based backends (PS or SVG) be used on OS X? If so, could someone provide examples. I am using the binary package (Panther) from pythonmac -- Teemu Rinne Dept Psych Univ Helsinki From meesters at uni-mainz.de Fri Sep 2 15:54:30 2005 From: meesters at uni-mainz.de (Christian Meesters) Date: Fri, 2 Sep 2005 15:54:30 +0200 Subject: [Pythonmac-SIG] matplotlib vector graphics In-Reply-To: <75E455D60AA92ABC7C845138@ag5.psych.helsinki.fi> References: <75E455D60AA92ABC7C845138@ag5.psych.helsinki.fi> Message-ID: <67d81c2ff57c969cda2415f35bbcbe5f@uni-mainz.de> Hi Teemu, Sure, why not? It works like in the examples provided with matplotlib. For Example: import matplotlib matplotlib.use('Agg') import pylab pylab.plot(list1,list2,'k-') pylab.title("some title") pylab.xlabel('some unit label') pylab.ylabel('some different unit label') pylab.savefig("filename.ps") Note though, that you need to set matplotlib.use under such circumstances to 'Agg', for otherwise matplotlib will complain when importing pylab that you (as I presume) don't have gtk, which is the default backend. You can use the rc-parameterfile as well and don't have to change these settings in every script. Hope I could help. Cheers, Christian On 2 Sep 2005, at 15:41, Teemu Rinne wrote: > Hi, > > Can the vector based backends (PS or SVG) be used on OS X? If so, could > someone provide examples. > > I am using the binary package (Panther) from pythonmac > > > -- > Teemu Rinne > Dept Psych > Univ Helsinki > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From smithsm at samuelsmith.org Fri Sep 2 16:13:42 2005 From: smithsm at samuelsmith.org (Samuel M. Smith) Date: Fri, 2 Sep 2005 08:13:42 -0600 Subject: [Pythonmac-SIG] matplotlib vector graphics In-Reply-To: <67d81c2ff57c969cda2415f35bbcbe5f@uni-mainz.de> References: <75E455D60AA92ABC7C845138@ag5.psych.helsinki.fi> <67d81c2ff57c969cda2415f35bbcbe5f@uni-mainz.de> Message-ID: <8851C5E3-66A0-49CB-8432-90AF52F3862A@samuelsmith.org> I just started using matplotlib a couple of weeks ago. And it will generate .ps files. I am using matplotlib 0.83.2 with python 2.41 framework on 10.4.2 but I have problems with the font definitions in the .ps or .eps files. When I try to convert them to .pdf I get an error in distiller, preview, and epstopdf. If I don't have any text on the plot then it doesn't have the error and converts fine. I had the same problem with matplotlib 0.82 Anyone here successfully converted the matplotlib .ps files to .pdf? I would like to know how to get mine to work. I don't know if it is a configuration problem or if the postscript font definition code is broken on os x. I just posted this on the matplotlib user group as well. On 02 Sep, 2005, at 07:54, Christian Meesters wrote: > Hi Teemu, > > Sure, why not? It works like in the examples provided with matplotlib. > For Example: > > import matplotlib > matplotlib.use('Agg') > import pylab > > pylab.plot(list1,list2,'k-') > pylab.title("some title") > pylab.xlabel('some unit label') > pylab.ylabel('some different unit label') > > pylab.savefig("filename.ps") > > Note though, that you need to set matplotlib.use under such > circumstances to 'Agg', for otherwise matplotlib will complain when > importing pylab that you (as I presume) don't have gtk, which is the > default backend. You can use the rc-parameterfile as well and don't > have to change these settings in every script. > > Hope I could help. > > Cheers, > Christian > > On 2 Sep 2005, at 15:41, Teemu Rinne wrote: > > >> Hi, >> >> Can the vector based backends (PS or SVG) be used on OS X? If so, >> could >> someone provide examples. >> >> I am using the binary package (Panther) from pythonmac >> >> >> -- >> Teemu Rinne >> Dept Psych >> Univ Helsinki >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > ********************************************************************** Samuel M. Smith Ph.D. 2966 Fort Hill Road Eagle Mountain, Utah 84043 801-768-2768 voice 801-768-2769 fax ********************************************************************** "The greatest source of failure and unhappiness in the world is giving up what we want most for what we want at the moment" ********************************************************************** From Teemu.Rinne at helsinki.fi Fri Sep 2 23:27:39 2005 From: Teemu.Rinne at helsinki.fi (Teemu Rinne) Date: Sat, 03 Sep 2005 00:27:39 +0300 Subject: [Pythonmac-SIG] matplotlib vector graphics In-Reply-To: <67d81c2ff57c969cda2415f35bbcbe5f@uni-mainz.de> References: <75E455D60AA92ABC7C845138@ag5.psych.helsinki.fi> <67d81c2ff57c969cda2415f35bbcbe5f@uni-mainz.de> Message-ID: Thanks Christian, it does work, on one Mac out of three... It works on my laptop with matplotlib and stuff installed several months ago. It does not work on a Panther G5 with a newly installed matplotlib (pythonmac). It does not work on an out-of-the box Tiger with matplotlib (pythonmac) installed. "It works" means that the test script (below) runs ok and the ps file (144 K) behaves as expected. "Does not work" means that the script runs but produces a 4.4 M (!) file which looks ok but cannot be opened (preview, ghostscript). Maybe something in addition to the pythomac matplotlib package is needed (maybe I already have this missing package somewhere in the sediments of my laptop) for PS to behave nicely. What? Any other ideas? -- Teemu --On Friday, September 2, 2005 3:54 PM +0200 Christian Meesters wrote: > Hi Teemu, > > Sure, why not? It works like in the examples provided with matplotlib. > For Example: > > import matplotlib > matplotlib.use('Agg') > import pylab > > pylab.plot(list1,list2,'k-') > pylab.title("some title") > pylab.xlabel('some unit label') > pylab.ylabel('some different unit label') > > pylab.savefig("filename.ps") > > Note though, that you need to set matplotlib.use under such circumstances > to 'Agg', for otherwise matplotlib will complain when importing pylab > that you (as I presume) don't have gtk, which is the default backend. You > can use the rc-parameterfile as well and don't have to change these > settings in every script. > > Hope I could help. > > Cheers, > Christian > > On 2 Sep 2005, at 15:41, Teemu Rinne wrote: > >> Hi, >> >> Can the vector based backends (PS or SVG) be used on OS X? If so, could >> someone provide examples. >> >> I am using the binary package (Panther) from pythonmac >> >> >> -- >> Teemu Rinne >> Dept Psych >> Univ Helsinki >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > From Chris.Barker at noaa.gov Fri Sep 2 23:52:52 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Fri, 02 Sep 2005 14:52:52 -0700 Subject: [Pythonmac-SIG] Python 2.4.1 not replacing earlier versions. In-Reply-To: <3f085ecd050831115310490917@mail.gmail.com> References: <8c7f10c60508300953742b2874@mail.gmail.com> <8dc0c28f05083011594b8ca217@mail.gmail.com> <8c7f10c605083106562457c074@mail.gmail.com> <8dc0c28f05083108266c8ac273@mail.gmail.com> <8c7f10c605083108474a863cce@mail.gmail.com> <3f085ecd050831115310490917@mail.gmail.com> Message-ID: <4318C9B4.7050508@noaa.gov> Just to add my $0.02 for completeness: People use: #!/usr/bin/env python so that the script will work on any system with a python on the PATH, whether it's in /usr/bin or /usr/local/bin or wherever else. Particularly on Linux systems, python gets installed different places depending on whether it's supplied by the distribution or installed separately. I personally like this approach. Some suggest that you put /usr/local/bin on your path ahead of /usr/bin so that your shell will find the your user-installed python first. This works fine except for a couple things: 1) if the script is run in someone else's shell that hasn't been set up that way, it won't work. 2) if there is something else in /usr/local/bin that is the same as a counterpart in /usr/bin, you could accidentally cause problems there. 3) What happens when you install python2.5 and have a bunch of scripts still relying on 2.4? My thought is that you want to control what a python script does, NOT what your shell does. In this case, what you want is for your script to use python2.4, rather than "the python that happens to be first on the path", or "the python that happens to be in /usr/local/bin", so what you do is put: #!/usr/bin/env python2.4 At the top. This guarantees that that script will use python2.4, and also documents, for all to see, that that's the version of python that it's been tested on. When installing packages, use: python2.4 setup.py install. I think the standard installers put a "python2.4" as well as "python" in usr/local/bin. If they don't, they should, and until then, you can put in a link yourself: cd /usr/local/bin sudo ln python python2.4 (untested) I really wish specifying the version would become standard practice in python development. -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 at noaa.gov From bob at redivi.com Sat Sep 3 00:52:34 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 2 Sep 2005 15:52:34 -0700 Subject: [Pythonmac-SIG] Python 2.4.1 not replacing earlier versions. In-Reply-To: <4318C9B4.7050508@noaa.gov> References: <8c7f10c60508300953742b2874@mail.gmail.com> <8dc0c28f05083011594b8ca217@mail.gmail.com> <8c7f10c605083106562457c074@mail.gmail.com> <8dc0c28f05083108266c8ac273@mail.gmail.com> <8c7f10c605083108474a863cce@mail.gmail.com> <3f085ecd050831115310490917@mail.gmail.com> <4318C9B4.7050508@noaa.gov> Message-ID: On Sep 2, 2005, at 2:52 PM, Chris Barker wrote: > Just to add my $0.02 for completeness: > > I think the standard installers put a "python2.4" as well as "python" > in usr/local/bin. If they don't, they should, and until then, you can > put in a link yourself: Of course the standard installers make this link. What they are missing (the framework ones anyway) is a link for pydoc, and all of them are missing a versioned pydoc binary. This matters less now, because python2.4 -mpydoc works just fine, and python2.4 `which pydoc` also works fine (for versions of python earlier than 2.4, also). > I really wish specifying the version would become standard practice in > python development. That cuts both ways, for a lot of scripts you don't give a damn which python it is and changing the hash-bang every time you upgrade is a pain. If you use distutils to install your scripts, your job is done. It translates #!/usr/bin/env python to #!/usr/local/bin/python2.4 or whatever is the appropriate way to point to the exact same python that was used for distutils. -bob From Chris.Barker at noaa.gov Sat Sep 3 01:15:28 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Fri, 02 Sep 2005 16:15:28 -0700 Subject: [Pythonmac-SIG] Python 2.4.1 not replacing earlier versions. In-Reply-To: References: <8c7f10c60508300953742b2874@mail.gmail.com> <8dc0c28f05083011594b8ca217@mail.gmail.com> <8c7f10c605083106562457c074@mail.gmail.com> <8dc0c28f05083108266c8ac273@mail.gmail.com> <8c7f10c605083108474a863cce@mail.gmail.com> <3f085ecd050831115310490917@mail.gmail.com> <4318C9B4.7050508@noaa.gov> Message-ID: <4318DD10.4080202@noaa.gov> Bob Ippolito wrote: >> I really wish specifying the version would become standard practice in >> python development. > > That cuts both ways, for a lot of scripts you don't give a damn which > python it is and changing the hash-bang every time you upgrade is a pain. True. I actually make a choice for a given script. If it's really basic python, then I just use "python", but if it uses a bunch of external modules, each of which needs a compatible version anyway, changing the #! line on the top level script is the least of your worries. Also, I tend to keep old versions of python around when I install new ones, so all the old stuff just keeps running. > If you use distutils to install your scripts, your job is done. It > translates #!/usr/bin/env python to #!/usr/local/bin/python2.4 or > whatever is the appropriate way to point to the exact same python that > was used for distutils. Cool! It had never dawned upon me to use distutils to install scripts, I've only used it for modules. As usual, Bob, you're a font of useful knowledge. -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 at noaa.gov From mbaxter at telia.com Sat Sep 3 01:17:09 2005 From: mbaxter at telia.com (Mark Baxter) Date: Sat, 3 Sep 2005 01:17:09 +0200 Subject: [Pythonmac-SIG] PySerial not working on Tiger Message-ID: <934ECFF3-7F00-401E-85E3-EB60BF11148E@telia.com> Hi all. Sorry if this is really basic, but I've been tearing my hair out searching all over the place. I'm a complete beginner to Python (but not programming in general, I'm more of a C++ man normally). I am trying to install PySerial on a basic MacPython installation on 10.4. As is suggested by the PySerial website I typed "sudo python setup.py install" and then tried the examples. Python just doesn't seem to believe that PySerial exists. I created a simple program just to import PySerial and create a serial instance: #!/usr/bin/env python import serial ser = serial.Serial() And all I get for my troubles when I type "python serial.py" is: Traceback (most recent call last): File "serial.py", line 10, in ? import serial File "/Users/myb/Python Serial/serial.py", line 11, in ? ser = serial.Serial() AttributeError: 'module' object has no attribute 'Serial' From what I have read online I am not sure that installing PySerial has put the right files in the right place. The only PySerial files I can find are in /Library/Python/2.3/site-packages/serial and consists of just these files: __init__.py serialjava.py serialposix.py serialutil.py serialwin32.py __init__.pyc serialjava.pyc serialposix.pyc serialutil.pyc serialwin32.pyc Have I done something obviously wrong (and probably embarressingly amateur), for example screwing up the install of PySerial? I haven't installed a new version of Python. Thanks for any help. Mark Baxter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050903/62ee9293/attachment-0001.htm From bob at redivi.com Sat Sep 3 01:57:06 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 2 Sep 2005 16:57:06 -0700 Subject: [Pythonmac-SIG] PySerial not working on Tiger In-Reply-To: <934ECFF3-7F00-401E-85E3-EB60BF11148E@telia.com> References: <934ECFF3-7F00-401E-85E3-EB60BF11148E@telia.com> Message-ID: On Sep 2, 2005, at 4:17 PM, Mark Baxter wrote: > Hi all. > > Sorry if this is really basic, but I've been tearing my hair out > searching all over the place. I'm a complete beginner to Python > (but not programming in general, I'm more of a C++ man normally). > > I am trying to install PySerial on a basic MacPython installation > on 10.4. As is suggested by the PySerial website I typed "sudo > python setup.py install" and then tried the examples. Python just > doesn't seem to believe that PySerial exists. > > I created a simple program just to import PySerial and create a > serial instance: > > #!/usr/bin/env python > import serial > ser = serial.Serial() > > And all I get for my troubles when I type "python serial.py" is: > > Traceback (most recent call last): > File "serial.py", line 10, in ? > import serial > File "/Users/myb/Python Serial/serial.py", line 11, in ? > ser = serial.Serial() > AttributeError: 'module' object has no attribute 'Serial' Don't name your module serial. -bob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050902/f7e905d5/attachment.html From mbaxter at telia.com Sat Sep 3 02:02:56 2005 From: mbaxter at telia.com (Mark Baxter) Date: Sat, 3 Sep 2005 02:02:56 +0200 Subject: [Pythonmac-SIG] PySerial not working on Tiger In-Reply-To: References: <934ECFF3-7F00-401E-85E3-EB60BF11148E@telia.com> Message-ID: On Sep 3, 2005, at 1:57 AM, Bob Ippolito wrote: > > Don't name your module serial. > > -bob > Is there any particular reason why? The PySerial website (http:// pyserial.sourceforge.net/) seems to think that it works and all I have done is try to follow the examples. /MB -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050903/4cb455be/attachment.htm From bob at redivi.com Sat Sep 3 02:05:17 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 2 Sep 2005 17:05:17 -0700 Subject: [Pythonmac-SIG] PySerial not working on Tiger In-Reply-To: References: <934ECFF3-7F00-401E-85E3-EB60BF11148E@telia.com> Message-ID: <2532EA1D-870C-4C47-84C4-75F222660434@redivi.com> On Sep 2, 2005, at 5:02 PM, Mark Baxter wrote: > > On Sep 3, 2005, at 1:57 AM, Bob Ippolito wrote: > >> >> Don't name your module serial. >> > > Is there any particular reason why? The PySerial website (http:// > pyserial.sourceforge.net/) seems to think that it works and all I > have done is try to follow the examples. Because "import serial" imports whatever thing it finds named serial, and it's not finding PySerial because you have a module named serial.py. If the PySerial documentation says "name your script serial.py", then it's dumb because that won't work. -bob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050902/9e3bbab0/attachment.html From mbaxter at telia.com Sat Sep 3 02:22:24 2005 From: mbaxter at telia.com (Mark Baxter) Date: Sat, 3 Sep 2005 02:22:24 +0200 Subject: [Pythonmac-SIG] PySerial not working on Tiger In-Reply-To: <2532EA1D-870C-4C47-84C4-75F222660434@redivi.com> References: <934ECFF3-7F00-401E-85E3-EB60BF11148E@telia.com> <2532EA1D-870C-4C47-84C4-75F222660434@redivi.com> Message-ID: <43F020A5-1FEB-430F-A45D-3EB05C05BAA3@telia.com> On Sep 3, 2005, at 2:05 AM, Bob Ippolito wrote: > > Because "import serial" imports whatever thing it finds named > serial, and it's not finding PySerial because you have a module > named serial.py. If the PySerial documentation says "name your > script serial.py", then it's dumb because that won't work. > > -bob > It didn't give any example filename. I wish to test something involving a serial port before going in to full development, hence the Python usage and hence "serial.py" seemed a fairly logical name based on what I was trying to do. Thanks for the explanation of why I shouldn't have done that. I have now renamed it to "my_test.py" and am now getting somewhere. No errors at least. I was sure it was something basic and obvious (to a Python developer) and I was right. I'll remember that one for sure. Thanks also to Robert for giving me the same advice. /MB -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050903/e7192cb9/attachment.html From trentm at ActiveState.com Sat Sep 3 02:48:20 2005 From: trentm at ActiveState.com (Trent Mick) Date: Fri, 2 Sep 2005 17:48:20 -0700 Subject: [Pythonmac-SIG] Python 2.4.1 not replacing earlier versions. In-Reply-To: References: <8c7f10c60508300953742b2874@mail.gmail.com> <8dc0c28f05083011594b8ca217@mail.gmail.com> <8c7f10c605083106562457c074@mail.gmail.com> <8dc0c28f05083108266c8ac273@mail.gmail.com> <8c7f10c605083108474a863cce@mail.gmail.com> <3f085ecd050831115310490917@mail.gmail.com> <4318C9B4.7050508@noaa.gov> Message-ID: <20050903004820.GA4824@ActiveState.com> [Bob Ippolito wrote] > Of course the standard installers make this link. What they are > missing (the framework ones anyway) is a link for pydoc, ActivePython installs a /usr/local/bin/pydoc... > and all of > them are missing a versioned pydoc binary. ...but not a versioned one. Trent -- Trent Mick TrentM at ActiveState.com From alex at tweedly.net Sat Sep 3 14:38:34 2005 From: alex at tweedly.net (Alex Tweedly) Date: Sat, 03 Sep 2005 13:38:34 +0100 Subject: [Pythonmac-SIG] Python based apps woes on MacOs X (was :Re: [Pythoncard-users] Re: PythonCard on OS X 10.4 with Python 2.4.1) In-Reply-To: References: Message-ID: <4319994A.603@tweedly.net> catonano at inwind.it wrote: > Yes, Alex, you're right. It was a supposed bug when I opened the > thread, so the subject line was quite good at the moment. > > >Later it became a bit obscure ;-) > > > OK - as long as you didn't think anyone was doubting that it was a bug .... > > >>Something appears to have changed wrt the path that Python's sys.modules >>reports for imported files. >> >> > > > >>As far as I know, no-one has yet verified >>for sure whether it is a Python bug or merely a platform-specific change >>that Pythoncard will need to adjust for. (Nor do I know how we'll be >>able to adjust - but I'm hoping that some of the PythonCard / Mac users >>are investigating ....) >> >> > >That python user could be me ! > >Alex, would you discuss a bit more about this Python issue ? > > > Sure, I'll talk about it some, and maybe try to distill it down to a simple small program that would be easy to try out. But first I'll give a few disclaimers. - I was totally unaware of this part of the code until this topic came up - I'm not a Python details kind of guy - I don't have, or have access to, a Mac (So if Kevin has to come along and correct anything I say - don't be too surprised). >sys.modules reportings about the imported files has changed ? >Since when ? > >Does this affect the Apple installed python or the "third parties" ones ? > > No real idea since when. First guess would be between Python 2.3.something and Python 2.4.something. I have a vague idea that Apple installed python is 2.3, so it shouldn't be affected (but that's only a guess). The issue is how PythonCard finds the resource files that go along with a Python source file. By default, they live in the same directory as the source file, and have an extra ".rsrc" appended to the base name (before the extension) - thus a source file xyz.py would have a resource file xyz.rsrc.py PythonCard allows for various alternatives (language specific resource files, platform specific files, no file but an internal dictionary, etc.) and these make the code somewhat harder to follow. But if you ignore all those, the essence of what PythonCard does is 1. determine the full path name for the source file 2. modify it as above 3. read and eval() the resource file. In this case, the source file is not the application itself, but an imported module. In the resourceEditor (in resourceEditor.py, in fact), we do (before Kevin's suggested modification) from modules.propertyEditor import PropertyEditor .... self.propertyEditorWindow = model.childWindow(self, PropertyEditor) (or, after Kevin's suggested modification) from modules import propertyEditor .... self.propertyEditorWindow = model.childWindow(self, propertyEditor.PropertyEditor) (modules is a subdirectory within resourceEditor, propertyEditor.py is a source file, PropertyEditor is a class within that file). So these two should be equivalent; Kevin suggested the change because this is the only place within PythonCard that this form of import is used - every other import is the second form (and there was some hope that this change would help). I'll use the second version in this example below .... and probably get some of the terminology wrong. When you call model.childWindow, you pass in the class you want - i.e. propertyEditor.PropertyEditor childWindow() then derives the filename, splits off the extension, adds in the .rsrc.py and tries to read that file (remember I'm skipping over the internationalization part ...) So it does [ frameClass is the class wanted ] filename = sys.modules[frameClass.__module__].__file__ ..... base, ext = os.path.splitext(filename) filename = internationalResourceName(base) rsrc = resource.ResourceFile(filename).getResource() So - that's the background. Brad sent the debug output from the first case above (before Kevin's suggested change), and also reported that the problem persisted after the change. So it looks likely that it's a Python bug. The Python docs are very sparse on what sys.modules should do. I'd like to see a simple test output which is independent of PythonCard. 1. Create a test directory mine is called C:/python/projects/modulestest 2. create a subdirectory called "mmm" (calling it "modules" was confusing me) 3. create a file within that subdirectory called myFile.py containing > class myClass: > def init(): > pass 4. create another tile in that subdirectory (to make it a package) called __init__.py containing > # turn modules into a package (note the name is underscore underscore i n i t underscore underscore . p y ) 5. cd to the main test directory > cd c:\python\projects\modulestest 6. run python, and do > import sys > from mmm import myFile > myFile.myClass.__module__ > sys.modules[myFile.myClass.__module__].__file__ and see what the output is. It *should* be the path name to the file .... screen capture This gives the same result on Python 2.4.1 on Windows. I'd like to see the equivalent of this on each of Python 2.3 and 2.4 on Mac. Then we'd know what the next step might be ... :-) -- Alex Tweedly http://www.tweedly.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050903/057ea05e/attachment-0001.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: screen.PNG Type: image/png Size: 17272 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050903/057ea05e/screen-0001.png -------------- next part -------------- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.18/86 - Release Date: 31/08/2005 From crawford at goingware.com Sat Sep 3 23:00:47 2005 From: crawford at goingware.com (Michael Crawford) Date: Sat, 03 Sep 2005 18:00:47 -0300 Subject: [Pythonmac-SIG] Run Tkinter from PythonIDE? Message-ID: <431A0EFF.4050508@goingware.com> Greetings, I just joined the list. I just built Python from source so I could do GUI programming on OS X. When I try to run a very simple Tkinter script from the IDE, it immediately quits, crashes I guess. But it runs OK when I try it from the command line in Terminal. Here is all it is: from Tkinter import * w = Button( text="Hello", command='exit' ) w.pack() w.mainloop() It's on page 22 of Lutz & Ascher's Learning Python. My guess is that running an event loop from a script disrupts the IDE's event loop. Is that the case? If so, is there a way I can do Tkinter testing from the IDE? I'm sorry if this is a FAQ. If you can direct me to it I'm happy to go read it. Possibly I have a bug in Tk or Tcl. I got a segment violation when running Tcl's "make test". I haven't tried to diagnose it yet. Here are the versions of everything: Mac OS X 10.3.9 Python 2.4.1 tk 8.4.11 tcl 8.4.11 XCode 1.5 XCode update: November 2004 GCC updater gcc version 3.3 20030304 (Apple Computer, Inc. build 1671) ld Apple Computer, Inc. version cctools-525.1.obj~8 This is the first time I've done any Python on the Mac. Previously I've only done it on Linux. Thanks! Michael D. Crawford crawford at goingware.com Read "GoingWare's Bag of Programming Tricks" at: http://www.goingware.com/tips/ From ronaldoussoren at mac.com Sun Sep 4 11:17:41 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 4 Sep 2005 11:17:41 +0200 Subject: [Pythonmac-SIG] Python based apps woes on MacOs X (was :Re: [Pythoncard-users] Re: PythonCard on OS X 10.4 with Python 2.4.1) In-Reply-To: <4319994A.603@tweedly.net> References: <4319994A.603@tweedly.net> Message-ID: <7B3D1657-A9B2-4BD3-B2F0-41C631AD0EF2@mac.com> On 3-sep-2005, at 14:38, Alex Tweedly wrote: > catonano at inwind.it wrote: >> Yes, Alex, you're right. It was a supposed bug when I opened the >> thread, so the subject line was quite good at the moment. >> Later it became a bit obscure ;-) > OK - as long as you didn't think anyone was doubting that it was a > bug .... >>> Something appears to have changed wrt the path that Python's >>> sys.modules reports for imported files. >>> As far as I know, no-one has yet verified for sure whether it is >>> a Python bug or merely a platform-specific change that Pythoncard >>> will need to adjust for. (Nor do I know how we'll be able to >>> adjust - but I'm hoping that some of the PythonCard / Mac users >>> are investigating ....) >> That python user could be me ! Alex, would you discuss a bit more >> about this Python issue ? > Sure, I'll talk about it some, and maybe try to distill it down to > a simple small program that would be easy to try out. > But first I'll give a few disclaimers. > - I was totally unaware of this part of the code until this topic > came up > - I'm not a Python details kind of guy > - I don't have, or have access to, a Mac > > (So if Kevin has to come along and correct anything I say - don't > be too surprised). >> sys.modules reportings about the imported files has changed ? >> Since when ? Does this affect the Apple installed python or the >> "third parties" ones ? > No real idea since when. First guess would be between Python > 2.3.something and Python 2.4.something. > > I have a vague idea that Apple installed python is 2.3, so it > shouldn't be affected (but that's only a guess). > > The issue is how PythonCard finds the resource files that go along > with a Python source file. By default, they live in the same > directory as the source file, and have an extra ".rsrc" appended to > the base name (before the extension) - thus a source file xyz.py > would have a resource file xyz.rsrc.py > > PythonCard allows for various alternatives (language specific > resource files, platform specific files, no file but an internal > dictionary, etc.) and these make the code somewhat harder to > follow. But if you ignore all those, the essence of what PythonCard > does is > > 1. determine the full path name for the source file > 2. modify it as above > 3. read and eval() the resource file. > > In this case, the source file is not the application itself, but an > imported module. In the resourceEditor (in resourceEditor.py, in > fact), we do > > (before Kevin's suggested modification) > from modules.propertyEditor import PropertyEditor > .... > self.propertyEditorWindow = model.childWindow(self, > PropertyEditor) > > (or, after Kevin's suggested modification) > from modules import propertyEditor > .... > self.propertyEditorWindow = model.childWindow(self, > propertyEditor.PropertyEditor) > > (modules is a subdirectory within resourceEditor, propertyEditor.py > is a source file, PropertyEditor is a class within that file). > > So these two should be equivalent; Kevin suggested the change > because this is the only place within PythonCard that this form of > import is used - every other import is the second form (and there > was some hope that this change would help). > > I'll use the second version in this example below .... and probably > get some of the terminology wrong. > > When you call model.childWindow, you pass in the class you want - > i.e. propertyEditor.PropertyEditor > childWindow() then derives the filename, splits off the extension, > adds in the .rsrc.py and tries to read that file (remember I'm > skipping over the internationalization part ...) > > So it does [ frameClass is the class wanted ] > > filename = sys.modules[frameClass.__module__].__file__ > ..... > base, ext = os.path.splitext(filename) > filename = internationalResourceName(base) > rsrc = resource.ResourceFile(filename).getResource() I haven't followed this discusion upto now, but do you use py2app to build the application bundle on OSX? py2app places all .py/.pyc files into a zip file, resources are outside of the zip file. BTW. do you know about setuptools? It contains a generic API for dealing with resource files. > > > So - that's the background. > > Brad sent the debug output from the first case above (before > Kevin's suggested change), and also reported that the problem > persisted after the change. So it looks likely that it's a Python > bug. The Python docs are very sparse on what sys.modules should do. I'd say it is unlikely to be a bug in Python :-) > > I'd like to see a simple test output which is independent of > PythonCard. > > 1. Create a test directory > mine is called C:/python/projects/modulestest > > 2. create a subdirectory called "mmm" (calling it "modules" was > confusing me) > > 3. create a file within that subdirectory called myFile.py > containing >> class myClass: >> def init(): >> pass > 4. create another tile in that subdirectory (to make it a package) > called __init__.py containing >> # turn modules into a package > (note the name is underscore underscore i n i t underscore > underscore . p y ) > > 5. cd to the main test directory >> cd c:\python\projects\modulestest > 6. run python, and do >> import sys >> from mmm import myFile >> myFile.myClass.__module__ >> sys.modules[myFile.myClass.__module__].__file__ > and see what the output is. For what it's worth: Python 2.3.5 (#1, Mar 20 2005, 20:38:20) [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> from mmm import myFile >>> myFile.myClass.__module__ 'mmm.myFile' >>> myFile.__file__ 'mmm/myFile.pyc' >>> sys.modules[myFile.myClass.__module__].__file__ 'mmm/myFile.pyc' and: Python 2.4.1 (#1, Aug 23 2005, 21:38:15) [GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> from mmm import myFile >>> myFile.myClass.__module__ 'mmm.myFile' >>> myFile.__file__ 'mmm/myFile.py' >>> sys.modules[myFile.myClass.__module__].__file__ 'mmm/myFile.py' > > It *should* be the path name to the file .... > > > > > This gives the same result on Python 2.4.1 on Windows. > I'd like to see the equivalent of this on each of Python 2.3 and > 2.4 on Mac. > > Then we'd know what the next step might be ... :-) > > -- Alex Tweedly http://www.tweedly.net > > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.344 / Virus Database: 267.10.18/86 - Release Date: > 31/08/2005 > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050904/0927b748/smime.bin From ronaldoussoren at mac.com Sun Sep 4 11:21:46 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 4 Sep 2005 11:21:46 +0200 Subject: [Pythonmac-SIG] Run Tkinter from PythonIDE? In-Reply-To: <431A0EFF.4050508@goingware.com> References: <431A0EFF.4050508@goingware.com> Message-ID: <6F178ED1-5E71-4D70-9E01-87962F9931B5@mac.com> On 3-sep-2005, at 23:00, Michael Crawford wrote: > Greetings, > > I just joined the list. I just built Python from source so I could do > GUI programming on OS X. When I try to run a very simple Tkinter > script > from the IDE, it immediately quits, crashes I guess. Which IDE? If you're using the Python IDE I'd suggest moving to IDLE, the IDE does indeed have issues with running GUI code because scripts are started inside the IDE process, instead of running them as separate processes. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050904/2140b6fe/smime.bin From alex at tweedly.net Sun Sep 4 13:10:08 2005 From: alex at tweedly.net (Alex Tweedly) Date: Sun, 04 Sep 2005 12:10:08 +0100 Subject: [Pythonmac-SIG] Python based apps woes on MacOs X (was :Re: [Pythoncard-users] Re: PythonCard on OS X 10.4 with Python 2.4.1) In-Reply-To: <7B3D1657-A9B2-4BD3-B2F0-41C631AD0EF2@mac.com> References: <4319994A.603@tweedly.net> <7B3D1657-A9B2-4BD3-B2F0-41C631AD0EF2@mac.com> Message-ID: <431AD610.7040109@tweedly.net> Ronald Oussoren wrote: Thanks Ronald. I hadn't spotted that this was still being cc'ed to pythonmac-sig - so extra thanks for that. > > I haven't followed this discusion upto now, but do you use py2app to > build the application bundle on OSX? py2app places all .py/.pyc files > into a zip file, resources are outside of the zip file. > No, these problems are also being seen within the IDE, so it's not an app/bundle problem. > BTW. do you know about setuptools? It contains a generic API for > dealing with resource files. > Yes, and that looks like a promising way to do this in the future. (though it increases the dependencies). But this code has existed and worked for a couple of years now, it's important we know what's going wrong with it in case there are other (less obvious) things that are going to fail for the same reasons. >> So - that's the background. >> >> Brad sent the debug output from the first case above (before Kevin's >> suggested change), and also reported that the problem persisted >> after the change. So it looks likely that it's a Python bug. The >> Python docs are very sparse on what sys.modules should do. > > > I'd say it is unlikely to be a bug in Python :-) > So would I - but the evidence up till this email all pointed that way - and since this is (perhaps) an unusual use of the sys.modules info, it seems just possible. >> >> I'd like to see a simple test output which is independent of >> PythonCard. >> >> < snip > > > > For what it's worth: > > Python 2.3.5 (#1, Mar 20 2005, 20:38:20) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> from mmm import myFile > >>> myFile.myClass.__module__ > 'mmm.myFile' > >>> myFile.__file__ > 'mmm/myFile.pyc' > >>> sys.modules[myFile.myClass.__module__].__file__ > 'mmm/myFile.pyc' > > and: > Python 2.4.1 (#1, Aug 23 2005, 21:38:15) > [GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> from mmm import myFile > >>> myFile.myClass.__module__ > 'mmm.myFile' > >>> myFile.__file__ > 'mmm/myFile.py' > >>> sys.modules[myFile.myClass.__module__].__file__ > 'mmm/myFile.py' > Thanks again for that. (Not quite was I was hoping for :-), but very valuable info). So we now know this simplest case works as expected - and the rather complex case within PythonCard doesn't. It should be straightforward (if somewhat tedious) to narrow down the differences until we find where the difference is. But that's not the kind of debugging we can do via email on a list (or two!!), so I'm hoping a PythonCard / Mac user can take it from there (or will contact me off-list and we can work on narrowing it down). -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.18/86 - Release Date: 31/08/2005 From altis at semi-retired.com Sun Sep 4 18:10:06 2005 From: altis at semi-retired.com (Kevin Altis) Date: Sun, 4 Sep 2005 09:10:06 -0700 Subject: [Pythonmac-SIG] [Pythoncard-users] Re: Python based apps woes on MacOs X (was :Re: [Pythoncard-users] Re: PythonCard on OS X 10.4 with Python 2.4.1) In-Reply-To: <431AD610.7040109@tweedly.net> References: <4319994A.603@tweedly.net> <7B3D1657-A9B2-4BD3-B2F0-41C631AD0EF2@mac.com> <431AD610.7040109@tweedly.net> Message-ID: <9af4f4e1ffc20033eaa856d3373d41c7@semi-retired.com> On Sep 4, 2005, at 4:10 AM, Alex Tweedly wrote: > Ronald Oussoren wrote: > Thanks Ronald. I hadn't spotted that this was still being cc'ed to > pythonmac-sig - so extra thanks for that. > >> >> I haven't followed this discusion upto now, but do you use py2app to >> build the application bundle on OSX? py2app places all .py/.pyc files >> into a zip file, resources are outside of the zip file. >> > No, these problems are also being seen within the IDE, so it's not an > app/bundle problem. > >> BTW. do you know about setuptools? It contains a generic API for >> dealing with resource files. >> > Yes, and that looks like a promising way to do this in the future. > (though it increases the dependencies). > But this code has existed and worked for a couple of years now, it's > important we know what's going wrong with it in case there are other > (less obvious) things that are going to fail for the same reasons. > >>> So - that's the background. >>> >>> Brad sent the debug output from the first case above (before >>> Kevin's suggested change), and also reported that the problem >>> persisted after the change. So it looks likely that it's a Python >>> bug. The Python docs are very sparse on what sys.modules should do. >> >> >> I'd say it is unlikely to be a bug in Python :-) >> > So would I - but the evidence up till this email all pointed that way > - and since this is (perhaps) an unusual use of the sys.modules info, > it seems just possible. > >>> >>> I'd like to see a simple test output which is independent of >>> PythonCard. >>> >>> < snip > >> >> >> For what it's worth: >> >> Python 2.3.5 (#1, Mar 20 2005, 20:38:20) >> [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import sys >> >>> from mmm import myFile >> >>> myFile.myClass.__module__ >> 'mmm.myFile' >> >>> myFile.__file__ >> 'mmm/myFile.pyc' >> >>> sys.modules[myFile.myClass.__module__].__file__ >> 'mmm/myFile.pyc' >> >> and: >> Python 2.4.1 (#1, Aug 23 2005, 21:38:15) >> [GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import sys >> >>> from mmm import myFile >> >>> myFile.myClass.__module__ >> 'mmm.myFile' >> >>> myFile.__file__ >> 'mmm/myFile.py' >> >>> sys.modules[myFile.myClass.__module__].__file__ >> 'mmm/myFile.py' >> > Thanks again for that. (Not quite was I was hoping for :-), but very > valuable info). > > So we now know this simplest case works as expected - and the rather > complex case within PythonCard doesn't. > > It should be straightforward (if somewhat tedious) to narrow down the > differences until we find where the difference is. But that's not the > kind of debugging we can do via email on a list (or two!!), so I'm > hoping a PythonCard / Mac user can take it from there (or will contact > me off-list and we can work on narrowing it down). > > -- > Alex Tweedly http://www.tweedly.net I expect the problem has to do with relative paths. For some reason Python 2.4.1 is behaving different from 2.3 on the Mac as well as 2.3.x and 2.4.x versions on Windows and Linux. The reason why PythonCard tickles this problem is likely due to one or more lines in model.py. In particular, at the top there is a try/except block with the following line that was added as a fix for relative paths that would show up in earlier versions of Python when the module was imported: sys.path[0] = os.path.abspath(sys.path[0]) There was a discussion on python-dev quite a while ago that led to this line of code being used to prevent relative path ambiguity with the module path regardless of how the application changes its working directory. Here's an example run in the shell on the Mac with Python 2.3 (Panther). >>> import sys >>> sys.path[0] '' >>> import os >>> sys.path[0] = os.path.abspath(sys.path[0]) >>> sys.path[0] '/Users/kea/python/PythonCard' PythonCard does an explicit os.chdir later to the starting script directory to standardize behavior of apps regardless of where they were started from as well as simplify using support files, including modules that are in the application directory or sub-directories. self.applicationDirectory = util.dirname(os.path.abspath(sys.argv[0])) # always run in the app's directory os.chdir(self.applicationDirectory) Both of these bits of code, or equivalent in the case of the chdir above need to be part of a test prior to the path check for __file__. Since this is a relative path bug we're tracking down, it is quite possible that with Python 2.4.1 on the Mac you could get different results depending on whether you are running the script from the same directory you are working from in the shell, that was the reason for the sys.path[0] workaround in the first place. ka From catonano at inwind.it Sat Sep 3 09:26:49 2005 From: catonano at inwind.it (catonano@inwind.it) Date: Sat, 3 Sep 2005 09:26:49 +0200 Subject: [Pythonmac-SIG] Python based apps woes on MacOs X (was :Re: [Pythoncard-users] Re: PythonCard on OS X 10.4 with Python 2.4.1) Message-ID: > >There's a current thread about this in the PythonCard-users group, > >under the non-clear subject name: > > > > Re: update (was: Re: [Pythoncard-users] supposed bug in > >PythonCard) > > > > > >Yes I originated the thread. I found a bug in Pythoncard with python 2.4.1 and wxPython 2.6.1.0 and > >PythonCard 0.8.1 > > > >It's not "supposed". It's a quite clearly a bug. > > > > > > > Adriano - > the only reason the subject line says "supposed bug ..." is because > that's the subject line you chose for your initial posting to the > Pythoncard list on this topic :-) Yes, Alex, you're right. It was a supposed bug when I opened the thread, so the subject line was quite good at the moment. Later it became a bit obscure ;-) > Something appears to have changed wrt the path that Python's sys.modules > reports for imported files. >As far as I know, no-one has yet verified > for sure whether it is a Python bug or merely a platform-specific change > that Pythoncard will need to adjust for. (Nor do I know how we'll be > able to adjust - but I'm hoping that some of the PythonCard / Mac users > are investigating ....) That python user could be me ! Alex, would you discuss a bit more about this Python issue ? sys.modules reportings about the imported files has changed ? Since when ? Does this affect the Apple installed python or the "third parties" ones ? Thanks! Bye Adriano ____________________________________________________________ Libero Flat, sempre a 4 Mega a 19,95 euro al mese! Abbonati subito su http://www.libero.it From apple at macfreek.nl Mon Sep 5 13:29:41 2005 From: apple at macfreek.nl (Freek Dijkstra) Date: Mon, 05 Sep 2005 13:29:41 +0200 Subject: [Pythonmac-SIG] Installation of waste by MacPython installer Message-ID: <431C2C25.7000007@macfreek.nl> Hi, I just installed MacPython 2.3 (on my Mac with Tiger 10.4), and found that the IDE did not launch with this error in the console.log: Traceback (most recent call last): File "/Applications/MacPython/PythonIDE.app/ \ Contents/Resources/PythonIDE.py", line 58, in ? import PythonIDEMain as _PythonIDEMain File "/Applications/MacPython/PythonIDE.app/ \ Contents/Resources/PythonIDEMain.py", line 7, in ? import W File "/System/Library/Frameworks/Python.framework/ \ Versions/2.3/Mac/Tools/IDE/W.py", line 7, in ? from Wtext import * File "/System/Library/Frameworks/Python.framework/ \ Versions/2.3/Mac/Tools/IDE/Wtext.py", line 6, in ? import waste ImportError: No module named waste (included line-breaks for readability). The problem was solved relatively easy: I noticed that /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages points to /Library/Python/2.3/site-packages/ but that waste.so was installed (apparently by the MacPython 2.3) installer in /Library/Python/2.3/. mv /Library/Python/2.3/waste.so /Library/Python/2.3/site-packages/ did solve the problem, and PythonIDE did launch. Is this a bug in the installer? If so, where should I report this? I was able to solve this thanks to previous messages on this list, but maybe it's useful for other users if this is fixed in future version (perhaps the aforementioned symbolic link changed from /Library/Python/2.3/ to /Library/Python/2.3/site-packages/ since 10.4?) Kind regards, Freek Dijkstra From jgeraci at nemetschek.net Thu Sep 8 21:35:08 2005 From: jgeraci at nemetschek.net (Jeff Geraci) Date: Thu, 8 Sep 2005 15:35:08 -0400 Subject: [Pythonmac-SIG] Newbie embedding question Message-ID: Hello, I'm trying to embed the Python interpreter in a simple command-line application which I'm building with XCode 2.1. Although the application links, when I run it, I get the following error: "ZeroLink: unknown symbol '_Py_Initialize' I've Googled this and can't seem to find much information on this. Does anyone know offhand how to satisfy this link condition? As far as I can tell, I am linking with the Python Foundation module. Thanks, Jeff Geraci From bob at redivi.com Thu Sep 8 21:44:06 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 8 Sep 2005 12:44:06 -0700 Subject: [Pythonmac-SIG] Newbie embedding question In-Reply-To: References: Message-ID: <0E3B23A5-F150-4362-9636-7C89166788C9@redivi.com> On Sep 8, 2005, at 12:35 PM, Jeff Geraci wrote: > I'm trying to embed the Python interpreter in a simple command-line > application which I'm building with XCode 2.1. Although the > application > links, when I run it, I get the following error: > > "ZeroLink: unknown symbol '_Py_Initialize' > > I've Googled this and can't seem to find much information on this. > Does > anyone know offhand how to satisfy this link condition? As far as > I can > tell, I am linking with the Python Foundation module. Well, the first rule of embedding Python is that you probably shouldn't embed Python. It's generally preferable to have Python on the outside, and then whatever else on the inside loaded by extension modules. This is the most supported configuration on all platforms, and is the easiest to implement correctly. That said, it sounds like you need to link to Python.framework. However, this is tricky because it's likely that the next version of Mac OS X won't ship with Python 2.3, so your app could very well break if you link against the system Python... It's probably better to compile your own and statically link it in, but it really depends on what you're doing with Python. -bob From Teemu.Rinne at helsinki.fi Thu Sep 8 21:56:59 2005 From: Teemu.Rinne at helsinki.fi (Teemu Rinne) Date: Thu, 08 Sep 2005 22:56:59 +0300 Subject: [Pythonmac-SIG] matplotlib and postscript output Message-ID: Hi, I am still not able to figure out what is wrong with the postscript output of my new matplotlib installations (pythonmac binaries). Test script: import matplotlib matplotlib.use('Agg') from pylab import * plot(arange(5),arange(5),'k-') title("some title") xlabel('some unit label') ylabel('some different unit label') #this works as expected savefig("filename.png ") #this seems to work but the output file is too big (4.4M) and is somehow broken. savefig("filename.ps") The "broken" file looks like this: http://www.helsinki.fi/~tjrinne/matplotlib/filename.ps The fact that postscript output happens to be working (file size 144K) on one of my macs (with matplotlib and tons of other packages installed) makes me think that something is missing from my new installations. If matplotlib works with png output, should postscript work too or does it require something extra (say, upgrade of some package)? If I start from scratch with a tiger G5, what do I install and in which order to get postscript output working? Any help/suggestions would be greatly appreciated. -- Teemu Rinne From jdhunter at ace.bsd.uchicago.edu Fri Sep 9 05:57:54 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 08 Sep 2005 22:57:54 -0500 Subject: [Pythonmac-SIG] matplotlib and postscript output In-Reply-To: (Teemu Rinne's message of "Thu, 08 Sep 2005 22:56:59 +0300") References: Message-ID: <87acimyjst.fsf@peds-pc311.bsd.uchicago.edu> >>>>> "Teemu" == Teemu Rinne writes: Teemu> Any help/suggestions would be greatly appreciated. matplotlib emes it's freetype fonts into the postscript file. The fonts it finds are usually platform and per-computer specific. It looks to me like the errant platform has some extremely large, possibly corrupt fonts that are getting dumped into your PS file. Try running with > python myscript.py --verbose-debug which will print lots of extra debug info including which font files are used. My guess is if you move the problematic fonts out of your font search path the problem will go away. JDH From teemu.rinne at helsinki.fi Fri Sep 9 08:24:18 2005 From: teemu.rinne at helsinki.fi (Teemu Rinne) Date: Fri, 09 Sep 2005 09:24:18 +0300 Subject: [Pythonmac-SIG] matplotlib and postscript output In-Reply-To: <87acimyjst.fsf@peds-pc311.bsd.uchicago.edu> References: <87acimyjst.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: Thanks a lot! I am now able to create ps output and can proceed with my work (although I have to deal with the fonts manually, but that's better than no postscript at all). Yes, the problem has something to do with fonts. My test script is now like this: #pstest.py import matplotlib matplotlib.use('Agg') import pylab from matplotlib import rc rc('font', family='serif', style='normal', variant='normal', weight='bold', stretch='normal', size='small') pylab.plot(pylab.arange(5),pylab.arange(5),'k-') pylab.title("some title") pylab.xlabel('some unit label') pylab.ylabel('some different unit label') pylab.savefig("filename.ps") I tried setting different fonts in my .matplotrc. For example with Times: font.serif : Times python pstest.py --verbose-debug matplotlib data path /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib loaded rc file /Users/teemu/.matplotlibrc matplotlib version 0.80 verbose.level debug interactive is False platform is darwin loaded modules: ['__future__', 'copy_reg', 'sre_compile', 'distutils', '_sre', '__main__', 'site', '__builtin__', 'datetime', 'encodings', 'encodings.encodings', 'sre_constants', 'distutils.string', 'matplotlib.datetime', 'posixpath', 'matplotlib.warnings', 'encodings.codecs', 'matplotlib.sys', 're', 'os.path', '_codecs', 'distutils.sysconfig', 'encodings.exceptions', 'stat', 'zipimport', 'string', 'warnings', 'encodings.types', 'UserDict', 'encodings.ascii', 'distutils.os', 'matplotlib', 'sys', 'matplotlib.__future__', 'codecs', 'distutils.re', 'types', 'strop', 'matplotlib.os', 'sre', 'matplotlib.distutils', 'signal', 'distutils.errors', 'linecache', 'posix', 'encodings.aliases', 'exceptions', 'sre_parse', 'distutils.sys', 'os'] numerix Numeric 23.8 font search path ['/System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib'] trying fontname /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/VeraMoBI.ttf trying fontname /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/VeraMoIt.ttf trying fontname /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/cmtt10.ttf trying fontname /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/VeraSe.ttf trying fontname /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/VeraBI.ttf trying fontname /System/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/Vera.ttf loaded ttfcache file /Users/tjrinne/.ttffont.cache backend Agg version v2.2 findfont found Times, normal, normal 700, normal, 10.0 findfont returning /System/Library/Fonts/Times.dfont findfont found Times, normal, normal 700, normal, 12.0 findfont returning /System/Library/Fonts/Times.dfont findfont found Times, normal, normal 700, normal, 14.0 findfont returning /System/Library/Fonts/Times.dfont findfont cached Times, normal, normal, 700, normal, 10.0 findfont returning /System/Library/Fonts/Times.dfont findfont cached Times, normal, normal, 700, normal, 12.0 findfont returning /System/Library/Fonts/Times.dfont findfont cached Times, normal, normal, 700, normal, 14.0 findfont returning /System/Library/Fonts/Times.dfont Everything looks ok to me but the result is a broken 3.2 M file. With palatino font.serif : Palatino I get a 12 K file which cannot be opened. Postscript output works with font.serif : (i.e., empty) which makes matplotlib to use Vera. So far it seems that only the Vera font works and all the system fonts result in a broken postscript file. There seems to be no such font problems on my US powerbook but all my international (Finnish keyboards) macs (2 out-of-box Tigers, one older Panther) show it. Although all my Finnish macs behave like this, nobody on this list seems to have similar problems. Could the font problem be somehow specific to international (or even Finnish) macs? -- Teemu --On torstai 8. syyskuu 2005 22:57 -0500 John Hunter wrote: >>>>>> "Teemu" == Teemu Rinne writes: > > Teemu> Any help/suggestions would be greatly appreciated. > > matplotlib emes it's freetype fonts into the postscript file. The > fonts it finds are usually platform and per-computer specific. It > looks to me like the errant platform has some extremely large, > possibly corrupt fonts that are getting dumped into your PS file. > > Try running with > >> python myscript.py --verbose-debug > > which will print lots of extra debug info including which font files > are used. My guess is if you move the problematic fonts out of your > font search path the problem will go away. > > JDH From smithsm at samuelsmith.org Fri Sep 9 16:53:10 2005 From: smithsm at samuelsmith.org (Samuel M. Smith) Date: Fri, 9 Sep 2005 08:53:10 -0600 Subject: [Pythonmac-SIG] matplotlib and postscript output In-Reply-To: References: <87acimyjst.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: <8976C791-6DC0-46CA-ABA7-22AB9A42DCA0@samuelsmith.org> I had postscript problems on matplotlib 0.83.2 with the fonts. If my plot had text in it, the ps file wouldn't convert to pdf. It had an error. Robert Kern on the matplotlib-users mailing list had a work around. That is use tex fonts. This worked for me. I installed the latest version of texshop http:// www.uoregon.edu/~koch/texshop/ and then entered this command before plotting rc('text', usetex=True) and the resulting eps files converted to pdf just fine. From smithsm at samuelsmith.org Fri Sep 9 18:04:30 2005 From: smithsm at samuelsmith.org (Samuel M. Smith) Date: Fri, 9 Sep 2005 10:04:30 -0600 Subject: [Pythonmac-SIG] matplotlib and postscript output In-Reply-To: References: <87acimyjst.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: <203B4370-1598-4B63-B3D2-EE8F4A5AF0B7@samuelsmith.org> You can make the use of tex automatic by setting text.usetex to True in your rc file ### TEXT # text properties used by text.Text. See # http://matplotlib.sourceforge.net/matplotlib.text.html for more # information on text properties text.color : black text.usetex : True # use tex/latex for all text handling. See http://matplotlib.sf.net/matplotlib.texmanager.html text.tex.engine : latex # tex is faster, but latex is required to use special font packages The default tex font is a serif. The distribution texmanager ignores the font.family in the rc file. Robert Kern provided another fix: add to the top of the get_tex_command in matplotlib-0.83.2/lib/matplotlib/texmanager.py the following fontcmd = {'sans-serif': r'{\sffamily %s}', 'monospace': r'{\ttfamily %s}'}.get(rcParams['font.family'], r'{\rmfamily %s}') tex = fontcmd % tex This is what mine looked like def get_tex_command(self, tex, fname): fh = file(fname, 'w') #Added by SamuelSmith so tex respects font-family from rc file fontcmd = {'sans-serif': r'{\sffamily %s}', 'monospace': r'{\ttfamily %s}'}.get(rcParams['font.family'], r'{\rmfamily %s}') tex = fontcmd % tex #End addition Then reinstall matplotlib Now your plots use the font.family for text so you can select serif or sans-serif for example font.family : sans-serif From jdhunter at ace.bsd.uchicago.edu Sat Sep 10 17:14:50 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Sat, 10 Sep 2005 10:14:50 -0500 Subject: [Pythonmac-SIG] xcode for 10.3 Message-ID: <871x3xq7it.fsf@peds-pc311.bsd.uchicago.edu> My powerbook died and I had to reinstall the OS (Panther). After googling and browsing the OS X web site, I still cannot find any download for the xcode tools for 10.3. All roads seem to lead to Tiger. Anyone have a link to panther tools, particularly xcode? Thanks, JDH From juntunen at well.com Sat Sep 10 19:14:38 2005 From: juntunen at well.com (Thomas Juntunen) Date: Sat, 10 Sep 2005 12:14:38 -0500 Subject: [Pythonmac-SIG] xcode for 10.3 In-Reply-To: <871x3xq7it.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: On 10 09 2005, John Hunter imposed order on a stream of electrons to say: >Anyone have a link to panther tools, particularly xcode? I can't provide a link because XCode 1.5 is available through Apple's Developer Connection: http://connect.apple.com/ and one needs an Apple ID to log in. If you haven't done so already, sign up for a free online membership which is sufficient to allow you to sign in and gain access to the downloads area where you will find XCode 1.5 under Developer Tools. Be advised, it is a 300+ MB disk image; I hope you have broadband. HTH, Thomas Juntunen From boz at cox.net Sat Sep 10 23:16:14 2005 From: boz at cox.net (Christofer "Boz" Jennings) Date: Sat, 10 Sep 2005 14:16:14 -0700 Subject: [Pythonmac-SIG] messed up Tiger python install Message-ID: Hi, I'm a newbie to this list and to Python who has messed up Python on Tiger :-( I'm on an eMac, G4 1.25 GHz. I installed Python 2.4 with TigerPython24Fix. Then I installed PIL. I wanted to build Skencil but the build failed to find the Imaging package. Looking for that package I noticed the build expected it in / System/Library/... instead of /Library/... (where Python 2.4 got installed) so ... and this is where I messed things up ... I started changing symlinks and so forth. Now I'm hopelessly messed up. I've clobbered Python of any version on my Mac. ... HELP!!! The TigerPython24Fix installer now says that my hard drive not a valid target, even though it worked before. I think I want to have Python 2.4 as the only version. Any help would be much appreciated. :-( boz From rkern at ucsd.edu Sat Sep 10 23:37:20 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sat, 10 Sep 2005 14:37:20 -0700 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: References: Message-ID: <43235210.9040800@ucsd.edu> Christofer "Boz" Jennings wrote: > Hi, > > I'm a newbie to this list and to Python who has messed up Python on > Tiger :-( > > I'm on an eMac, G4 1.25 GHz. > > I installed Python 2.4 with TigerPython24Fix. Then I installed PIL. I > wanted to build Skencil but the build failed to find the Imaging > package. Looking for that package I noticed the build expected it in / > System/Library/... instead of /Library/... (where Python 2.4 got > installed) so ... and this is where I messed things up ... I started > changing symlinks and so forth. Now I'm hopelessly messed up. I've > clobbered Python of any version on my Mac. ... HELP!!! That's bad. You'll probably want to reinstall the OS. Don't remove the Apple-installed Python. The OS depends on it. > The TigerPython24Fix installer now says that my hard drive not a > valid target, even though it worked before. > > I think I want to have Python 2.4 as the only version. Any help would > be much appreciated. No, you don't. What you do want to do is put /usr/local/bin in your $PATH before /usr/bin so typing $ python gives you 2.4.1. That was probably your problem with building Skencil. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From brendansimons at yahoo.ca Mon Sep 12 06:12:44 2005 From: brendansimons at yahoo.ca (Brendan Simons) Date: Mon, 12 Sep 2005 00:12:44 -0400 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: References: Message-ID: This is the third plea I've heard from someone who's gotten themselves into real trouble after removing the Tiger-supplied python. I almost did it myself when 2.3 kept coming up even after I installed 2.4. We definitely have a communication problem. On 11-Sep-05, at 6:00 AM, Robert Kern wrote: > No, you don't. What you do want to do is put /usr/local/bin in your > $PATH before /usr/bin so typing > > $ python > > gives you 2.4.1. I found this advice before, but as someone who doesn't have a unix background, it took me a long time to figure out exactly HOW to change my $Path variable permanently. Can I suggest that a tutorial be linked to the pythonmac or undefined.org/packages sites detailing this process? Alternatively, can the path be modified by the 2.4 install script? -Brendan -- Brendan Simons, Project Engineer Stern Laboratories, Hamilton Ontario -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050912/4d4c124b/attachment.htm From rkern at ucsd.edu Mon Sep 12 06:45:00 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 11 Sep 2005 21:45:00 -0700 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: References: Message-ID: <432507CC.6080408@ucsd.edu> Brendan Simons wrote: > I found this advice before, but as someone who doesn't have a unix > background, it took me a long time to figure out exactly HOW to change > my $Path variable permanently. Can I suggest that a tutorial be linked > to the pythonmac or undefined.org/packages sites detailing this > process? You can suggest all you like. It's much more effective, however, to write such a tutorial and ask that it be placed on the site. > Alternatively, can the path be modified by the 2.4 install script? No. Installers that do that kind of thing garner well-earned derision. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From jnutting at gmail.com Mon Sep 12 09:41:08 2005 From: jnutting at gmail.com (Jack Nutting) Date: Mon, 12 Sep 2005 09:41:08 +0200 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: <432507CC.6080408@ucsd.edu> References: <432507CC.6080408@ucsd.edu> Message-ID: On 9/12/05, Robert Kern wrote: > > Brendan Simons wrote: > > Alternatively, can the path be modified by the 2.4 install script? > > No. Installers that do that kind of thing garner well-earned derision. Actually, I think that an installer that *asks* if you want it to do so would be quite acceptable. Something like: "Version 2.4.1 of python has now been installed in /usr/local/bin. You probably want to use this new version as the default python, so that other python-using programs will find it instead of the built-in version. I can take care of this by putting /usr/local/bin/ at the front of your shell path. Should I do this for you?" That way, those of us who are accustomed to managing our own path can do so ourselves, while newbies will get it taken care of for them. -- // jack // http://www.nuthole.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050912/91cf9cb8/attachment.htm From bob at redivi.com Mon Sep 12 10:31:34 2005 From: bob at redivi.com (Bob Ippolito) Date: Mon, 12 Sep 2005 01:31:34 -0700 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: References: <432507CC.6080408@ucsd.edu> Message-ID: On Sep 12, 2005, at 12:41 AM, Jack Nutting wrote: > On 9/12/05, Robert Kern wrote: > Brendan Simons wrote: > > Alternatively, can the path be modified by the 2.4 install script? > > No. Installers that do that kind of thing garner well-earned derision. > > > Actually, I think that an installer that *asks* if you want it to > do so would be quite acceptable. Something like: > > "Version 2.4.1 of python has now been installed in /usr/local/bin. > You probably want to use this new version as the default python, so > that other python-using programs will find it instead of the built- > in version. I can take care of this by putting /usr/local/bin/ at > the front of your shell path. Should I do this for you?" > > That way, those of us who are accustomed to managing our own path > can do so ourselves, while newbies will get it taken care of for them. Patches accepted at http://sourceforge.net/projects/python :) -bob From jnutting at gmail.com Mon Sep 12 15:57:18 2005 From: jnutting at gmail.com (Jack Nutting) Date: Mon, 12 Sep 2005 15:57:18 +0200 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: References: <432507CC.6080408@ucsd.edu> Message-ID: On 9/12/05, Bob Ippolito wrote: > Patches accepted at http://sourceforge.net/projects/python :) I don't know where the packagemaker configuration file is, but here's a step toward something that would work in postflight: #!/bin/sh dialogText="Version 2.4.1 of python has now been installed in /usr/local/bin. You probably want to use this new version as the default python, so that other python-using programs will find it instead of the built-in version. I can take care of this by putting /usr/local/bin/ at the front of your shell path. Should I do this for you?" osascriptOutput=`/usr/bin/mktemp /tmp/osascript_XXXXXXXXX` osascript >$osascriptOutput < References: <432507CC.6080408@ucsd.edu> Message-ID: On 12-sep-2005, at 15:57, Jack Nutting wrote: > > > On 9/12/05, Bob Ippolito wrote: > Patches accepted at http://sourceforge.net/projects/python :) > > I don't know where the packagemaker configuration file is, but > here's a step toward something that would work in postflight: > > #!/bin/sh > > dialogText="Version 2.4.1 of python has now been installed in /usr/ > local/bin. You probably want to use this new version as the > default python, so that other python-using programs will find it > instead of the built-in version. I can take care of this by > putting /usr/local/bin/ at the front of your shell path. Should I > do this for you?" > osascriptOutput=`/usr/bin/mktemp /tmp/osascript_XXXXXXXXX` > osascript >$osascriptOutput < on display_message_dialog() > try > tell application "Finder" to display dialog "$dialogText" > on error errMsg number errnum > if errnum is -128 then --If user canceled > return 0 > else > error errMsg > end if > end try > return 1 > end display_message_dialog > > tell application "Finder" to activate > set dialogResult to display_message_dialog() > tell application "Terminal" to activate > > return dialogResult > appleScriptEnd > > shouldInsertIntoPath=`cat $osascriptOutput` > if [ $shouldInsertIntoPath = 1 ]; then > # user hit OK, now mangle their startup scripts > echo got yes! > fi > > (obviously I left out the part where we actually modify the > user's .profile, .bash_profile, .cshrc, and/or .tcshrc, but I > thought that this bit of applescript hackery could help someone > along the way) You left out the interesting part! Which user's profile should be modified, just the users that installed the package? Too bad if a user tries to keep admin privileges away from his normal account (or if a parent installs python because her kid wants to program in python). You could also modify /etc/profile (and /etc/csh.login and ...) to modify the PATH for everyone, change environment.plist or ... This would also make it harder to do unattended installs of Python (using Remote Desktop's install feature, or even using installer(1) in an ssh session). Another option is making a .mpkg for python and have one subpackage that does the 'echo got yes!' part in its postflight script (unconditionally) and add tekst to the ReadMe screen that tells the users to select this package if he wants to modify the shell environment. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050912/a4593d99/smime.bin From Chris.Barker at noaa.gov Mon Sep 12 21:07:47 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Mon, 12 Sep 2005 12:07:47 -0700 Subject: [Pythonmac-SIG] CoreGraphics module for python 2.4.1 Message-ID: <4325D203.5060600@noaa.gov> HI all, Apple's python seamed to come with the CoreGraphics module. Can I get that same module for python2.4.1 (form undefined.org)? If so, how? OS-X 10.3, if it matters. thanks, -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 at noaa.gov From njriley at uiuc.edu Mon Sep 12 21:24:56 2005 From: njriley at uiuc.edu (Nicholas Riley) Date: Mon, 12 Sep 2005 14:24:56 -0500 Subject: [Pythonmac-SIG] CoreGraphics module for python 2.4.1 In-Reply-To: <4325D203.5060600@noaa.gov> References: <4325D203.5060600@noaa.gov> Message-ID: <20050912192456.GA22134@uiuc.edu> On Mon, Sep 12, 2005 at 12:07:47PM -0700, Chris Barker wrote: > HI all, > > Apple's python seamed to come with the CoreGraphics module. Can I get > that same module for python2.4.1 (form undefined.org)? If so, how? > > OS-X 10.3, if it matters. Nope, the module is closed-source (most likely because it uses CoreGraphics/Cocoa SPI to do crazy stuff enabling you to draw without a windowserver connection). -- Nicholas Riley | From Chris.Barker at noaa.gov Mon Sep 12 21:44:23 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Mon, 12 Sep 2005 12:44:23 -0700 Subject: [Pythonmac-SIG] CoreGraphics module for python 2.4.1 In-Reply-To: <20050912192456.GA22134@uiuc.edu> References: <4325D203.5060600@noaa.gov> <20050912192456.GA22134@uiuc.edu> Message-ID: <4325DA97.1050608@noaa.gov> Nicholas Riley wrote: >>Apple's python seamed to come with the CoreGraphics module. Can I get >>that same module for python2.4.1 (form undefined.org)? If so, how? >> >>OS-X 10.3, if it matters. > > Nope, the module is closed-source (most likely because it uses > CoreGraphics/Cocoa SPI to do crazy stuff enabling you to draw without > a windowserver connection). Darn, but thanks for the info. -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 at noaa.gov From ronaldoussoren at mac.com Mon Sep 12 22:47:31 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 12 Sep 2005 22:47:31 +0200 Subject: [Pythonmac-SIG] CoreGraphics module for python 2.4.1 In-Reply-To: <4325DA97.1050608@noaa.gov> References: <4325D203.5060600@noaa.gov> <20050912192456.GA22134@uiuc.edu> <4325DA97.1050608@noaa.gov> Message-ID: <7B84D249-0BCA-4DC4-A211-16AE354DCE08@mac.com> On 12-sep-2005, at 21:44, Chris Barker wrote: > > > Nicholas Riley wrote: > > >>> Apple's python seamed to come with the CoreGraphics module. Can I >>> get >>> that same module for python2.4.1 (form undefined.org)? If so, how? >>> >>> OS-X 10.3, if it matters. >>> >> >> Nope, the module is closed-source (most likely because it uses >> CoreGraphics/Cocoa SPI to do crazy stuff enabling you to draw without >> a windowserver connection). >> > > Darn, but thanks for the info. I'm pretty sure someone mentioned they had written their own CoreGraphics wrappers some time back on this list. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050912/7d1dc294/smime.bin From rkern at ucsd.edu Mon Sep 12 23:32:36 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 12 Sep 2005 14:32:36 -0700 Subject: [Pythonmac-SIG] CoreGraphics module for python 2.4.1 In-Reply-To: <7B84D249-0BCA-4DC4-A211-16AE354DCE08@mac.com> References: <4325D203.5060600@noaa.gov> <20050912192456.GA22134@uiuc.edu> <4325DA97.1050608@noaa.gov> <7B84D249-0BCA-4DC4-A211-16AE354DCE08@mac.com> Message-ID: <4325F3F4.5030100@ucsd.edu> Ronald Oussoren wrote: > I'm pretty sure someone mentioned they had written their own > CoreGraphics wrappers some time back on this list. That would be me. I've extracted it from the Kiva tree as a standalone module. This is just a very preliminary release, so there's no documentation beyond the source. It's released under the BSD license. http://starship.python.net/crew/kernr/source/ABCGI-0.0.0.tar.gz http://starship.python.net/crew/kernr/source/ABCGI-0.0.0-py2.4-macosx-10.4-ppc.egg I haven't yet adapted to the new scheme for getting a CoreGraphics context in PyObjC. Patches are welcome, of course. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From rkern at ucsd.edu Mon Sep 12 23:53:36 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 12 Sep 2005 14:53:36 -0700 Subject: [Pythonmac-SIG] CoreGraphics module for python 2.4.1 In-Reply-To: <4325F3F4.5030100@ucsd.edu> References: <4325D203.5060600@noaa.gov> <20050912192456.GA22134@uiuc.edu> <4325DA97.1050608@noaa.gov> <7B84D249-0BCA-4DC4-A211-16AE354DCE08@mac.com> <4325F3F4.5030100@ucsd.edu> Message-ID: <4325F8E0.7070303@ucsd.edu> Robert Kern wrote: > http://starship.python.net/crew/kernr/source/ABCGI-0.0.0.tar.gz > http://starship.python.net/crew/kernr/source/ABCGI-0.0.0-py2.4-macosx-10.4-ppc.egg And I forgot to mention that you will need Pyrex and setuptools to build from source. You will also need Numeric to run it and also PIL if you want to save bitmap images to a file. Here is a small example of its use: In [1]: import ABCGI In [2]: gc = ABCGI.CGBitmapContext(256,256) In [3]: gc.move_to(0,0) In [4]: gc.line_to(128,128) In [5]: gc.stroke_path() In [6]: gc.save('foo.png') -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From boz at cox.net Tue Sep 13 00:17:28 2005 From: boz at cox.net (Christofer "Boz" Jennings) Date: Mon, 12 Sep 2005 15:17:28 -0700 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: References: <432507CC.6080408@ucsd.edu> Message-ID: <1E30C308-D8B7-4866-B22C-FF50836802D1@cox.net> You guys rock! I reinstalled Tiger, MacPython and TigerPython24Fix... then changed my path. Just for background. I was following some online blog about installing Skencil when I got started. Someone posted a comment there to change links in /usr/bin. SOmeone else said that would be a bad idea. Someone else said "i've got linux admin experience and can tell you it's definitely OK" (or some such) ... so I did it. Then I did more. O the shame. I was fiddling around too much without digging into it and I should know better. Why did I listen to a Linux Admin about OS X? Well, pain is a good teacher... Anyway. My point is: I doubt the installer or a more clear install README would've helped me in this case. But maybe it would help keep those well intentioned posts from misleading the likes of me. Thanks for the quick response. It was just what I needed. ,boz On Sep 12, 2005, at 7:17 AM, Ronald Oussoren wrote: > > On 12-sep-2005, at 15:57, Jack Nutting wrote: > > >> >> >> On 9/12/05, Bob Ippolito wrote: >> Patches accepted at http://sourceforge.net/projects/python :) >> >> I don't know where the packagemaker configuration file is, but >> here's a step toward something that would work in postflight: >> > > >> >> #!/bin/sh >> >> dialogText="Version 2.4.1 of python has now been installed in /usr/ >> local/bin. You probably want to use this new version as the >> default python, so that other python-using programs will find it >> instead of the built-in version. I can take care of this by >> putting /usr/local/bin/ at the front of your shell path. Should I >> do this for you?" >> osascriptOutput=`/usr/bin/mktemp /tmp/osascript_XXXXXXXXX` >> osascript >$osascriptOutput <> on display_message_dialog() >> try >> tell application "Finder" to display dialog "$dialogText" >> on error errMsg number errnum >> if errnum is -128 then --If user canceled >> return 0 >> else >> error errMsg >> end if >> end try >> return 1 >> end display_message_dialog >> >> tell application "Finder" to activate >> set dialogResult to display_message_dialog() >> tell application "Terminal" to activate >> >> return dialogResult >> appleScriptEnd >> >> shouldInsertIntoPath=`cat $osascriptOutput` >> if [ $shouldInsertIntoPath = 1 ]; then >> # user hit OK, now mangle their startup scripts >> echo got yes! >> fi >> > > >> >> (obviously I left out the part where we actually modify the >> user's .profile, .bash_profile, .cshrc, and/or .tcshrc, but I >> thought that this bit of applescript hackery could help someone >> along the way) >> > > You left out the interesting part! Which user's profile should be > modified, just the users that installed the package? Too bad if a > user tries to keep admin privileges away from his normal account > (or if a parent installs python because her kid wants to program in > python). You could also modify /etc/profile (and /etc/csh.login > and ...) to modify the PATH for everyone, change environment.plist > or ... > > This would also make it harder to do unattended installs of Python > (using Remote Desktop's install feature, or even using installer(1) > in an ssh session). > > Another option is making a .mpkg for python and have one subpackage > that does the 'echo got yes!' part in its postflight script > (unconditionally) and add tekst to the ReadMe screen that tells the > users to select this package if he wants to modify the shell > environment. > > Ronald_______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From brendansimons at yahoo.ca Tue Sep 13 04:31:46 2005 From: brendansimons at yahoo.ca (Brendan Simons) Date: Mon, 12 Sep 2005 22:31:46 -0400 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: References: Message-ID: <0A0473B6-5148-4D81-9BE4-C963AF2A4B1C@yahoo.ca> On 12-Sep-05, at 6:00 AM, Bob Ippolito wrote: > Patches accepted at http://sourceforge.net/projects/python :) > > -bob ok, point taken. I'm going to have to brush up on my distutils skills before I can approach that. -Brendan -- Brendan Simons, Project Engineer Stern Laboratories, Hamilton Ontario -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050912/076ba36b/attachment.htm From rkern at ucsd.edu Tue Sep 13 04:43:37 2005 From: rkern at ucsd.edu (Robert Kern) Date: Mon, 12 Sep 2005 19:43:37 -0700 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: <0A0473B6-5148-4D81-9BE4-C963AF2A4B1C@yahoo.ca> References: <0A0473B6-5148-4D81-9BE4-C963AF2A4B1C@yahoo.ca> Message-ID: <43263CD9.3060304@ucsd.edu> Brendan Simons wrote: > > On 12-Sep-05, at 6:00 AM, Bob Ippolito wrote: > >> Patches accepted at http://sourceforge.net/projects/python :) >> >> -bob > > ok, point taken. I'm going to have to brush up on my distutils skills > before I can approach that. The Python interpreter's installer isn't built with distutils. Look at Mac/OSX/Dist/README.txt in the source distribution. But please consider writing clear documentation telling people how to modify their $PATH, instead. That's far more likely to be a robust approach. AFAICT, this is an issue that only affects people running python from the terminal. Such people need to know something as basic as the $PATH anyways. The best part of this approach is that you don't have to brush up on anything. ;-) -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From ronaldoussoren at mac.com Mon Sep 12 11:16:56 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 12 Sep 2005 11:16:56 +0200 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: <432507CC.6080408@ucsd.edu> References: <432507CC.6080408@ucsd.edu> Message-ID: On 12-sep-2005, at 6:45, Robert Kern wrote: > Brendan Simons wrote: > > >> I found this advice before, but as someone who doesn't have a unix >> background, it took me a long time to figure out exactly HOW to >> change >> my $Path variable permanently. Can I suggest that a tutorial be >> linked >> to the pythonmac or undefined.org/packages sites detailing this >> process? >> > > You can suggest all you like. It's much more effective, however, to > write such a tutorial and ask that it be placed on the site. > > >> Alternatively, can the path be modified by the 2.4 install script? >> > > No. Installers that do that kind of thing garner well-earned derision. Right. And which PATH should be changed? The only of the user that happens to install python, all users, the system path? And then there's the various shells that could be used. A document that tells you how to change your path would be much better. I'd be very annoyed if some random installer would modify my, heavily customized, profile. Ronald > > -- > Robert Kern > rkern at ucsd.edu > > "In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From mwh at python.net Tue Sep 13 11:40:36 2005 From: mwh at python.net (Michael Hudson) Date: Tue, 13 Sep 2005 10:40:36 +0100 Subject: [Pythonmac-SIG] CoreGraphics module for python 2.4.1 In-Reply-To: <4325DA97.1050608@noaa.gov> (Chris Barker's message of "Mon, 12 Sep 2005 12:44:23 -0700") References: <4325D203.5060600@noaa.gov> <20050912192456.GA22134@uiuc.edu> <4325DA97.1050608@noaa.gov> Message-ID: <2mk6hlmhkb.fsf@starship.python.net> "Chris Barker" writes: > Nicholas Riley wrote: > >>>Apple's python seamed to come with the CoreGraphics module. Can I get >>>that same module for python2.4.1 (form undefined.org)? If so, how? >>> >>>OS-X 10.3, if it matters. >> >> Nope, the module is closed-source (most likely because it uses >> CoreGraphics/Cocoa SPI to do crazy stuff enabling you to draw without >> a windowserver connection). > > Darn, but thanks for the info. You might just be able to use the .so with Python 2.4. You'll get warnings, but it will *probably* Just Work (I don't think the C API changed very much 2.3 -> 2.4). Cheers, mwh -- 6. The code definitely is not portable - it will produce incorrect results if run from the surface of Mars. -- James Bonfield, http://www.ioccc.org/2000/rince.hint From Chris.Barker at noaa.gov Tue Sep 13 19:53:28 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Tue, 13 Sep 2005 10:53:28 -0700 Subject: [Pythonmac-SIG] messed up Tiger python install In-Reply-To: <43263CD9.3060304@ucsd.edu> References: <0A0473B6-5148-4D81-9BE4-C963AF2A4B1C@yahoo.ca> <43263CD9.3060304@ucsd.edu> Message-ID: <43271218.5010701@noaa.gov> Robert Kern wrote: > But please consider writing clear documentation telling people how to > modify their $PATH, instead. If you do that please be sure to mention that you can also just use: python2.4 at the prompt and in the #! line of scripts. You probably need to put "/usr/local/bin" in the PATH anyway, but it may or may not be before "/usr/bin". It's still a mystery to me why most systems don't have /usr/local/bin in the PATH by default. By the way, modifying those sym links in Linux is probably not a good idea either. Some Linux systems use python for system services (RedHat and Gentoo, at least), and you wouldn't want to mess those up either. I really wish system builders would hard-code the path or version of python in the system scripts, then this would be so much easier! -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 at noaa.gov From simon.brunning at gmail.com Wed Sep 14 10:42:56 2005 From: simon.brunning at gmail.com (Simon Brunning) Date: Wed, 14 Sep 2005 09:42:56 +0100 Subject: [Pythonmac-SIG] Dock menu Message-ID: <8c7f10c605091401426a83cb70@mail.gmail.com> On Windows, I've got a few Python scripts that sit in the system tray - . It basically creates a system tray icon with a context menu. The menu is fefined in Python code, and each item has an associated callable that gets called when the menu item is selected. Is there a Mac equivelent of this? Assuming not, can someone offer a Mac newcomer a steer towards how I might write one? -- Cheers, Simon B, simon at brunningonline.net, http://www.brunningonline.net/simon/blog/ From delza at livingcode.org Wed Sep 14 18:42:43 2005 From: delza at livingcode.org (Dethe Elza) Date: Wed, 14 Sep 2005 09:42:43 -0700 Subject: [Pythonmac-SIG] Dock menu In-Reply-To: <8c7f10c605091401426a83cb70@mail.gmail.com> References: <8c7f10c605091401426a83cb70@mail.gmail.com> Message-ID: Hi Simon, You can certainly add items to a dock menu in OS X using Python. For more info on the dock menu, see here: http://developer.apple.com/documentation/Carbon/Conceptual/ customizing_docktile/index.html?http://developer.apple.com/ documentation/Carbon/Conceptual/customizing_docktile/concepts/ chapter_2_section_3.html If you are just starting out with OS X, check out the PyObjC website, to learn how to map the Objective-C calls documented by Apple into Python calls. http://pyobjc.sourceforge.net/ Note that doc menus are only active while an application is running. If you want a menu which is persistent without needing the UI of an application, take a look at the Apple docs for NSStatusBar, which is the area in the menu bar between an application's Help menu and the Spotlight icon (in Tiger, anyway). I posted a simplistic example to this list a while back. http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSStatusBar.html http://mail.python.org/pipermail/pythonmac-sig/2005-April/013733.html Apple itself doesn't use NSStatusItem, relying instead on something called Menu Extras, which are more reliable and powerful (they can be rearranged by dragging, for instance). Apple doesn't want third party developers to use this API (which is undocumented and has been known to change between releases), but if you'd like to try anyway, there is documentation here: http://cocoadevcentral.com/articles/000078.php Best wishes! --Dethe When laws are outlawed, only outlaws will have laws. From chinook.nr at tds.net Wed Sep 14 23:50:35 2005 From: chinook.nr at tds.net (Chinook) Date: Wed, 14 Sep 2005 17:50:35 -0400 Subject: [Pythonmac-SIG] librsync, pylibacl, pyxattr ? Message-ID: librsync, pylibacl, pyxattr ? Been off on a bash scripting tangent, then did an article Backup::Restore. Now I'm back to Python because I need a sync verification utility. The idea is simply to compare a directory on one volume with the same directory on another volume. Working recursively through the directory contents, first files on only one volume or the other would be noted, then for matching files the time stamps, permissions, ACLs and sizes, maybe even MD5 hashes, would be checked and any mismatches noted. I've searched for such a utility for OS X and come up empty. If you know of something I might have missed please speak up. Anyway, if I have to do it myself I figured I'd need three things I don't have. That is librsync, pylibacl and pyxattr. On Bob's package page I found xattr - is that the same as pyxattr (I'm assuming so for the moment)? Which leaves librsync and pylibacl. I see various sources for such, but before I go trying one at random I'm wondering if anyone that has them on OS X has any specific recommendations. Thank you, Lee C From njriley at uiuc.edu Thu Sep 15 00:06:40 2005 From: njriley at uiuc.edu (Nicholas Riley) Date: Wed, 14 Sep 2005 17:06:40 -0500 Subject: [Pythonmac-SIG] librsync, pylibacl, pyxattr ? In-Reply-To: References: Message-ID: <20050914220640.GB4201@uiuc.edu> On Wed, Sep 14, 2005 at 05:50:35PM -0400, Chinook wrote: > The idea is simply to compare a directory on one volume with the same > directory on another volume. Working recursively through the directory > contents, first files on only one volume or the other would be noted, > then for matching files the time stamps, permissions, ACLs and sizes, > maybe even MD5 hashes, would be checked and any mismatches noted. I've had luck using integrit but it doesn't do ACLs. You could probably trivially extend it to do so, though. -- Nicholas Riley | From bob at redivi.com Thu Sep 15 00:40:02 2005 From: bob at redivi.com (Bob Ippolito) Date: Wed, 14 Sep 2005 18:40:02 -0400 Subject: [Pythonmac-SIG] librsync, pylibacl, pyxattr ? In-Reply-To: References: Message-ID: <4C716BEE-A9CB-4073-8BB0-0A1758F5F20C@redivi.com> On Sep 14, 2005, at 5:50 PM, Chinook wrote: > Anyway, if I have to do it myself I figured I'd need three things I > don't have. That is librsync, pylibacl and pyxattr. On Bob's package > page I found xattr - is that the same as pyxattr (I'm assuming so for > the moment)? Which leaves librsync and pylibacl. I see various > sources > for such, but before I go trying one at random I'm wondering if anyone > that has them on OS X has any specific recommendations. No, pyxattr is for Linux, xattr is for Mac OS X. I don't think the implementations are quite compatible. Also, xattr is not GPL. -bob From chinook.nr at tds.net Thu Sep 15 02:10:31 2005 From: chinook.nr at tds.net (Chinook) Date: Wed, 14 Sep 2005 20:10:31 -0400 Subject: [Pythonmac-SIG] librsync, pylibacl, pyxattr ? In-Reply-To: <4C716BEE-A9CB-4073-8BB0-0A1758F5F20C@redivi.com> References: <4C716BEE-A9CB-4073-8BB0-0A1758F5F20C@redivi.com> Message-ID: Bob Ippolito wrote: >On Sep 14, 2005, at 5:50 PM, Chinook wrote: > > > >>Anyway, if I have to do it myself I figured I'd need three things I >>don't have. That is librsync, pylibacl and pyxattr. On Bob's package >>page I found xattr - is that the same as pyxattr (I'm assuming so for >>the moment)? Which leaves librsync and pylibacl. I see various >>sources >>for such, but before I go trying one at random I'm wondering if anyone >>that has them on OS X has any specific recommendations. >> >> > >No, pyxattr is for Linux, xattr is for Mac OS X. I don't think the >implementations are quite compatible. Also, xattr is not GPL. > >-bob > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG at python.org >http://mail.python.org/mailman/listinfo/pythonmac-sig > > > Thanks for the reply Bob, Obviously xattr is what I really want then as I'm only interested in Mac OS X. I'll grab what you've so kindly put up and check it out. Any knowledge of the other two? Thanks again, Lee C From chinook.nr at tds.net Thu Sep 15 02:15:17 2005 From: chinook.nr at tds.net (Chinook) Date: Wed, 14 Sep 2005 20:15:17 -0400 Subject: [Pythonmac-SIG] librsync, pylibacl, pyxattr ? In-Reply-To: <20050914220640.GB4201@uiuc.edu> References: <20050914220640.GB4201@uiuc.edu> Message-ID: Nicholas Riley wrote: >On Wed, Sep 14, 2005 at 05:50:35PM -0400, Chinook wrote: > > >>The idea is simply to compare a directory on one volume with the same >>directory on another volume. Working recursively through the directory >>contents, first files on only one volume or the other would be noted, >>then for matching files the time stamps, permissions, ACLs and sizes, >>maybe even MD5 hashes, would be checked and any mismatches noted. >> >> > >I've had luck using integrit but it >doesn't do ACLs. You could probably trivially extend it to do so, >though. > > > Thanks Nicholas, I don't recall that as being one of the potential candidates I looked at, so I'll check it out. If I can figure it out, that would be better than starting from scratch :-) Thanks again, Lee C From chinook.nr at tds.net Thu Sep 15 05:31:00 2005 From: chinook.nr at tds.net (Chinook) Date: Wed, 14 Sep 2005 23:31:00 -0400 Subject: [Pythonmac-SIG] librsync, pylibacl, pyxattr ? In-Reply-To: <20050914220640.GB4201@uiuc.edu> References: <20050914220640.GB4201@uiuc.edu> Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050914/207c1600/attachment.htm From kevino at theolliviers.com Thu Sep 15 07:16:10 2005 From: kevino at theolliviers.com (Kevin Ollivier) Date: Wed, 14 Sep 2005 22:16:10 -0700 Subject: [Pythonmac-SIG] py2app 0.2, Python 2.4 and wxPython 2.6.1 Message-ID: Hi all, When I try to bundle a wxPython application using py2app on Python 2.4 under Panther, it runs into a 'file exists' error at build_app.py line 728, which is an os.symlink call at the bottom of copy_python_framework(). (Complete traceback below.) When I switch to the system-included Python 2.3 and run py2app with that, everything runs fine, even with the os.symlink line in place. Does anyone know what could be causing this problem? Is there something special I need to specify when building against a non- system Python? Any help would be greatly appreciated! Thanks, Kevin Full traceback: ------------------------------------------ Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/py2app/build_app.py", line 482, in _run self.run_normal() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/py2app/build_app.py", line 540, in run_normal self.create_binaries(py_files, pkgdirs, extensions, loader_files) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/py2app/build_app.py", line 630, in create_binaries mm.mm.run_file(runtime) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/macholib/MachOGraph.py", line 55, in run_file m = self.findNode(pathname) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/macholib/MachOGraph.py", line 48, in findNode newname = self.locate(name) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/macholib/MachOStandalone.py", line 24, in locate return self.delegate.locate(newname) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/macholib/MachOStandalone.py", line 59, in locate res = self.copy_framework(info) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/py2app/build_app.py", line 46, in copy_framework destfn = self.appbuilder.copy_framework(info, self.dest) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/py2app/build_app.py", line 694, in copy_framework self.copy_python_framework(info, dst) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/py2app/py2app/build_app.py", line 727, in copy_python_framework os.symlink(sym, outf) OSError: [Errno 17] File exists > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ site-packages/py2app/py2app/build_app.py(727)copy_python_framework() -> os.symlink(sym, outf) From bob at redivi.com Thu Sep 15 18:54:43 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 15 Sep 2005 12:54:43 -0400 Subject: [Pythonmac-SIG] py2app 0.2, Python 2.4 and wxPython 2.6.1 In-Reply-To: References: Message-ID: <8EC63B45-74BE-4088-A405-79CED41F0B99@redivi.com> On Sep 15, 2005, at 1:16 AM, Kevin Ollivier wrote: > Hi all, > > When I try to bundle a wxPython application using py2app on Python > 2.4 under Panther, it runs into a 'file exists' error at build_app.py > line 728, which is an os.symlink call at the bottom of > copy_python_framework(). (Complete traceback below.) When I switch to > the system-included Python 2.3 and run py2app with that, everything > runs fine, even with the os.symlink line in place. try from svn trunk -bob From kevino at theolliviers.com Thu Sep 15 19:09:31 2005 From: kevino at theolliviers.com (Kevin Ollivier) Date: Thu, 15 Sep 2005 10:09:31 -0700 Subject: [Pythonmac-SIG] py2app 0.2, Python 2.4 and wxPython 2.6.1 In-Reply-To: <8EC63B45-74BE-4088-A405-79CED41F0B99@redivi.com> References: <8EC63B45-74BE-4088-A405-79CED41F0B99@redivi.com> Message-ID: <06A94515-141C-43E0-B57D-CA86F8DE17FF@theolliviers.com> Hi Bob, On Sep 15, 2005, at 9:54 AM, Bob Ippolito wrote: > > On Sep 15, 2005, at 1:16 AM, Kevin Ollivier wrote: > > >> Hi all, >> >> When I try to bundle a wxPython application using py2app on Python >> 2.4 under Panther, it runs into a 'file exists' error at build_app.py >> line 728, which is an os.symlink call at the bottom of >> copy_python_framework(). (Complete traceback below.) When I switch to >> the system-included Python 2.3 and run py2app with that, everything >> runs fine, even with the os.symlink line in place. >> > > try from svn trunk I tried svn trunk as well. I just ran svn update, but it says I've got the latest revision. Have you changed it since yesterday evening? Thanks, Kevin > -bob > > From adriano at euma.com Thu Sep 15 16:02:19 2005 From: adriano at euma.com (catonano) Date: Thu, 15 Sep 2005 16:02:19 +0200 Subject: [Pythonmac-SIG] wxPython building process on Mac Os X 10.4.x Message-ID: <776BB6EE-E472-4578-A2D0-50ABD871C445@euma.com> Hello listers, as I wrote on wxPython list, I followed the instructions at www.wxpython.org/BUILD.html to check out and build wxWidgets and wxPython. As I also wrote ;-) the fact is that the build process FAILED with python 2.4.1 and succeeded with the Apple installed python 2.3.5 The test with the Apple installed python 2.3.5 succeeded but with SO MANY warnings !! So here I report the session tracing of both the tests, the one with the Apple's python first, then the one with the python 2.4.1 A quick note: on my system /usr/bin/python is python 2.3.5 and ~python is python 2.4.1 thanks anybody for ANY thoughts about this bye Adriano FIRST TEST (with python 2.3.5) [Catonano:wxWidgets/wxWidgets/wxPython] adri% /usr/bin/python setup.py build_ext --inplace --debug UNICODE=1 WX_CONFIG=/opt/wx/2.6/ bin/wx-config Preparing CORE... Preparing GLCANVAS... Preparing STC... Preparing GIZMOS... Preparing ANIMATE... running build_ext building '_core_' extension creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3 creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/_core_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/_core_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/_core_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/_core_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName (const char*, void*, size_t, const char*)' defined but not used src/mac/_core_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/_core_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/_core_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked (PyObject*, void*, size_t, swig_type_info*, int)' defined but not used gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/helpers.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/helpers.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h: In constructor 'wxMacPortSaver::wxMacPortSaver(OpaqueGrafPtr*)': /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:102: warning: 'GetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1862) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:102: warning: 'GetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1862) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:103: warning: 'SetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1847) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:103: warning: 'SetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1847) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h: In destructor 'wxMacPortSaver::~wxMacPortSaver()': /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:107: warning: 'SetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1847) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:107: warning: 'SetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1847) c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/helpers.o build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ _core_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/ _core_.so -framework QuickTime -framework IOKit -framework Carbon - framework Cocoa -framework System building '_gdi_' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/drawlist.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/drawlist.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/_gdi_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/_gdi_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/_gdi_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/_gdi_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName (const char*, void*, size_t, const char*)' defined but not used src/mac/_gdi_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery (const char*)' defined but not used src/mac/_gdi_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/_gdi_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/_gdi_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked (PyObject*, void*, size_t, swig_type_info*, int)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/drawlist.o build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ _gdi_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/_gdi_.so - framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System building '_windows_' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/_windows_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/_windows_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/_windows_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/_windows_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName(const char*, void*, size_t, const char*)' defined but not used src/mac/_windows_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery(const char*)' defined but not used src/mac/_windows_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/_windows_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/_windows_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked(PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/_windows_wrap.cpp:1465: warning: 'int SWIG_CheckLongInRange (long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ _windows_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/ _windows_.so -framework QuickTime -framework IOKit -framework Carbon - framework Cocoa -framework System building '_controls_' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/_controls_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/_controls_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/_controls_wrap.cpp: In function 'PyObject* _wrap_new_BookCtrlSizer(PyObject*, PyObject*, PyObject*)': src/mac/_controls_wrap.cpp:18119: warning: '__comp_ctor ' is deprecated (declared at /opt/wx/2.6/include/wx-2.6/wx/sizer.h:759) src/mac/_controls_wrap.cpp: In function 'PyObject* _wrap_new_NotebookSizer(PyObject*, PyObject*, PyObject*)': src/mac/_controls_wrap.cpp:18233: warning: '__comp_ctor ' is deprecated (declared at /opt/wx/2.6/include/wx-2.6/wx/sizer.h:788) src/mac/_controls_wrap.cpp: At global scope: src/mac/_controls_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/_controls_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName(const char*, void*, size_t, const char*)' defined but not used src/mac/_controls_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery(const char*)' defined but not used src/mac/_controls_wrap.cpp:499: warning: 'void SWIG_PropagateClientData(swig_type_info*)' defined but not used src/mac/_controls_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr(PyObject*, swig_type_info*, int, int)' defined but not used src/mac/_controls_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked(PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/_controls_wrap.cpp:1473: warning: 'int SWIG_CheckLongInRange (long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ _controls_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/ _controls_.so -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System building '_misc_' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/_misc_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/_misc_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/_misc_wrap.cpp: In function 'PyObject* wxDisplay_GetModes (wxDisplay*, const wxVideoMode&)': src/mac/_misc_wrap.cpp:2977: warning: comparison between signed and unsigned integer expressions src/mac/_misc_wrap.cpp: In function 'PyObject* _wrap_DateTime_SetToTheWeek(PyObject*, PyObject*, PyObject*)': src/mac/_misc_wrap.cpp:20985: warning: 'SetToTheWeek' is deprecated (declared at /opt/wx/2.6/include/wx-2.6/wx/datetime.h:696) src/mac/_misc_wrap.cpp: In function 'PyObject* _wrap_DateTime_GetWeek (PyObject*, PyObject*, PyObject*)': src/mac/_misc_wrap.cpp:21035: warning: 'GetWeek' is deprecated (declared at /opt/wx/2.6/include/wx-2.6/wx/datetime.h:699) src/mac/_misc_wrap.cpp: At global scope: src/mac/_misc_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/_misc_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName (const char*, void*, size_t, const char*)' defined but not used src/mac/_misc_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/_misc_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/_misc_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked (PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/_misc_wrap.cpp:1471: warning: 'int SWIG_CheckLongInRange(long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ _misc_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/ _misc_.so -framework QuickTime -framework IOKit -framework Carbon - framework Cocoa -framework System building '_calendar' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/calendar_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/calendar_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/calendar_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/calendar_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName(const char*, void*, size_t, const char*)' defined but not used src/mac/calendar_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery(const char*)' defined but not used src/mac/calendar_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/calendar_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/calendar_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked(PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/calendar_wrap.cpp:1395: warning: 'int SWIG_CheckLongInRange (long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ calendar_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/ _calendar.so -framework QuickTime -framework IOKit -framework Carbon - framework Cocoa -framework System building '_grid' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/grid_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/grid_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/grid_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/grid_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName (const char*, void*, size_t, const char*)' defined but not used src/mac/grid_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/grid_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/grid_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked (PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/grid_wrap.cpp:1914: warning: 'int SWIG_CheckLongInRange(long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ grid_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/_grid.so - framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System building '_html' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/html_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/html_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/html_wrap.cpp: In function 'PyObject* _wrap_HtmlSearchStatus_GetContentsItem(PyObject*, PyObject*, PyObject*)': src/mac/html_wrap.cpp:11097: warning: 'GetContentsItem' is deprecated (declared at /opt/wx/2.6/include/wx-2.6/wx/html/helpdata.h:176) src/mac/html_wrap.cpp: In function 'PyObject* _wrap_HtmlHelpData_GetContents(PyObject*, PyObject*, PyObject*)': src/mac/html_wrap.cpp:11377: warning: 'GetContents' is deprecated (declared at /opt/wx/2.6/include/wx-2.6/wx/html/helpdata.h:232) src/mac/html_wrap.cpp: In function 'PyObject* _wrap_HtmlHelpData_GetContentsCnt(PyObject*, PyObject*, PyObject*)': src/mac/html_wrap.cpp:11403: warning: 'GetContentsCnt' is deprecated (declared at /opt/wx/2.6/include/wx-2.6/wx/html/helpdata.h:233) src/mac/html_wrap.cpp: In function 'PyObject* _wrap_HtmlHelpData_GetIndex(PyObject*, PyObject*, PyObject*)': src/mac/html_wrap.cpp:11431: warning: 'GetIndex' is deprecated (declared at /opt/wx/2.6/include/wx-2.6/wx/html/helpdata.h:234) src/mac/html_wrap.cpp: In function 'PyObject* _wrap_HtmlHelpData_GetIndexCnt(PyObject*, PyObject*, PyObject*)': src/mac/html_wrap.cpp:11457: warning: 'GetIndexCnt' is deprecated (declared at /opt/wx/2.6/include/wx-2.6/wx/html/helpdata.h:235) src/mac/html_wrap.cpp: At global scope: src/mac/html_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/html_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName (const char*, void*, size_t, const char*)' defined but not used src/mac/html_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery (const char*)' defined but not used src/mac/html_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/html_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/html_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked (PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/html_wrap.cpp:1442: warning: 'int SWIG_CheckLongInRange(long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ html_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/_html.so - framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System building '_media' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/media_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/media_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/media_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/media_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName (const char*, void*, size_t, const char*)' defined but not used src/mac/media_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery (const char*)' defined but not used src/mac/media_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/media_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/media_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked (PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/media_wrap.cpp:1459: warning: 'int SWIG_CheckLongInRange(long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ media_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/ _media.so -framework QuickTime -framework IOKit -framework Carbon - framework Cocoa -framework System building '_webkit' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/webkit_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/webkit_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/webkit_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/webkit_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName (const char*, void*, size_t, const char*)' defined but not used src/mac/webkit_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery (const char*)' defined but not used src/mac/webkit_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/webkit_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/webkit_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked (PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/webkit_wrap.cpp:1463: warning: 'int SWIG_CheckLongInRange (long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ webkit_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/ _webkit.so -framework QuickTime -framework IOKit -framework Carbon - framework Cocoa -framework System building '_wizard' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/wizard_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/wizard_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/wizard_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/wizard_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName (const char*, void*, size_t, const char*)' defined but not used src/mac/wizard_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery (const char*)' defined but not used src/mac/wizard_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/wizard_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/wizard_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked (PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/wizard_wrap.cpp:1402: warning: 'int SWIG_CheckLongInRange (long int, long int, long int, const char*)' defined but not used src/mac/wizard_wrap.cpp:4826: warning: 'void SWIG_Python_addvarlink (PyObject*, char*, PyObject* (*)(), int (*)(PyObject*))' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ wizard_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/ _wizard.so -framework QuickTime -framework IOKit -framework Carbon - framework Cocoa -framework System building '_xrc' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c src/mac/xrc_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/xrc_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ src/mac/xrc_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used src/mac/xrc_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName (const char*, void*, size_t, const char*)' defined but not used src/mac/xrc_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery (const char*)' defined but not used src/mac/xrc_wrap.cpp:499: warning: 'void SWIG_PropagateClientData (swig_type_info*)' defined but not used src/mac/xrc_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr (PyObject*, swig_type_info*, int, int)' defined but not used src/mac/xrc_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked (PyObject*, void*, size_t, swig_type_info*, int)' defined but not used src/mac/xrc_wrap.cpp:1412: warning: 'int SWIG_CheckLongInRange(long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/src/mac/ xrc_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/_xrc.so - framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System building '_glcanvas' extension creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/ glcanvas creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/ glcanvas/mac gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c contrib/glcanvas/mac/glcanvas_wrap.cpp -o build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/glcanvas/ mac/glcanvas_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ contrib/glcanvas/mac/glcanvas_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used contrib/glcanvas/mac/glcanvas_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName(const char*, void*, size_t, const char*)' defined but not used contrib/glcanvas/mac/glcanvas_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery(const char*)' defined but not used contrib/glcanvas/mac/glcanvas_wrap.cpp:499: warning: 'void SWIG_PropagateClientData(swig_type_info*)' defined but not used contrib/glcanvas/mac/glcanvas_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr(PyObject*, swig_type_info*, int, int)' defined but not used contrib/glcanvas/mac/glcanvas_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked(PyObject*, void*, size_t, swig_type_info*, int)' defined but not used contrib/glcanvas/mac/glcanvas_wrap.cpp:1385: warning: 'int SWIG_CheckLongInRange(long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/glcanvas/ mac/glcanvas_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 -o wx/ _glcanvas.so -L/opt/wx/2.6/lib -framework QuickTime -framework IOKit - framework Carbon -framework Cocoa -framework System -lwx_macud_gl-2.6 -lwx_macud-2.6 -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System building '_stc' extension creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/stc creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/ stc/mac gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c contrib/stc/mac/stc_wrap.cpp -o build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/stc/mac/ stc_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ contrib/stc/mac/stc_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used contrib/stc/mac/stc_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName(const char*, void*, size_t, const char*)' defined but not used contrib/stc/mac/stc_wrap.cpp:499: warning: 'void SWIG_PropagateClientData(swig_type_info*)' defined but not used contrib/stc/mac/stc_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr(PyObject*, swig_type_info*, int, int)' defined but not used contrib/stc/mac/stc_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked(PyObject*, void*, size_t, swig_type_info*, int)' defined but not used contrib/stc/mac/stc_wrap.cpp:1399: warning: 'int SWIG_CheckLongInRange (long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/stc/mac/ stc_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 - lwx_macud_stc-2.6 -o wx/_stc.so -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System building '_gizmos' extension creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/ gizmos creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/ gizmos/wxCode creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/ gizmos/wxCode/src creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/ gizmos/mac gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -Icontrib/gizmos -Icontrib/gizmos/wxCode/include -I/ System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c contrib/gizmos/wxCode/src/treelistctrl.cpp -o build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/gizmos/ wxCode/src/treelistctrl.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h: In constructor 'wxMacPortSaver::wxMacPortSaver(OpaqueGrafPtr*)': /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:102: warning: 'GetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1862) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:102: warning: 'GetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1862) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:103: warning: 'SetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1847) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:103: warning: 'SetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1847) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h: In destructor 'wxMacPortSaver::~wxMacPortSaver()': /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:107: warning: 'SetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1847) /opt/wx/2.6/include/wx-2.6/wx/mac/carbon/private.h:107: warning: 'SetPort' is deprecated (declared at /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/QD.framework/Headers/ Quickdraw.h:1847) gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -Icontrib/gizmos -Icontrib/gizmos/wxCode/include -I/ System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c contrib/gizmos/mac/gizmos_wrap.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/gizmos/mac/ gizmos_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ contrib/gizmos/mac/gizmos_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used contrib/gizmos/mac/gizmos_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName(const char*, void*, size_t, const char*)' defined but not used contrib/gizmos/mac/gizmos_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery(const char*)' defined but not used contrib/gizmos/mac/gizmos_wrap.cpp:499: warning: 'void SWIG_PropagateClientData(swig_type_info*)' defined but not used contrib/gizmos/mac/gizmos_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr(PyObject*, swig_type_info*, int, int)' defined but not used contrib/gizmos/mac/gizmos_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked(PyObject*, void*, size_t, swig_type_info*, int)' defined but not used contrib/gizmos/mac/gizmos_wrap.cpp:1432: warning: 'int SWIG_CheckLongInRange(long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/gizmos/ wxCode/src/treelistctrl.o build.unicode/temp.darwin-8.2.0- Power_Macintosh-2.3/contrib/gizmos/mac/gizmos_wrap.o -L/opt/wx/2.6/ lib -lstdc++ -lwx_macud-2.6 -lwx_macud_gizmos-2.6 -o wx/_gizmos.so - framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System building '_animate' extension creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/ animate creating build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/ animate/mac gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/System/Library/Frameworks/Python.framework/Versions/ 2.3/include/python2.3 -c contrib/animate/mac/animate_wrap.cpp -o build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/animate/ mac/animate_wrap.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ contrib/animate/mac/animate_wrap.cpp:231: warning: 'swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)' defined but not used contrib/animate/mac/animate_wrap.cpp:419: warning: 'const char* SWIG_UnpackDataName(const char*, void*, size_t, const char*)' defined but not used contrib/animate/mac/animate_wrap.cpp:483: warning: 'swig_type_info* SWIG_TypeQuery(const char*)' defined but not used contrib/animate/mac/animate_wrap.cpp:499: warning: 'void SWIG_PropagateClientData(swig_type_info*)' defined but not used contrib/animate/mac/animate_wrap.cpp:1199: warning: 'void* SWIG_Python_MustGetPtr(PyObject*, swig_type_info*, int, int)' defined but not used contrib/animate/mac/animate_wrap.cpp:1213: warning: 'int SWIG_Python_ConvertPacked(PyObject*, void*, size_t, swig_type_info*, int)' defined but not used contrib/animate/mac/animate_wrap.cpp:1396: warning: 'int SWIG_CheckLongInRange(long int, long int, long int, const char*)' defined but not used c++ -Wl,-F. -Wl,-F. -bundle -undefined dynamic_lookup -g build.unicode/temp.darwin-8.2.0-Power_Macintosh-2.3/contrib/animate/ mac/animate_wrap.o -L/opt/wx/2.6/lib -lstdc++ -lwx_macud-2.6 - lwx_macud_animate-2.6 -o wx/_animate.so -framework QuickTime - framework IOKit -framework Carbon -framework Cocoa -framework System running build_ext [Catonano:wxWidgets/wxWidgets/wxPython] adri% SECOND TEST (with python 2.4.1) [Catonano:wxWidgets/wxWidgets/wxPython] adri% python setup.py build_ext --inplace --debug UNICODE=1 WX_CONFIG=/opt/wx/2.6/bin/wx- config Preparing CORE... Preparing GLCANVAS... Preparing STC... Preparing GIZMOS... Preparing ANIMATE... running build_ext building '_core_' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - g -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXMAC__ - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc - I/opt/wx/2.6/lib/wx/include/mac-unicode-debug-2.6 -I/opt/wx/2.6/ include/wx-2.6 -I/Library/Frameworks/Python.framework/Versions/2.4/ include/python2.4 -c src/helpers.cpp -o build.unicode/ temp.darwin-8.2.0-Power_Macintosh-2.4/src/helpers.o -g -O0 cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++ /opt/wx/2.6/include/wx-2.6/wx/string.h: In function 'int Stricmp (const char*, const char*)': /opt/wx/2.6/include/wx-2.6/wx/string.h:135: error: 'strcasecmp' was not declared in this scope /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/MacMemory.h: In function 'void BlockZero (void*, Size)': /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/MacMemory.h:1587: error: 'bzero' was not declared in this scope /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/MacMemory.h: In function 'void BlockZeroUncached(void*, Size)': /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/MacMemory.h:1595: error: 'bzero' was not declared in this scope /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/fp.h: In function 'long double gammal (long double)': /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/fp.h:2027: error: 'gamma' was not declared in this scope /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/fp.h: In function 'long int rinttoll (long double)': /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/fp.h:2141: error: 'rinttol' was not declared in this scope /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/fp.h: In function 'long int roundtoll (long double)': /System/Library/Frameworks/CoreServices.framework/Frameworks/ CarbonCore.framework/Headers/fp.h:2179: error: 'roundtol' was not declared in this scope error: command 'gcc' failed with exit status 1 From leknarf at pacbell.net Thu Sep 15 23:07:45 2005 From: leknarf at pacbell.net (Scott Frankel) Date: Thu, 15 Sep 2005 14:07:45 -0700 Subject: [Pythonmac-SIG] bad magic Message-ID: I am just now, finally, able to upgrade osx & python to latest release versions: 10.4.2 & 2.4.1, respectively). I've had half an eye on the traffic on this list, so installation went well. 2.4.1 is humming smoothly. I'm running into the following error, though, when my scripts import my own .pyc files. Bad magic number in These modules were originally written in, and compiled with, python v2.3. After installing python2.4.1, I also installed TigerPython24Fix and TigerPython23Compat. Do I need to recompile all my modules now? Thanks in advance! Scott From delza at livingcode.org Fri Sep 16 00:50:22 2005 From: delza at livingcode.org (Dethe Elza) Date: Thu, 15 Sep 2005 15:50:22 -0700 Subject: [Pythonmac-SIG] bad magic In-Reply-To: References: Message-ID: On 15-Sep-05, at 2:07 PM, Scott Frankel wrote: > I am just now, finally, able to upgrade osx & python to latest release > versions: 10.4.2 & 2.4.1, respectively). I've had half an eye on the > traffic on this list, so installation went well. 2.4.1 is humming > smoothly. > > I'm running into the following error, though, when my scripts > import my > own .pyc files. > > Bad magic number in > > These modules were originally written in, and compiled with, python > v2.3. > > After installing python2.4.1, I also installed TigerPython24Fix and > TigerPython23Compat. Do I need to recompile all my modules now? Yes, Python does not maintain binary compatibility across point releases, only across sub-point releases. So modules compiled with 2.3.1 should be OK in 2.3.2, but need to be recompiled for 2.4 and up. HTH --Dethe "...coding isn't the poor handmaiden of design or analysis. Coding is where your fuzzy, comfortable ideas awaken in the harsh dawn of reality. It is where you learn what your computer can do. If you stop coding, you stop learning." Kent Beck, Smalltalk Best Practice Patterns From leknarf at pacbell.net Fri Sep 16 02:27:58 2005 From: leknarf at pacbell.net (Scott Frankel) Date: Thu, 15 Sep 2005 17:27:58 -0700 Subject: [Pythonmac-SIG] pth file location Message-ID: Where do .pth files go in python 2.4.1 running on osx 10.4.2? My best guess (after a few not-so-good-ones) was: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/ But my python is still looking in the wrong place for its newly compiled modules. Thanks in advance! Scott From leknarf at pacbell.net Fri Sep 16 18:05:09 2005 From: leknarf at pacbell.net (Scott Frankel) Date: Fri, 16 Sep 2005 09:05:09 -0700 Subject: [Pythonmac-SIG] pth file location In-Reply-To: References: Message-ID: <80d2fcb6ee3e75e5371623995e58cf74@pacbell.net> Still bad magic. Where should .pth files be placed for 3rd party modules to be found? My attempts (latest: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/my_3rd_party.pth) is still leading to bad magic errors. The path printed by the err msg does not correspond to the path specified in the .pth file. This is on a system upgraded from 10.3 to 10.4 and python 2.3 to 2.4.1 yesterday. I've installed TigerPython24Fix and TigerPython23Compat. Thanks in advance! Scott On Sep 15, 2005, at 5:27 PM, Scott Frankel wrote: > > Where do .pth files go in python 2.4.1 running on osx 10.4.2? > > My best guess (after a few not-so-good-ones) was: > > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- > packages/ > > But my python is still looking in the wrong place for its newly > compiled modules. > > Thanks in advance! > Scott > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From rkern at ucsd.edu Fri Sep 16 18:19:36 2005 From: rkern at ucsd.edu (Robert Kern) Date: Fri, 16 Sep 2005 09:19:36 -0700 Subject: [Pythonmac-SIG] pth file location In-Reply-To: <80d2fcb6ee3e75e5371623995e58cf74@pacbell.net> References: <80d2fcb6ee3e75e5371623995e58cf74@pacbell.net> Message-ID: <432AF098.7090907@ucsd.edu> Scott Frankel wrote: > Still bad magic. > > Where should .pth files be placed for 3rd party modules to be found? > My attempts (latest: > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- > packages/my_3rd_party.pth) is still leading to bad magic errors. The > path printed by the err msg does not correspond to the path specified > in the .pth file. Could you actually show us the error messages? -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From leknarf at pacbell.net Fri Sep 16 18:24:03 2005 From: leknarf at pacbell.net (Scott Frankel) Date: Fri, 16 Sep 2005 09:24:03 -0700 Subject: [Pythonmac-SIG] pth file location In-Reply-To: <80d2fcb6ee3e75e5371623995e58cf74@pacbell.net> References: <80d2fcb6ee3e75e5371623995e58cf74@pacbell.net> Message-ID: <97b8213a5bdf63b2dc84877f8f60fc64@pacbell.net> No more bad magic. Just bad memory. Forgot to comment-out an explicit python path env var. Everything seems to be working now. Thanks Scott On Sep 16, 2005, at 9:05 AM, Scott Frankel wrote: > > Still bad magic. > > Where should .pth files be placed for 3rd party modules to be found? > My attempts (latest: > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- > packages/my_3rd_party.pth) is still leading to bad magic errors. The > path printed by the err msg does not correspond to the path specified > in the .pth file. > > This is on a system upgraded from 10.3 to 10.4 and python 2.3 to 2.4.1 > yesterday. I've installed TigerPython24Fix and TigerPython23Compat. > > Thanks in advance! > Scott > > > On Sep 15, 2005, at 5:27 PM, Scott Frankel wrote: > >> >> Where do .pth files go in python 2.4.1 running on osx 10.4.2? >> >> My best guess (after a few not-so-good-ones) was: >> >> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- >> packages/ >> >> But my python is still looking in the wrong place for its newly >> compiled modules. >> >> Thanks in advance! >> Scott >> >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From andrea.valle at unito.it Sat Sep 17 01:12:05 2005 From: andrea.valle at unito.it (andrea valle) Date: Sat, 17 Sep 2005 01:12:05 +0200 Subject: [Pythonmac-SIG] troubles with distutils In-Reply-To: <20050628210831.GD31180@ActiveState.com> References: <20050628210831.GD31180@ActiveState.com> Message-ID: Hi to all, it's a bit strange since it's some years I use python but actually I've never used external packages. So I'm a total newbie on the subject. Now I want to install pyx (http://pyx.sourceforge.net/) but it seems that I am not able to. this is my command line: Last login: Thu Jan 1 01:00:39 on console Welcome to Darwin! apples-Computer:~ apple$ python /Users/apple/Desktop/PyX-0.8.1/setup.py install running install error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "" but "10.3" during configure apples-Computer:~ apple$ What's the problem? What should I do? Thanks a lot -a- pS: I've macosx 10.3.8 with active Python 2.4 (#1, Jun 12 2005, 14:30:47) From nil at redshed.net Sat Sep 17 12:29:54 2005 From: nil at redshed.net (Jonathan 'Wolf' Rentzsch) Date: Sat, 17 Sep 2005 05:29:54 -0500 Subject: [Pythonmac-SIG] Xcode build button disabled Message-ID: <20050917102955.CA0296A2883@mail.redshed.net> Greetings all, I've been getting reports from folks who try the PyObjC tutorial at . They install the 1.3.7 installer and attempt to follow along, but they get a disable build button in Xcode. I didn't get this on my machine, has anyone else run into this? Or better, has a fix? :-) | Jonathan 'Wolf' Rentzsch http://rentzsch.com | Red Shed Software http://redshed.net | "better" necessarily means "different" From mbaxter at telia.com Sat Sep 17 12:36:40 2005 From: mbaxter at telia.com (Mark Baxter) Date: Sat, 17 Sep 2005 12:36:40 +0200 Subject: [Pythonmac-SIG] Xcode build button disabled In-Reply-To: <20050917102955.CA0296A2883@mail.redshed.net> References: <20050917102955.CA0296A2883@mail.redshed.net> Message-ID: On Sep 17, 2005, at 12:29 PM, Jonathan 'Wolf' Rentzsch wrote: > Greetings all, > > I've been getting reports from folks who try the PyObjC tutorial at > . They install the 1.3.7 > installer and attempt to follow along, but they get a disable build > button in Xcode. I didn't get this on my machine, has anyone else run > into this? Or better, has a fix? :-) > This is the mean and median program? I had that issue and I still haven't solved it. Downloading the project from Apple's site gave me a fully working version but the one I had typed in (and use Interface Builder for) just would not give me an option to run the thing. In the end I decided to move my project to command line for the time being and then, when I have got the core functionality working, design an interface and slot the already working code in. /MB From nil at redshed.net Sat Sep 17 12:50:26 2005 From: nil at redshed.net (Jonathan 'Wolf' Rentzsch) Date: Sat, 17 Sep 2005 05:50:26 -0500 Subject: [Pythonmac-SIG] Xcode build button disabled Message-ID: <20050917105027.D8DE96A28F9@mail.redshed.net> Mark Baxter, mbaxter at telia.com, wrote: >This is the mean and median program? That's the one :-) >I had that issue and I still haven't solved it. Downloading the >project from Apple's site gave me a fully working version but the one >I had typed in (and use Interface Builder for) just would not give me >an option to run the thing. In the end I decided to move my project >to command line for the time being and then, when I have got the core >functionality working, design an interface and slot the already >working code in. Curiouser and curiouser. Thanks for the feedback. | Jonathan 'Wolf' Rentzsch http://rentzsch.com | Red Shed Software http://redshed.net | "better" necessarily means "different" From chinook.nr at tds.net Sun Sep 18 05:42:53 2005 From: chinook.nr at tds.net (Chinook) Date: Sat, 17 Sep 2005 23:42:53 -0400 Subject: [Pythonmac-SIG] py-rdiff-backup? Message-ID: *** I posted this on the rdiff-backup list, but the traffic there is next to nothing, so it being a python package I'm taking a shot at the pythonmac community :-) *** Ok, lets take a different shot at this :-) I would like to checkout rdiff-backup usage on Mac OS X (10.4.2) 1) Are there any other such users out there? 2) I want to use the full functionality but there are two limitations, namely ACLs and EAs. The various port packages have "librsync" included as a dependency but do not include pylibacl and pyxattr. 2a) EA support: supposedly with "pyxattr" recognized, but in Mac OS X the proper module is "xattr" which I have in my pythonmac 2.4.1 installation (/usr/local/) and in the DarwinPorts environment (/opt/local/). Other than my PATH variable, how do I get rdiff-backup to recognize "xattr?" 2b) ACL support: supposedly with "pylibacl" recognized, but I can't find any such thing for Darwin. The "standard" download setup.py checks for Linux and Free-BSD only and quits. Having looked (with my limited understanding) at the Carbon "FPGetACL" which pylibacl would, I believe, have to get down to, I'm not adventurous enough to just add Darwin to the setup.py. Is there any merit in pursuing this aspect? Thank you, Lee C From skip at pobox.com Sun Sep 18 06:06:10 2005 From: skip at pobox.com (skip@pobox.com) Date: Sat, 17 Sep 2005 23:06:10 -0500 Subject: [Pythonmac-SIG] py-rdiff-backup? In-Reply-To: References: Message-ID: <17196.59314.639071.578109@montanaro.dyndns.org> Lee> I would like to checkout rdiff-backup usage on Mac OS X (10.4.2) Lee> 1) Are there any other such users out there? I use rdiff-backup from time-to-time between my laptop and my G5. Both are running 10.3.9 though. Sorry, I can't help with ACL and EA support. (I've not even got a clue what "EA" means.) -- Skip Montanaro Katrina Benefit Concerts: http://www.musi-cal.com/katrina skip at pobox.com From chinook.nr at tds.net Sun Sep 18 06:26:59 2005 From: chinook.nr at tds.net (Chinook) Date: Sun, 18 Sep 2005 00:26:59 -0400 Subject: [Pythonmac-SIG] py-rdiff-backup? In-Reply-To: <17196.59314.639071.578109@montanaro.dyndns.org> References: <17196.59314.639071.578109@montanaro.dyndns.org> Message-ID: skip at pobox.com wrote: > Lee> I would like to checkout rdiff-backup usage on Mac OS X (10.4.2) > > Lee> 1) Are there any other such users out there? > >I use rdiff-backup from time-to-time between my laptop and my G5. Both are >running 10.3.9 though. Sorry, I can't help with ACL and EA support. (I've >not even got a clue what "EA" means.) > > > Fair-nuf Skip and thanks for the reply. Extended attributes (EAs) extend the basic attributes of files and directories in a file system. They did not appear (to my knowledge) in OS X until Tiger. So you would not have encountered them I guess. So, in Panther have you noticed any rdiff induced problems with time stamps, permissions, forks, whatever? Thanks again, Lee C From Chris.Barker at noaa.gov Sun Sep 18 08:58:15 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Sat, 17 Sep 2005 23:58:15 -0700 Subject: [Pythonmac-SIG] troubles with distutils In-Reply-To: References: <20050628210831.GD31180@ActiveState.com> Message-ID: <432D1007.70107@noaa.gov> andrea valle wrote: > Now I want to install pyx (http://pyx.sourceforge.net/) but it seems > that I am not able to. > > this is my command line: > > apples-Computer:~ apple$ python /Users/apple/Desktop/PyX-0.8.1/setup.py > install > running install > error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "" but "10.3" during > configure > apples-Computer:~ apple$ > > What's the problem? What should I do? > > pS: I've macosx 10.3.8 with active Python 2.4 (#1, Jun 12 2005, > 14:30:47) I'm not sure I can be that much help, but I can think of a couple things to try first; Are you sure you're getting active Python with "python" at the command line? Depending on how your PATH is configured, you may not be. Perhaps the package you downloaded has some cruft left over from a build on the developer's machine. Try: python setup.py build (you should do that anyway, I always build first, as a user, and then install with sudo) If that gets the same error, you might try deleting the build directory, if there is one, and trying again. It's the easiest way to force a complete rebuild. -Chris From andrea.valle at unito.it Sun Sep 18 14:57:31 2005 From: andrea.valle at unito.it (andrea valle) Date: Sun, 18 Sep 2005 14:57:31 +0200 Subject: [Pythonmac-SIG] troubles with distutils In-Reply-To: <432D1007.70107@noaa.gov> References: <20050628210831.GD31180@ActiveState.com> <432D1007.70107@noaa.gov> Message-ID: <057a7d43ec107f1868bcc6b8ef91c06f@unito.it> (Thanks for your help) > Are you sure you're getting active Python with "python" at the command > line? Yes 2.4 is only active state. I will try your suggestions. In any case, I tested with python2.3 (macpython) apples-Computer:~ apple$ python2.3 /Users/apple/Desktop/PyRTF-0.45/setup.py install running install running build running build_py error: package directory './PyRTF' does not exist the same with: apples-Computer:~ apple$ python2.3 /Users/apple/Desktop/PyX-0.8.1/setup.py install running install running build running build_py error: package directory 'pyx' does not exist There's no more errors of mismatching but there's another one (which seems to be systematic too). Can anyone tell me how to solve this? Should I place installation folder in specific places, I left thoem on desktop? -a- Andrea Valle Laboratorio multimediale "G. Quazza" Facolt? di Scienze della Formazione Universit? degli Studi di Torino andrea.valle at unito.it From rkern at ucsd.edu Sun Sep 18 15:09:15 2005 From: rkern at ucsd.edu (Robert Kern) Date: Sun, 18 Sep 2005 06:09:15 -0700 Subject: [Pythonmac-SIG] troubles with distutils In-Reply-To: <057a7d43ec107f1868bcc6b8ef91c06f@unito.it> References: <20050628210831.GD31180@ActiveState.com> <432D1007.70107@noaa.gov> <057a7d43ec107f1868bcc6b8ef91c06f@unito.it> Message-ID: <432D66FB.9080209@ucsd.edu> andrea valle wrote: > (Thanks for your help) > >>Are you sure you're getting active Python with "python" at the command >>line? > > Yes > 2.4 is only active state. > I will try your suggestions. > > In any case, I tested with python2.3 (macpython) > > apples-Computer:~ apple$ python2.3 > /Users/apple/Desktop/PyRTF-0.45/setup.py install > running install > running build > running build_py > error: package directory './PyRTF' does not exist You have to be in the directory with the setup.py . $ cd Desktop/PyRTF-0.45 $ python setup.py install -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From ronaldoussoren at mac.com Sun Sep 18 16:29:47 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 18 Sep 2005 16:29:47 +0200 Subject: [Pythonmac-SIG] troubles with distutils In-Reply-To: References: <20050628210831.GD31180@ActiveState.com> Message-ID: On 17-sep-2005, at 1:12, andrea valle wrote: > Hi to all, > it's a bit strange since it's some years I use python but actually > I've > never used external packages. So I'm a total newbie on the subject. > Now I want to install pyx (http://pyx.sourceforge.net/) but it seems > that I am not able to. > > this is my command line: > > Last login: Thu Jan 1 01:00:39 on console > Welcome to Darwin! > apples-Computer:~ apple$ python /Users/apple/Desktop/PyX-0.8.1/ > setup.py > install > running install > error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "" but "10.3" during > configure > apples-Computer:~ apple$ > > What's the problem? What should I do? That's odd. You shouldn't get this error message. The error message tell you that the environment variable MACOSX_DEPLOYMENT_TARGET is present and has a value that is different from the time that Python was build. However, when the current value is the empty string (what the error message seems to suggest) python should just use the value that was used when python was build. What happens when you do this in the shell: $ cd /Users/apple/Desktop/PyX-0.8.1 $ MACOSX_DEPLOYMENT_TARGET= python setup.py install And what is the output of: python -c "import os; print repr(os.getenv ('MACOSX_DEPLOYMENT_TARGET', ''))" Ronald > > Thanks a lot > > -a- > > pS: I've macosx 10.3.8 with active Python 2.4 (#1, Jun 12 2005, > 14:30:47) > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050918/8ac0d18e/smime.bin From andrea.valle at unito.it Mon Sep 19 00:05:58 2005 From: andrea.valle at unito.it (andrea valle) Date: Mon, 19 Sep 2005 00:05:58 +0200 Subject: [Pythonmac-SIG] troubles with distutils In-Reply-To: References: <20050628210831.GD31180@ActiveState.com> Message-ID: <1085f61db04c5afa286f574243ec782c@unito.it> (thanks) I tried both suggestions. Seems to change nothing. Here you have bash: 1. > MACOSX_DEPLOYMENT_TARGET= python setup.py install Last login: Sun Sep 18 14:44:18 on ttyp1 Welcome to Darwin! apples-Computer:~ apple$ cd /Users/apple/Desktop/PyX-0.8.1 apples-Computer:~/Desktop/PyX-0.8.1 apple$ MACOSX_DEPLOYMENT_TARGET= python setup.py install running install error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "" but "10.3" during configure apples-Computer:~/Desktop/PyX-0.8.1 apple$ 2. > And what is the output of: python -c "import os; print > repr(os.getenv('MACOSX_DEPLOYMENT_TARGET', ''))" apples-Computer:~ apple$ python -c "import os; print repr(os.getenv('MACOSX_DEPLOYMENT_TARGET', ''))" '' apples-Computer:~ apple$ Best -a- Andrea Valle Laboratorio multimediale "G. Quazza" Facolt? di Scienze della Formazione Universit? degli Studi di Torino andrea.valle at unito.it From jforcier at strozllc.com Mon Sep 19 18:26:04 2005 From: jforcier at strozllc.com (Jeffrey E. Forcier) Date: Mon, 19 Sep 2005 12:26:04 -0400 Subject: [Pythonmac-SIG] Xcode build button disabled, plus build failure Message-ID: <391ABCA1-46C4-41A9-ACBF-AF62F97C96B8@strozllc.com> Greets all, Just started learning PyObjC/Cocoa/XCode/IB over the past week, and ran into the same issue. Turns out that just creating a Custom Executable pointing at the py2app build location will do the trick. Also, I ran into an issue where any default PyObjC project will fail on build (either in XCode or via python setup.py py2app manually). Found a solution to that too. I forget the specifics, but somewhere in py2app's source it expects a certain directory structure which is slightly different from whatever the default PyObjC template sets up. The solution, for me, is to remove localization from the nib file, e.g. do a Get Info on MainMenu.nib in XCode, and click the 'Remove All Localizations' button. This has the effect of moving MainMenu.nib from $PROJECT_DIR/English.lproj/ to $PROJECT_DIR/. After making that change, the project builds successfully. Regards, Jeff -- Jeffrey E. Forcier Junior Developer, Research and Development Stroz Friedberg, LLC 15 Maiden Lane, 12th Floor New York, NY 10038 [main]212-981-6540 [direct]212-981-6546 http://www.strozllc.com This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived or lost by any error in transmission. If you have received this message in error, please immediately notify the sender by e-mail or by telephone at 212.981.6540, delete the message and all copies from your system and destroy any hard copies. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. From ronaldoussoren at mac.com Mon Sep 19 18:54:58 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 19 Sep 2005 18:54:58 +0200 Subject: [Pythonmac-SIG] troubles with distutils In-Reply-To: <1085f61db04c5afa286f574243ec782c@unito.it> References: <20050628210831.GD31180@ActiveState.com> <1085f61db04c5afa286f574243ec782c@unito.it> Message-ID: <0E0E355B-A810-4746-9513-2BD0233AAB3C@mac.com> On 19-sep-2005, at 0:05, andrea valle wrote: > (thanks) > I tried both suggestions. Seems to change nothing. > Here you have bash: > > > 1. > > >> MACOSX_DEPLOYMENT_TARGET= python setup.py install >> > > > Last login: Sun Sep 18 14:44:18 on ttyp1 > Welcome to Darwin! > apples-Computer:~ apple$ cd /Users/apple/Desktop/PyX-0.8.1 > apples-Computer:~/Desktop/PyX-0.8.1 apple$ > MACOSX_DEPLOYMENT_TARGET= python setup.py install > running install > error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "" but "10.3" during > configure > apples-Computer:~/Desktop/PyX-0.8.1 apple$ > > > 2. > >> And what is the output of: python -c "import os; print repr >> (os.getenv('MACOSX_DEPLOYMENT_TARGET', ''))" >> > > apples-Computer:~ apple$ python -c "import os; print repr(os.getenv > ('MACOSX_DEPLOYMENT_TARGET', ''))" > '' > apples-Computer:~ apple$ This is very strange. I have no idea why this doesn't work for you. It works for me (TM), although I'm using a homebuild version of Python 2.4. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050919/4a0feb84/smime.bin From jforcier at strozllc.com Mon Sep 19 19:25:46 2005 From: jforcier at strozllc.com (Jeffrey E. Forcier) Date: Mon, 19 Sep 2005 13:25:46 -0400 Subject: [Pythonmac-SIG] XCode autoindenting? Message-ID: <266F95B3-DB38-4529-AE80-EDFF00723706@strozllc.com> Is it just me, or does XCode (any version; using 2.1) not properly autoindent Python? There's a section under Preferences dealing with autoindents, but no matter what I try, I can't get it to display your typical Python autoindent behavior (e.g. automatically indent upon pressing Enter after a colon). Am I missing something or is XCode still lacking this feature, despite having good Python support otherwise? Thanks, Jeff -- Jeffrey E. Forcier Junior Developer, Research and Development Stroz Friedberg, LLC 15 Maiden Lane, 12th Floor New York, NY 10038 [main]212-981-6540 [direct]212-981-6546 http://www.strozllc.com This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived or lost by any error in transmission. If you have received this message in error, please immediately notify the sender by e-mail or by telephone at 212.981.6540, delete the message and all copies from your system and destroy any hard copies. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. From ronaldoussoren at mac.com Mon Sep 19 19:29:19 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 19 Sep 2005 19:29:19 +0200 Subject: [Pythonmac-SIG] XCode autoindenting? In-Reply-To: <266F95B3-DB38-4529-AE80-EDFF00723706@strozllc.com> References: <266F95B3-DB38-4529-AE80-EDFF00723706@strozllc.com> Message-ID: On 19-sep-2005, at 19:25, Jeffrey E. Forcier wrote: > Is it just me, or does XCode (any version; using 2.1) not properly > autoindent Python? There's a section under Preferences dealing with > autoindents, but no matter what I try, I can't get it to display your > typical Python autoindent behavior (e.g. automatically indent upon > pressing Enter after a colon). Am I missing something or is XCode > still lacking this feature, despite having good Python support > otherwise? What good Python support? AFAIK Python support in Xcode is limited to syntax coloring. I'd like to see good Python support (not only autoindent but also support for Python debugging), but I don't think that'll happen unless lots of python programmers start filing feature requests for this in Apple's bugreporter. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050919/18547951/smime.bin From jforcier at strozllc.com Mon Sep 19 19:48:08 2005 From: jforcier at strozllc.com (Jeffrey E. Forcier) Date: Mon, 19 Sep 2005 13:48:08 -0400 Subject: [Pythonmac-SIG] XCode autoindenting? In-Reply-To: References: <266F95B3-DB38-4529-AE80-EDFF00723706@strozllc.com> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sep 19, 2005, at 1:29 PM, Ronald Oussoren wrote: > What good Python support? AFAIK Python support in Xcode is limited > to syntax coloring. > > I'd like to see good Python support (not only autoindent but also > support for Python debugging), but I don't think that'll happen > unless lots of python programmers start filing feature requests for > this in Apple's bugreporter. > > Ronald Well, by 'good' I mean 'better than I remember XCode 1.x having' which may well be incorrect anyways. Yea, it's mostly just syntax coloring, although it also knows enough to populate the symbols navigation dropdown. It's just always odd to find an editor supporting the syntax but not the autoindent, as I find both to be near deal-breakers. Bug report filed. Any idea how responsive Apple has been to community requests? The only thing I've heard of is the whole WebKit/KHTML debacle. Thanks, Jeff - -- Jeffrey E. Forcier Junior Developer, Research and Development Stroz Friedberg, LLC 15 Maiden Lane, 12th Floor New York, NY 10038 [main]212-981-6540 [direct]212-981-6546 http://www.strozllc.com This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived or lost by any error in transmission. If you have received this message in error, please immediately notify the sender by e-mail or by telephone at 212.981.6540, delete the message and all copies from your system and destroy any hard copies. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDLvnZp45MMXK8DgERAqxgAKDEgaV/8K7jyhmm4DiS5hXrlCUfrACeNwdX r+ebtfWDc8CNT4O2wJ0abEg= =uCs6 -----END PGP SIGNATURE----- From jdhunter at ace.bsd.uchicago.edu Tue Sep 20 13:10:36 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Tue, 20 Sep 2005 06:10:36 -0500 Subject: [Pythonmac-SIG] OT: auto launch X11 prefs Message-ID: <87ll1s570z.fsf@peds-pc311.bsd.uchicago.edu> Sorry to abuse this list with an off-topic OS X question: time is very short for me because I am trying to get ready for a presentation this morning and I need to tap into your collective brains. I installed open office X11 edition last night and when it completed at launch time it asked me for my X11 install. I errantly pointed it to my Xcode app, and now whenever I try to launch open office it launches xcode and this fails with an inability to connect to X11 message. Now, when I relaunch (after a clean install in which I flushed the install dir) it autolaunches xcode w/o asking. So this looks like a system preference. Any suggestions as to how to reset it? I checked the System Preference folder but nothing leapt out at me. Nor did the finder preferences help.... Thanks! JDH From leknarf at pacbell.net Tue Sep 20 19:29:15 2005 From: leknarf at pacbell.net (Scott Frankel) Date: Tue, 20 Sep 2005 10:29:15 -0700 Subject: [Pythonmac-SIG] OT: auto launch X11 prefs In-Reply-To: <87ll1s570z.fsf@peds-pc311.bsd.uchicago.edu> References: <87ll1s570z.fsf@peds-pc311.bsd.uchicago.edu> Message-ID: <1E3CDD98-9DB4-4E80-AA30-24E9D0B7D803@pacbell.net> Disclaimer: I'm not currently using X11, nor have I ever used Open Office. That said, the first thing that comes to mind is to check the Finder's Info window on Open Office; look for the "Open with" section. I dunno about applications, but files carry with them application creator codes that can sometimes get all fup duck ... Good luck - Scott On Sep 20, 2005, at 4:10 AM, John Hunter wrote: > > Sorry to abuse this list with an off-topic OS X question: time is very > short for me because I am trying to get ready for a presentation this > morning and I need to tap into your collective brains. > > I installed open office X11 edition last night and when it completed > at launch time it asked me for my X11 install. I errantly pointed it > to my Xcode app, and now whenever I try to launch open office it > launches xcode and this fails with an inability to connect to X11 > message. > > Now, when I relaunch (after a clean install in which I flushed the > install dir) it autolaunches xcode w/o asking. So this looks like a > system preference. Any suggestions as to how to reset it? I checked > the System Preference folder but nothing leapt out at me. Nor did the > finder preferences help.... > > Thanks! > JDH > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From ronaldoussoren at mac.com Wed Sep 21 20:36:57 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 21 Sep 2005 20:36:57 +0200 Subject: [Pythonmac-SIG] XCode autoindenting? In-Reply-To: References: <266F95B3-DB38-4529-AE80-EDFF00723706@strozllc.com> Message-ID: <524D8CFC-57EC-4C06-BDC5-035DC0DA7D3E@mac.com> On 19-sep-2005, at 19:48, Jeffrey E. Forcier wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sep 19, 2005, at 1:29 PM, Ronald Oussoren wrote: > > >> What good Python support? AFAIK Python support in Xcode is limited >> to syntax coloring. >> >> I'd like to see good Python support (not only autoindent but also >> support for Python debugging), but I don't think that'll happen >> unless lots of python programmers start filing feature requests >> for this in Apple's bugreporter. >> >> Ronald >> > > Well, by 'good' I mean 'better than I remember XCode 1.x having' > which may well be incorrect anyways. Yea, it's mostly just syntax > coloring, although it also knows enough to populate the symbols > navigation dropdown. > > It's just always odd to find an editor supporting the syntax but > not the autoindent, as I find both to be near deal-breakers. Xcode support syntax coloring for a lot languages, including fringe languages like Dylan. Someone seems to have overengeneered the syntax coloring system :-) > > Bug report filed. Any idea how responsive Apple has been to > community requests? The only thing I've heard of is the whole > WebKit/KHTML debacle. IMHO the WebKit story was hyped, but I must say I haven't checked out al details. At least WebKit is now a more transparent project. I don't know how responsive Apple is. At least one Apple engeneer really likes Python, and there are rumored to be more :-). I'd guess that Python support is not high on the TODO list for Xcode and won't be until someone big (such as Adobe) starts pushing for it. My feature request for this asks for opening up Xcode a little, that way we could write Python support ourselves. Someone who really wants to enhance Xcode won't be stopped by lack of API documentation. There are several 3th party plugins for Mail.app and that doesn't have a public API either. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050921/f4b2b567/smime.bin From jforcier at strozllc.com Wed Sep 21 21:27:06 2005 From: jforcier at strozllc.com (Jeffrey E. Forcier) Date: Wed, 21 Sep 2005 15:27:06 -0400 Subject: [Pythonmac-SIG] XCode autoindenting? In-Reply-To: <524D8CFC-57EC-4C06-BDC5-035DC0DA7D3E@mac.com> References: <266F95B3-DB38-4529-AE80-EDFF00723706@strozllc.com> <524D8CFC-57EC-4C06-BDC5-035DC0DA7D3E@mac.com> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sep 21, 2005, at 2:36 PM, Ronald Oussoren wrote: > Xcode support syntax coloring for a lot languages, including fringe > languages like Dylan. Someone seems to have overengeneered the > syntax coloring system :-) Hoo boy. Maybe I should go check if it also supports 'whitespace' or 'brain****' (you know, the language that's all + and - characters?). > IMHO the WebKit story was hyped, but I must say I haven't checked > out al details. At least WebKit is now a more transparent project. > > I don't know how responsive Apple is. At least one Apple engeneer > really likes Python, and there are rumored to be more :-). I'd > guess that Python support is not high on the TODO list for Xcode > and won't be until someone big (such as Adobe) starts pushing for it. That makes sense, although I did hear the other day that "someone" inside Apple is in fact pushing for better Python usage/support, overall, in their various products/projects. Granted, this is hearsay, but it *was* in a channel that has some well-positioned Apple nerds =) > My feature request for this asks for opening up Xcode a little, > that way we could write Python support ourselves. Someone who > really wants to enhance Xcode won't be stopped by lack of API > documentation. There are several 3th party plugins for Mail.app and > that doesn't have a public API either. Yea, 'class-dump' is useful in that regard =) Now if only I knew ObjC well enough to make good use of it... Regards, Jeff - -- Jeffrey E. Forcier Junior Developer, Research and Development Stroz Friedberg, LLC 15 Maiden Lane, 12th Floor New York, NY 10038 [main]212-981-6540 [direct]212-981-6546 http://www.strozllc.com This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived or lost by any error in transmission. If you have received this message in error, please immediately notify the sender by e-mail or by telephone at 212.981.6540, delete the message and all copies from your system and destroy any hard copies. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDMbQLp45MMXK8DgERApM8AKCScXlxQ+NreLSTWkZoIETMTnxq2QCg0uIo Ji5OFquC3oFpQ6kD18V18L8= =1Fyd -----END PGP SIGNATURE----- From replies at moax.net Wed Sep 21 03:09:48 2005 From: replies at moax.net (Mathew James Oakes) Date: Wed, 21 Sep 2005 11:09:48 +1000 Subject: [Pythonmac-SIG] pygame binaries Message-ID: <55e6e09fc0eb9129019e38260084d864@moax.net> unable to install pygame binaries on osx 10.3... get the following message from the pygame-1.7.0.mpkg installer: > The Installer package "pygame-1.7.0" > cannot be opened. > > The InstallationCheck tool was either not executable or not readable. > > I've checked md5 is right, and even gone in and modified the permissions on /Contents/Resources/InstallationCheck to make it readable writable and executable. has anone else had the same problem? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 563 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050921/3e9f475b/attachment.bin From ronaldoussoren at mac.com Wed Sep 21 21:34:21 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 21 Sep 2005 21:34:21 +0200 Subject: [Pythonmac-SIG] XCode autoindenting? In-Reply-To: References: <266F95B3-DB38-4529-AE80-EDFF00723706@strozllc.com> <524D8CFC-57EC-4C06-BDC5-035DC0DA7D3E@mac.com> Message-ID: <631ECED3-7E7C-445B-8AFC-05713B77B2F3@mac.com> On 21-sep-2005, at 21:27, Jeffrey E. Forcier wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sep 21, 2005, at 2:36 PM, Ronald Oussoren wrote: > > >> Xcode support syntax coloring for a lot languages, including >> fringe languages like Dylan. Someone seems to have overengeneered >> the syntax coloring system :-) >> > > Hoo boy. Maybe I should go check if it also supports 'whitespace' > or 'brain****' (you know, the language that's all + and - > characters?). I know off the language. Even intercal seems more useful ;-) > > >> IMHO the WebKit story was hyped, but I must say I haven't checked >> out al details. At least WebKit is now a more transparent project. >> >> I don't know how responsive Apple is. At least one Apple engeneer >> really likes Python, and there are rumored to be more :-). I'd >> guess that Python support is not high on the TODO list for Xcode >> and won't be until someone big (such as Adobe) starts pushing for it. >> > > That makes sense, although I did hear the other day that "someone" > inside Apple is in fact pushing for better Python usage/support, > overall, in their various products/projects. Granted, this is > hearsay, but it *was* in a channel that has some well-positioned > Apple nerds =) > > >> My feature request for this asks for opening up Xcode a little, >> that way we could write Python support ourselves. Someone who >> really wants to enhance Xcode won't be stopped by lack of API >> documentation. There are several 3th party plugins for Mail.app >> and that doesn't have a public API either. >> > > Yea, 'class-dump' is useful in that regard =) Now if only I knew > ObjC well enough to make good use of it... No need to use class-dump, just inject a Python interpreter and class browser. Both are examples shipped with PyObjC :-) Ronald > > Regards, > Jeff > > > - -- > Jeffrey E. Forcier > Junior Developer, Research and Development > Stroz Friedberg, LLC > 15 Maiden Lane, 12th Floor > New York, NY 10038 > [main]212-981-6540 [direct]212-981-6546 > http://www.strozllc.com > > This message is for the named person's use only. It may contain > confidential, proprietary or legally privileged information. No > right to > confidential or privileged treatment of this message is waived or lost > by any error in transmission. If you have received this message in > error, please immediately notify the sender by e-mail or by > telephone at > 212.981.6540, delete the message and all copies from your system and > destroy any hard copies. You must not, directly or indirectly, use, > disclose, distribute, print or copy any part of this message if you > are > not the intended recipient. Adding disclaimers like this to mail to a public mailinglist is a little silly :-). Luckily we're rather polite over here. Oh well, I've seen mail with two disclaimers like this, the first one in Dutch and then one in English. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050921/6305b54d/smime.bin From rkern at ucsd.edu Wed Sep 21 21:46:01 2005 From: rkern at ucsd.edu (Robert Kern) Date: Wed, 21 Sep 2005 12:46:01 -0700 Subject: [Pythonmac-SIG] pygame binaries In-Reply-To: <55e6e09fc0eb9129019e38260084d864@moax.net> References: <55e6e09fc0eb9129019e38260084d864@moax.net> Message-ID: <4331B879.6090308@ucsd.edu> Mathew James Oakes wrote: > unable to install pygame binaries on osx 10.3... get the following > message from the pygame-1.7.0.mpkg installer: > > The Installer package "pygame-1.7.0" > cannot be opened. > > The InstallationCheck tool was either not executable or not readable. > > > > > I've checked md5 is right, and even gone in and modified the permissions > on /Contents/Resources/InstallationCheck to make it readable writable > and executable. It's an mpkg, so you need to do the same for all of the subpackages, too. > has anone else had the same problem? Yes, see the thread titled "ANN: pygame 1.7.0 for Mac OS X 10.3" .zip files created by Python's ZipFile don't interact well with unzip(1). bdist_mpkg got patched with a workaround, but apparently the pygame installer .zip never got updated. Unzipping with StuffIt Expander will set the appropriate permissions. -- Robert Kern rkern at ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter From simon.brunning at gmail.com Thu Sep 22 11:24:34 2005 From: simon.brunning at gmail.com (Simon Brunning) Date: Thu, 22 Sep 2005 10:24:34 +0100 Subject: [Pythonmac-SIG] Connecting to Windows shares Message-ID: <8c7f10c605092202241a094f78@mail.gmail.com> I want to use a python script to copy some files from a Windows share to my Mac. Connecting to a Windows share with Finder is easy, but how do I do it from a script? (Python 2.4.1 on OSX 10.4.2, if it matters. -- Cheers, Simon B, simon at brunningonline.net, http://www.brunningonline.net/simon/blog/ From dfh at forestfield.co.uk Thu Sep 22 12:12:00 2005 From: dfh at forestfield.co.uk (David Hughes) Date: Thu, 22 Sep 2005 11:12 +0100 (BST) Subject: [Pythonmac-SIG] Connecting to Windows shares In-Reply-To: <8c7f10c605092202241a094f78@mail.gmail.com> Message-ID: > *From:* Simon Brunning > *To:* pythonmac-sig at python.org > *Date:* Thu, 22 Sep 2005 10:24:34 +0100 > > I want to use a python script to copy some files from a Windows share > to my Mac. Connecting to a Windows share with Finder is easy, but how > do I do it from a script? (Python 2.4.1 on OSX 10.4.2, if it matters. > > -- > Cheers, > Simon B, If the Windows partition you've attached appears as an 'ejectable' drive in the leftmost Finder pane, you can see it and its contents under /volumes using a Terminal session. Here, it appears as a directory of the form ";". A problem arises if you attach more than one partition, as they are then given suffixes '-1' etc that depend on the order you attached them. Regards, David Hughes Forestfield Software From dfh at forestfield.co.uk Thu Sep 22 12:36:00 2005 From: dfh at forestfield.co.uk (David Hughes) Date: Thu, 22 Sep 2005 11:36 +0100 (BST) Subject: [Pythonmac-SIG] Connecting to Windows shares In-Reply-To: Message-ID: > *From:* dfh at forestfield.co.uk (David Hughes) > *To:* pythonmac-sig at python.org > *Date:* Thu, 22 Sep 2005 11:12 +0100 (BST) > > > *From:* Simon Brunning > > *To:* pythonmac-sig at python.org > > *Date:* Thu, 22 Sep 2005 10:24:34 +0100 > > > > I want to use a python script to copy some files from a Windows share > > to my Mac. Connecting to a Windows share with Finder is easy, but how > > do I do it from a script? (Python 2.4.1 on OSX 10.4.2, if it matters. > > > > -- > > Cheers, > > Simon B, > > If the Windows partition you've attached appears as an 'ejectable' > drive in the leftmost Finder pane, you can see it and its contents > under /volumes using a Terminal session. Here, it appears as a > directory of the form ";". A problem arises if you > attach more than one partition, as they are then given suffixes '-1' > etc that depend on the order you attached them. > > Regards, > > David Hughes > Forestfield Software ...but of course, having just pressed the send button, I see that your actual question is how do I *connect* to the Windows share from a script - and I'm sorry but I don't know :-< DH From simon.brunning at gmail.com Thu Sep 22 13:07:52 2005 From: simon.brunning at gmail.com (Simon Brunning) Date: Thu, 22 Sep 2005 12:07:52 +0100 Subject: [Pythonmac-SIG] Connecting to Windows shares In-Reply-To: References: Message-ID: <8c7f10c605092204076b9071a0@mail.gmail.com> On Thu, 22 Sep 2005 11:36 +0100 (BST), David Hughes wrote: > > If the Windows partition you've attached appears as an 'ejectable' > > drive in the leftmost Finder pane, you can see it and its contents > > under /volumes using a Terminal session. Here, it appears as a > > directory of the form ";". A problem arises if you > > attach more than one partition, as they are then given suffixes '-1' > > etc that depend on the order you attached them. > > ...but of course, having just pressed the send button, I see that your > actual question is how do I *connect* to the Windows share from a script - > and I'm sorry but I don't know :-< Ah well. Still, I've learned somthing there, so you message wasn't wasted. Thanks. -- Cheers, Simon B, simon at brunningonline.net, http://www.brunningonline.net/simon/blog/ From simon.brunning at gmail.com Thu Sep 22 14:28:27 2005 From: simon.brunning at gmail.com (Simon Brunning) Date: Thu, 22 Sep 2005 13:28:27 +0100 Subject: [Pythonmac-SIG] Connecting to Windows shares In-Reply-To: <8c7f10c605092202241a094f78@mail.gmail.com> References: <8c7f10c605092202241a094f78@mail.gmail.com> Message-ID: <8c7f10c60509220528692844f4@mail.gmail.com> On 9/22/05, Simon Brunning wrote: > I want to use a python script to copy some files from a Windows share > to my Mac. Connecting to a Windows share with Finder is easy, but how > do I do it from a script? (Python 2.4.1 on OSX 10.4.2, if it matters. Found it. You need to invoke mount_smbfs via subprocess or whatever. -- Cheers, Simon B, simon at brunningonline.net, http://www.brunningonline.net/simon/blog/ From piet at cs.uu.nl Thu Sep 22 19:42:26 2005 From: piet at cs.uu.nl (Piet van Oostrum) Date: Thu, 22 Sep 2005 19:42:26 +0200 Subject: [Pythonmac-SIG] Connecting to Windows shares In-Reply-To: <8c7f10c605092202241a094f78@mail.gmail.com> References: <8c7f10c605092202241a094f78@mail.gmail.com> Message-ID: >>>>> Simon Brunning (SB) wrote: >SB> I want to use a python script to copy some files from a Windows share >SB> to my Mac. Connecting to a Windows share with Finder is easy, but how >SB> do I do it from a script? (Python 2.4.1 on OSX 10.4.2, if it matters. Issue a mount or, more specifically, a mount_smbfs command through os.system or the subprocess module or some such. -- Piet van Oostrum URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: piet at vanoostrum.org From kdurston at uoguelph.ca Thu Sep 22 21:34:52 2005 From: kdurston at uoguelph.ca (Kirk Durston) Date: Thu, 22 Sep 2005 15:34:52 -0400 Subject: [Pythonmac-SIG] Baffling if statement Message-ID: After spending a couple hours trying to figure out what is going on, I?m asking for help. Below is a short segment from a module I?ve written. Before the part shown below, temp and Cutoff are defined. then comes the following: blank='-' if temp>Cutoff: print 'temp is', temp print 'cutoff is', Cutoff print 'symbol is', symbol InfoCollector.append(symbol) else:InfoCollector.append(blank) the print out shows that temp=0.261 and Cutoff is 0.29498. Clearly temp is smaller than Cutoff, so it should have gone to ?else:? but it didn?t. In fact, no matter if temp is larger or smaller than Cutoff, it always goes through the ?if? segment. If I change the sign to ? References: Message-ID: <44B08984-F7F1-4174-AE81-C24C03340870@redivi.com> On Sep 22, 2005, at 3:34 PM, Kirk Durston wrote: > After spending a couple hours trying to figure out what is going > on, I?m asking for help. > > Below is a short segment from a module I?ve written. Before the > part shown below, temp and Cutoff are defined. then comes the > following: > > blank='-' > if temp>Cutoff: > print 'temp is', temp > print 'cutoff is', Cutoff > print 'symbol is', symbol > InfoCollector.append(symbol) > else:InfoCollector.append(blank) > > the print out shows that temp=0.261 and Cutoff is 0.29498. Clearly > temp is smaller than Cutoff, so it should have gone to ?else:? but > it didn?t. In fact, no matter if temp is larger or smaller than > Cutoff, it always goes through the ?if? segment. Sounds like you're comparing a float and a string. Don't do that, make sure that temp and cutoff are both float if you expect a meaningful comparison. To convert a string to a float, use float(aString). To see the "programmer representation" of a variable, use the %r format string, or the repr() function. E.g.: print 'temp is', repr(temp) or print 'cutoff is %r' % (Cutoff,) Using programmer repr[esentations] for debugging is essential, the string representations of types can be (intentionally) ambiguous. One of the two is almost definitely a string, so you should do temp = float(temp) or similar. -bob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050922/b84defc0/attachment.html From kquirk at solidworks.com Thu Sep 22 22:05:16 2005 From: kquirk at solidworks.com (Kent Quirk) Date: Thu, 22 Sep 2005 16:05:16 -0400 Subject: [Pythonmac-SIG] Baffling if statement Message-ID: What are the actual types of temp and Cutoff? Is it possible that you're not comparing apples to apples? For example, suppose you don't realize that one of your values is a string? >>> t1="0.19" >>> t2=0.24 >>> print t1 0.19 >>> print t2 0.24 >>> print t1>t2 True Any possibility that's what's happening? Kent ________________________________ From: pythonmac-sig-bounces at python.org [mailto:pythonmac-sig-bounces at python.org] On Behalf Of Kirk Durston Sent: Thursday, September 22, 2005 3:35 PM To: Pythonmac-SIG at python.org Subject: [Pythonmac-SIG] Baffling if statement After spending a couple hours trying to figure out what is going on, I'm asking for help. Below is a short segment from a module I've written. Before the part shown below, temp and Cutoff are defined. then comes the following: blank='-' if temp>Cutoff: print 'temp is', temp print 'cutoff is', Cutoff print 'symbol is', symbol InfoCollector.append(symbol) else:InfoCollector.append(blank) the print out shows that temp=0.261 and Cutoff is 0.29498. Clearly temp is smaller than Cutoff, so it should have gone to 'else:' but it didn't. In fact, no matter if temp is larger or smaller than Cutoff, it always goes through the 'if' segment. If I change the sign to '<', then it always goes to the 'else' regardless of the values of temp and Cutoff and never goes through the 'if' segment. When I write a short program to try to duplicate the problem everything works normally. Baffled, Kirk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050922/1db061fc/attachment-0001.htm From ronaldoussoren at mac.com Fri Sep 23 07:35:13 2005 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 23 Sep 2005 07:35:13 +0200 Subject: [Pythonmac-SIG] Connecting to Windows shares In-Reply-To: <8c7f10c60509220528692844f4@mail.gmail.com> References: <8c7f10c605092202241a094f78@mail.gmail.com> <8c7f10c60509220528692844f4@mail.gmail.com> Message-ID: On 22-sep-2005, at 14:28, Simon Brunning wrote: > On 9/22/05, Simon Brunning wrote: > >> I want to use a python script to copy some files from a Windows share >> to my Mac. Connecting to a Windows share with Finder is easy, but how >> do I do it from a script? (Python 2.4.1 on OSX 10.4.2, if it matters. >> > > Found it. You need to invoke mount_smbfs via subprocess or whatever. Another option is scripting smbclient(1). Ronald > > -- > Cheers, > Simon B, > simon at brunningonline.net, > http://www.brunningonline.net/simon/blog/ > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2105 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050923/1fb02a8a/smime.bin From chairos at gmail.com Fri Sep 23 08:40:55 2005 From: chairos at gmail.com (Jon Rosebaugh) Date: Fri, 23 Sep 2005 01:40:55 -0500 Subject: [Pythonmac-SIG] Connecting to Windows shares In-Reply-To: References: <8c7f10c605092202241a094f78@mail.gmail.com> <8c7f10c60509220528692844f4@mail.gmail.com> Message-ID: On 9/23/05, Ronald Oussoren wrote: > > On 22-sep-2005, at 14:28, Simon Brunning wrote: > > > On 9/22/05, Simon Brunning wrote: > > > >> I want to use a python script to copy some files from a Windows share > >> to my Mac. Connecting to a Windows share with Finder is easy, but how > >> do I do it from a script? (Python 2.4.1 on OSX 10.4.2, if it matters. > >> > > > > Found it. You need to invoke mount_smbfs via subprocess or whatever. > > Another option is scripting smbclient(1). > > Ronald Wouldn't running 'open smb://whatever' work too? From chinook.nr at tds.net Sun Sep 25 06:28:18 2005 From: chinook.nr at tds.net (Chinook) Date: Sun, 25 Sep 2005 00:28:18 -0400 Subject: [Pythonmac-SIG] Carbon goodies? Message-ID: In trying to get everything I needed in an extended Bash script, I looked back at one of my Python utilities to see how I determined an aqua alias and its target. Bob had told me to import a Carbon.File module for the task. So I took a look at Carbon.file and saw, via help(Carbon.File), quite a few goodies in there. Anyway, I'm switching back to Python to take another shot at the FS utility I was working on and wondered what other HFS+ goodies might be accessible? I have xattr. Thanks, Lee C From m at keysolutions.ru Fri Sep 23 10:49:11 2005 From: m at keysolutions.ru (Mikhail Kashkin) Date: Fri, 23 Sep 2005 12:49:11 +0400 Subject: [Pythonmac-SIG] Repository for python developers Message-ID: Moscow, Russia, September 23th, 2005 We are happy to spread good news about `Key Solutions' `_ new initiative. We have created a new public repository for python developers. The ulitimate goal of this project is to unite companies and people under the umbrella of Russian-speaking-python (Zope/Plone/Zope3/Twisted/etc) open source programmers community, so that we could jointly push forward new programs and technologies in Russia. The repository powered by `subversion `_. **Links**: - `Press release in russian `_ - `??????? ?? ??????? `_ - `Subversion `_ About Key Solutions -------------------- Key Solutions is an open source company with primary focus in development of corporative CRM Internet/intranet systems and web-communities. The company promotes and supports Zope, Plone, Asterisk platforms in Russia. To learn more about Key Solutions visit `eng.keysolutions.ru `_ and `keysolutions.ru `_ -- Mikhail Kashkin, Key Solutions (http://keysolutions.ru/) Director Zope/Asterisk/Plone - Solutions/Consulting/Support Plone ?? ??????? http://plone.org.ru/ Plone Foundation Member (http://plone.org/foundation/members/) From matthias.oberlaender at daimlerchrysler.com Mon Sep 26 11:41:45 2005 From: matthias.oberlaender at daimlerchrysler.com (matthias.oberlaender@daimlerchrysler.com) Date: Mon, 26 Sep 2005 11:41:45 +0200 Subject: [Pythonmac-SIG] Installing "fat" python extensions with distutils? In-Reply-To: Message-ID: We use the same (!) Python version in a mixed computing environment, i.e. we are having Linux, Mac and Windows XP. And we push sharing code in an "ad hoc" fashion (in addition to the more "correct" but inert patterns involving cvs): Whenever a collegue thinks some Python script or module might be of common interest, he/she will copy it to his personal directory located under a common root directory mounted writable on all platforms. This kind of "installation" has the benefit that everybody in our team gains immediate access, without prior pulling of sources from cvs and executing setup.py, etc. So, many scripts can transparently work on all three platforms given that the common root directory is on each user's python search path. The imports of such scripts looks like this: from arthur.utils import ... from bill.utils import ... This scheme works very well for pure Python, but I would like to allow Python extensions, too, i.e. those with ending "so" or "dll". (Extensions are mostly built using swig,) Unfortunetely, OS X and Linux share the same file type, but their content is a very different beast! This probably means that each extension must become a package with a code snippet in the __init__ module redirecting to the appropriate shared library. Right? Also I would rather use distutils than manual copying. So the qestion is: Can I configure my sources in an easy way that calling 'setup.py install' multiple times on the indentical directory, but from different host types (Linux/Mac/Win) would produce a "fat" Python extension in an identical target directory? Before I start fiddling around with distutils and use it in the wrong way, could anybody with enough experience be so kind and make some suggestions? Thanks, Matthias From tcj25 at cam.ac.uk Wed Sep 28 14:31:57 2005 From: tcj25 at cam.ac.uk (Terry Jones) Date: Wed, 28 Sep 2005 14:31:57 +0200 Subject: [Pythonmac-SIG] ImportError when trying to open app made with py2app Message-ID: <17210.36157.635634.698176@terry.jones.tc> Greetings. I'm new at all things Python, so I hope the following is not too naive or annoying. I've spent time looking for an answer - in the archives (2005 only), on the web, etc., and also tried passing additional things to py2app. I am trying to wrap up some simple python code with py2app to distribute it. My setup.py is trivial from distutils.core import setup import py2app setup( app=['examiner.py'], ) Running $ python setup.py py2app appears to work fine, with exit status 0, output attached. I can then cd into the dist directory and open the app successfully. But when I open a finder window and double click on the app, I get an error (the following is pasted from the console): ===== Wed Sep 28 2005 ===== 14:19:26 Europe/Madrid ===== Traceback (most recent call last): File "/Users/terry/mds/terry/xx/dist/examiner.app/Contents/Resources/__boot__.py", line 31, in ? _run('examiner.py') File "/Users/terry/mds/terry/xx/dist/examiner.app/Contents/Resources/__boot__.py", line 28, in _run execfile(path, globals(), globals()) File "/Users/terry/mds/terry/xx/dist/examiner.app/Contents/Resources/examiner.py", line 7, in ? from pivy.gui.soqt import * File "pivy/gui/soqt.pyc", line 4, in ? File "pivy/gui/_soqt.pyc", line 18, in ? File "pivy/gui/_soqt.pyc", line 11, in __load ImportError: Failure linking new module: libqt.3.dylib: dyld: /Users/terry/mds/terry/xx/dist/examiner.app/Contents/MacOS/examiner can't open library: libqt.3.dylib (No such file or directory, errno = 2) 2005-09-28 14:19:47.022 examiner[23268] examiner Error 2005-09-28 14:19:47.023 examiner[23268] An unexpected error has occurred during execution of the main script ImportError: Failure linking new module: libqt.3.dylib: dyld: /Users/terry/mds/terry/xx/dist/examiner.app/Contents/MacOS/examiner can't open library: libqt.3.dylib (No such file or directory, errno = 2) Can anyone tell me what the problem is here? When I look in the dist dir, I can see the following Qt relevant files: $ find dist -name '*[qQ]*' -print dist/examiner.app/Contents/Frameworks/libSoQt.20.dylib dist/examiner.app/Contents/Resources/Python/lib-dynload/pivy/gui/_soqt.so dist/examiner.app/Contents/Resources/Python/lib-dynload/qt.so dist/examiner.app/Contents/Resources/Python/lib-dynload/qtcanvas.so dist/examiner.app/Contents/Resources/Python/lib-dynload/qtgl.so dist/examiner.app/Contents/Resources/Python/lib-dynload/qtnetwork.so dist/examiner.app/Contents/Resources/Python/lib-dynload/qtsql.so dist/examiner.app/Contents/Resources/Python/lib-dynload/qttable.so dist/examiner.app/Contents/Resources/Python/lib-dynload/qtui.so dist/examiner.app/Contents/Resources/Python/lib-dynload/qtxml.so So py2app has clearly found the use of Qt and included some libraries. But the missing libqt.3.dylib which it's looking for is not present. I do have this, in /usr/local/qt/lib: $ ls -la /usr/local/qt/lib/libqt* -rwxrwxr-x 1 root terry 9907224 Jun 9 18:12 /usr/local/qt/lib/libqt.3.3.4.dylib lrwxrwxr-x 1 terry terry 17 Jun 9 18:12 /usr/local/qt/lib/libqt.3.3.dylib -> libqt.3.3.4.dylib lrwxrwxr-x 1 terry terry 17 Jun 9 18:12 /usr/local/qt/lib/libqt.3.dylib -> libqt.3.3.4.dylib lrwxrwxr-x 1 terry terry 17 Jun 9 18:12 /usr/local/qt/lib/libqt.dylib -> libqt.3.3.4.dylib -rw-rw-r-- 1 root terry 707 Jun 9 17:21 /usr/local/qt/lib/libqt.la -rw-rw-r-- 1 root terry 714 Jun 9 17:21 /usr/local/qt/lib/libqt.prl If the above information is not sufficient, I'll happily send more details of my setup (OS X 10.3.9, python 2.4, etc). I'm not sure that they matter though, seeing as I can manually do a successful open from the dist directory. Thanks for any help, Terry Jones -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fred Url: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050928/3ac320df/fred-0001.asc From listsub at wickedgrey.com Thu Sep 29 01:00:20 2005 From: listsub at wickedgrey.com (Eli Stevens (WG.c)) Date: Wed, 28 Sep 2005 16:00:20 -0700 Subject: [Pythonmac-SIG] distutils "unsupported operand type" Message-ID: <433B2084.9040207@wickedgrey.com> I'm trying to build Cheetah 0.9.18 (the template engine) on OSX 10.3 with python 2.4.1 (a framework build). I found other people having similar problems with Zope or PIL. I get an error inside the distutils stuff that seems like it's tracing back to how python was built. As best I can tell, it's looking for an OPT var inside of the Makefile (possibly the one at /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/config/Makefile ?). The closest thing to a solution that I've seen was at: http://nixdoc.net/files/forum/about47446.html But that's just an accurate assesment of what's wrong. Has anyone else encountered this? Am I just searching on the wrong terms? Thanks, Eli Here's the command lines and stack traces: ~/Downloads/Cheetah-0.9.18> python ./setup.py build running build running build_py running build_ext Traceback (most recent call last): File "./setup.py", line 13, in ? SetupTools.run_setup( configurations ) File "/Users/elis/Downloads/Cheetah-0.9.18/SetupTools.py", line 143, in run_setup apply(setup, (), kws) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/core.py", line 149, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/command/build.py", line 112, in run self.run_command(cmd_name) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/command/build_ext.py", line 254, in run customize_compiler(self.compiler) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/sysconfig.py", line 161, in customize_compiler cpp = cc + " -E" # not always TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' ~/Downloads/Cheetah-0.9.18> export CPP=g++ ~/Downloads/Cheetah-0.9.18> python ./setup.py build running build running build_py running build_ext Traceback (most recent call last): File "./setup.py", line 13, in ? SetupTools.run_setup( configurations ) File "/Users/elis/Downloads/Cheetah-0.9.18/SetupTools.py", line 143, in run_setup apply(setup, (), kws) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/core.py", line 149, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/command/build.py", line 112, in run self.run_command(cmd_name) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/command/build_ext.py", line 254, in run customize_compiler(self.compiler) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/distutils/sysconfig.py", line 174, in customize_compiler cc_cmd = cc + ' ' + opt TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' From zhiyong_peng2003 at yahoo.com Thu Sep 29 18:35:13 2005 From: zhiyong_peng2003 at yahoo.com (Zhi Peng) Date: Thu, 29 Sep 2005 09:35:13 -0700 (PDT) Subject: [Pythonmac-SIG] old gensuitemodule.py Message-ID: <20050929163513.51773.qmail@web53208.mail.yahoo.com> Did anyone know where I can find old gensuitemodule.py? Thanks --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050929/1a982700/attachment.html From bob at redivi.com Thu Sep 29 18:40:46 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 29 Sep 2005 12:40:46 -0400 Subject: [Pythonmac-SIG] old gensuitemodule.py In-Reply-To: <20050929163513.51773.qmail@web53208.mail.yahoo.com> References: <20050929163513.51773.qmail@web53208.mail.yahoo.com> Message-ID: <5973A417-BBA4-4646-B36F-9F9F8975BC53@redivi.com> On Sep 29, 2005, at 12:35 PM, Zhi Peng wrote: > Did anyone know where I can find old gensuitemodule.py? > It never went anywhere. It's still present in plat-mac in all current versions of Python. -bob From zhiyong_peng2003 at yahoo.com Thu Sep 29 20:08:18 2005 From: zhiyong_peng2003 at yahoo.com (Zhi Peng) Date: Thu, 29 Sep 2005 11:08:18 -0700 (PDT) Subject: [Pythonmac-SIG] Finder and PromptGetFile Message-ID: <20050929180818.47465.qmail@web53201.mail.yahoo.com> Hi! Did anyone know how to activate Finder in MacPython as we do in activating PromptGetFile as following ----------------------------------------------------------------------------------- import macfs fss = macfs.PromptGetFile('Select file with aeut/aete resource:') -------------------------------------------------------------------------------------- But have same effect? Thanks in advance Zhi --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050929/342077d5/attachment.html From zhiyong_peng2003 at yahoo.com Thu Sep 29 21:11:11 2005 From: zhiyong_peng2003 at yahoo.com (Zhi Peng) Date: Thu, 29 Sep 2005 12:11:11 -0700 (PDT) Subject: [Pythonmac-SIG] space in file path Message-ID: <20050929191111.86963.qmail@web53213.mail.yahoo.com> Hi! Obviously the macfs.FSSpec(file) does not accept form of file name as following: file = "//Applications//Program\ Filename.rsrc" (or //Applications//Program Filename.rsrc") But if I have space between file name as above, what I need to do. Anyone knew? Thanks in advance. Zhi --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050929/5c753495/attachment.htm From bob at redivi.com Thu Sep 29 22:01:15 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 29 Sep 2005 16:01:15 -0400 Subject: [Pythonmac-SIG] space in file path In-Reply-To: <20050929191111.86963.qmail@web53213.mail.yahoo.com> References: <20050929191111.86963.qmail@web53213.mail.yahoo.com> Message-ID: <07C3B38A-3CFE-4AE2-A5D1-D2A8164CF3E6@redivi.com> On Sep 29, 2005, at 3:11 PM, Zhi Peng wrote: > Hi! > > Obviously the macfs.FSSpec(file) does not accept form of file name > as following: > > file = "//Applications//Program\ Filename.rsrc" > > (or //Applications//Program Filename.rsrc") > > But if I have space between file name as above, what I need to do. > Anyone knew? Thanks in advance. "/Applications/Program Filename.rsrc" -bob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050929/3753166b/attachment.html From fclee at highstream.net Fri Sep 30 00:24:06 2005 From: fclee at highstream.net (Frederick C. Lee) Date: Thu, 29 Sep 2005 15:24:06 -0700 Subject: [Pythonmac-SIG] XCode fails to see py2app Message-ID: Greetings (totally green neophyte trying to crawl back into the MacPython camp): I recently ran install pyobjc 1.3.7. The following is one (1) of the modules installed (copied from installer dialog window): (Required) Pure Python modules and packages Installed to: /Library/Python/2.3/site-packages I did a check to see if I got the stuff installed: [/Users/Ric]ls /Library/Python/2.3/site-packages Extras.pth PyObjC.pth dbflib.py dbflibc.so py2app.pth shapelib.pyc shptree.so PyObjC/ README dbflib.pyc py2app/ shapelib.py shapelibc.so So it appears the installation went okay. I started to build the demo project "PyAverager 2" and got the following build error: /usr/bin/env /Users/Ric/Downloads/PyAverager2/setup.py py2app --alias Traceback (most recent call last): File "/Users/Ric/Downloads/PyAverager2/setup.py", line 38, in ? import py2app ImportError: No module named py2app ======================================== This appears to be a simple XCode 2.1 adjustment (correct?). But which environment variable to I change? Do I need to add a search path to the headers? Or what? I'm lost here. Regards, Ric. The following is the setup.py that was read: #!/usr/bin/env python # # ------------------------------------------------ # # CHANGE ABOVE OR EDIT THE "Shell Script Files" # PHASE TO START THE THIS SCRIPT WITH ANOTHER # PYTHON INTERPRETER. # # ------------------------------------------------ # """ Distutils script for building PyAverager. Development: xcodebuild -buildstyle Development Deployment: xcodebuild -buildstyle Deployment These will place the executable in the "build" dir by default. Alternatively, you can use py2app directly. Development: python setup.py py2app --alias Deployment: python setup.py py2app These will place the executable in the "dist" dir by default. """ from distutils.core import setup import py2app import os import sys os.chdir(os.path.dirname(os.path.abspath(__file__))) from PyObjCTools import XcodeSupport xcode = XcodeSupport.xcodeFromEnvironment( 'PyAverager.xcode', os.environ, ) sys.argv = xcode.py2app_argv(sys.argv) setup_options = xcode.py2app_setup_options('app') # # mangle any distutils options you need here # in the setup_options dict # setup(**setup_options) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050929/bf56fcea/attachment-0001.htm From bob at redivi.com Fri Sep 30 01:19:30 2005 From: bob at redivi.com (Bob Ippolito) Date: Thu, 29 Sep 2005 19:19:30 -0400 Subject: [Pythonmac-SIG] XCode fails to see py2app In-Reply-To: References: Message-ID: On Sep 29, 2005, at 6:24 PM, Frederick C. Lee wrote: > Greetings (totally green neophyte trying to crawl back into the > MacPython camp): > I recently ran install pyobjc 1.3.7. > > The following is one (1) of the modules installed (copied from > installer dialog window): > > (Required) Pure Python modules and packages > Installed to: /Library/Python/2.3/site-packages > > I did a check to see if I got the stuff installed: > > [/Users/Ric]ls /Library/Python/2.3/site-packages > Extras.pth PyObjC.pth dbflib.py dbflibc.so > py2app.pth shapelib.pyc shptree.so > PyObjC/ README dbflib.pyc py2app/ > shapelib.py shapelibc.so > > > So it appears the installation went okay. > > I started to build the demo project "PyAverager 2" and got the > following build error: > > /usr/bin/env /Users/Ric/Downloads/PyAverager2/setup.py py2app --alias > Traceback (most recent call last): > File "/Users/Ric/Downloads/PyAverager2/setup.py", line 38, in ? > import py2app > ImportError: No module named py2app You must have more than one Python interpreter installed or something. Whichever one Xcode is choosing (by PATH) is not the one you installed PyObjC for. -bob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050929/f621c4bc/attachment.html From pkinnane at internode.on.net Fri Sep 30 10:02:58 2005 From: pkinnane at internode.on.net (Paul Kinnane) Date: Fri, 30 Sep 2005 17:32:58 +0930 Subject: [Pythonmac-SIG] Using distutils with XCode Message-ID: <000a01c5c595$640ba190$232efea9@pkv4wabpjxof69> Hi I am trying to port a python library which I have running on the PC to the Mac. Can I compile a python distribution files (compiled C) using the distutils on OSX10.4. I don't have CodeWarrior 7 and wondered if it was possible to manually compile the library using XCode? I see it is possible using MPW (http://www.nevada.edu/~cwebster/Python/MPWHOWTO/MPWHOWTO.html) - however I can't run MPW without OS9. To date, I can compile the library in XCode, although it has trouble linking with the PythonCore library. I've also tried compiling the library on Darwin, and get a "Symbol not found : __cxa_pure_virtual" error when I do the import in python. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050930/c4e69fde/attachment.html From simon.brunning at gmail.com Fri Sep 30 15:26:48 2005 From: simon.brunning at gmail.com (Simon Brunning) Date: Fri, 30 Sep 2005 14:26:48 +0100 Subject: [Pythonmac-SIG] CD burning Message-ID: <8c7f10c60509300626ja1f50b9n58b8933df076f861@mail.gmail.com> Is it possible to programmatically burn a CD with Python. Or indeed from the shell, as a pinch? -- Cheers, Simon B, simon at brunningonline.net, http://www.brunningonline.net/simon/blog/ From bob at redivi.com Fri Sep 30 16:00:58 2005 From: bob at redivi.com (Bob Ippolito) Date: Fri, 30 Sep 2005 10:00:58 -0400 Subject: [Pythonmac-SIG] CD burning In-Reply-To: <8c7f10c60509300626ja1f50b9n58b8933df076f861@mail.gmail.com> References: <8c7f10c60509300626ja1f50b9n58b8933df076f861@mail.gmail.com> Message-ID: On Sep 30, 2005, at 9:26 AM, Simon Brunning wrote: > Is it possible to programmatically burn a CD with Python. Or indeed > from the shell, as a pinch? I'm pretty sure you can talk to the DiscRecording framework from PyObjC, and IIRC Mac OS X ships with a full suite of tools for burning stuff from the command line (though I don't recall the names of the tools). You can also download and compile cdrtools and use mkisofs and cdrecord. -bob From Chris.Barker at noaa.gov Fri Sep 30 18:07:54 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Fri, 30 Sep 2005 09:07:54 -0700 Subject: [Pythonmac-SIG] Using distutils with XCode In-Reply-To: <000a01c5c595$640ba190$232efea9@pkv4wabpjxof69> References: <000a01c5c595$640ba190$232efea9@pkv4wabpjxof69> Message-ID: <433D62DA.2040501@noaa.gov> Paul Kinnane wrote: > the distutils on OSX10.4. I don't have CodeWarrior 7 and wondered if it > was possible to manually compile the library using XCode? I see it is > possible using MPW > (http://www.nevada.edu/~cwebster/Python/MPWHOWTO/MPWHOWTO.html) - that is a very old doc, and only applies to OS-9 and below. On OS-X, the standard way to compile python is with Apple's gcc. provided with the XCode package. you should be able to do a simple: python setup.py build at the command line, if you want to use the Apple-provided python. If you've installed python2.4.1, then do: python2.4 setup.py build or /usr/local/python setup.py build depending on how your PATH is set. If this doesn't work, post your errors, and we'll see what we can suggest. If the code works with gcc on other systems (Cygwin, Linux, etc), then there is a good chance it will work on OS-X. If it's only been compiled with MS compiler, it may need some tweaking. -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 at noaa.gov From kjmacken at gmail.com Fri Sep 30 21:12:22 2005 From: kjmacken at gmail.com (Kevin J. MacKenzie) Date: Fri, 30 Sep 2005 15:12:22 -0400 Subject: [Pythonmac-SIG] Extending Python (OS 10.3.9) Message-ID: Hi everyone, I am attempting to convert some time critical code into C to be imported as a module into python. This is on OS X (10.3.9) using the bundled 2.3.3 version of python. I am working through the extending python tutorial but am having trouble wrapping my head around some things which are a little above my knowledge of C and OS X. Full code is copied below. But, basically what I've done is created 2 source files, mod.c and sum.c with a header file sum.h (as per the tutorial). For compiling, I am doing the following: [code] [xxxxxxx at viridian 14:03:21]$ gcc $PYTHPATH sum.c -o sum.o [/code] Where $PYTHPATH ='-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2 .3' So gcc can find python.h sum.c compiles fine. The wrapper file mod.c, however gives me the following. [code] [xxxxxxx at viridian 14:03:12]$ gcc $PYTHPATH mod.c -o mod.o ld: Undefined symbols: _main _PyArg_ParseTuple _Py_BuildValue _Py_InitModule4 _sum [/code] I was under the impression that I should compile the source files, and then compile a shared library by the following: [xxxxxx at viridian 14:03:14]$ gcc $PYTHPATH mod.o sum.o -o mod.so However, the compile is pooching out on the compile of mod.c I am hoping that someone with more experience with this may give me some tips regarding how to go about this. The code from the tutorial I have pasted below. Thanks. kjm // ------------------------------------------------------------ // begin sum.c #include "sum.h" int sum(int a, int b) { return a + b; } int main(int argc, char* argv[]) { return 0; } //---------------------------------------------------------- //----------------------------------------------------------- // being sum.h int sum(int a, int b); int main(int argc, char* argv[]); //----------------------------------------------------------- //----------------------------------------------------------- // being mod.c #undef _DEBUG #include #include "sum.h" static PyObject* mod_sum(PyObject *self, PyObject *args) { int a; int b; int s; if (!PyArg_ParseTuple(args,"ii",&a,&b)) return NULL; s = sum(a,b); return Py_BuildValue("i",s); } static PyMethodDef ModMethods[] = { {"sum", mod_sum, METH_VARARGS, "Description.."}, {NULL,NULL,0,NULL} }; PyMODINIT_FUNC initmod(void) { PyObject *m; m = Py_InitModule("mod",ModMethods); if (m == NULL) return; } From Chris.Barker at noaa.gov Fri Sep 30 21:36:40 2005 From: Chris.Barker at noaa.gov (Chris Barker) Date: Fri, 30 Sep 2005 12:36:40 -0700 Subject: [Pythonmac-SIG] Extending Python (OS 10.3.9) In-Reply-To: References: Message-ID: <433D93C8.7010700@noaa.gov> The best advice I can give you is to use distutils to do the compiling for you. It knows about all the include and linking directories that are required: http://docs.python.org/dist/dist.html If your case is simple, which it seems to be so far, you can write a very simple setup.py script, and build with: python setup.py build. As a bonus, you can use the same setup.py to build on other platforms. Here is a simple example: #!/usr/bin/env python2.3 from distutils.core import setup, Extension setup (name = "MyModule", version = "1.0", ext_modules = [Extension('MyModule',sources=['MyModule.c'])] ) This will build the C file: MyModule.c into an extension library MyModule.so One other suggestion: http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ Look into using pyrex instead of dealing with all that raw C. Or, if you are working with a C or C++ library, look into SWIG or Boost::python -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 at noaa.gov