From kenneth.m.mcdonald at sbcglobal.net Thu Aug 5 06:57:32 2004 From: kenneth.m.mcdonald at sbcglobal.net (Kenneth McDonald) Date: Thu Aug 5 06:57:36 2004 Subject: [Pythonmac-SIG] Anyone else doing epydoc->postscript->OS X Preview Application? Message-ID: I'm currently using epydoc to generate docs for my code, and since I don't have dvi2ps installed, tried to do epydoc->postscript, and then open and print the postscript using Preview. However, the heading line on each page (giving the module and class) is overwritten by the first line of documentation on the page, and I'm wondering if the problem is specific to the Mac, or general to epydoc. I've tried to install ps2pdf and get it working, but had problems, so before I try that again, I'd like to know if it will actually cure this. Thanks, Ken From jeremy.knope at gmail.com Thu Aug 5 16:17:43 2004 From: jeremy.knope at gmail.com (Jerome) Date: Thu Aug 5 16:17:47 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? Message-ID: <2c9aa7fe0408050717209a24e1@mail.gmail.com> I'm trying to figure out how to use SequenceGrabber component in QuickTime beta 0.2 for python it seems to have all the functions except i can't find out how to create the component to start in Carbon it's mySeqGrab = OpenDefaultComponent(SeqGrabberComponentType, 0) or something like that then you can call stuff like SGInitialize(mySeqGrab) but i can't figure out where to create the component first... any help is appreciated From lsloan at umich.edu Thu Aug 5 21:53:20 2004 From: lsloan at umich.edu (Lance E Sloan) Date: Thu Aug 5 22:06:50 2004 Subject: [Pythonmac-SIG] is it just me or... Message-ID: <2147483647.1091721200@blue-four.us.itd.umich.edu> has this list been unusually quiet lately? -- Lance E Sloan, Systems Research Programmer III U-M WATS: Web Applications, Technologies, and Solutions Full-service web and database design, development, and hosting. http://www.itcs.umich.edu/wats/ - "Putting U on the Web" From jeremy.knope at gmail.com Thu Aug 5 22:16:44 2004 From: jeremy.knope at gmail.com (Jerome) Date: Thu Aug 5 22:16:46 2004 Subject: [Pythonmac-SIG] is it just me or... In-Reply-To: <2147483647.1091721200@blue-four.us.itd.umich.edu> References: <2147483647.1091721200@blue-four.us.itd.umich.edu> Message-ID: <2c9aa7fe040805131646645223@mail.gmail.com> seems pretty quiet to me too, i only just recently posted about quicktime but haven't seen much other than 1 msg the past few days, lonely here... heh On Thu, 05 Aug 2004 15:53:20 -0400, Lance E Sloan wrote: > has this list been unusually quiet lately? > From skip at pobox.com Fri Aug 6 04:19:47 2004 From: skip at pobox.com (Skip Montanaro) Date: Fri Aug 6 04:19:58 2004 Subject: [Pythonmac-SIG] is it just me or... In-Reply-To: <2147483647.1091721200@blue-four.us.itd.umich.edu> References: <2147483647.1091721200@blue-four.us.itd.umich.edu> Message-ID: <16658.60099.748155.363097@montanaro.dyndns.org> Lance> has this list been unusually quiet lately? Jack's on holiday. Maybe everybody else is taking a cue from him... nobody-here-but-us-chickens-ly, y'rs, Skip From dkwolfe at pacbell.net Fri Aug 6 06:04:04 2004 From: dkwolfe at pacbell.net (Dan Wolfe) Date: Fri Aug 6 06:14:44 2004 Subject: [Pythonmac-SIG] is it just me or... In-Reply-To: <16658.60099.748155.363097@montanaro.dyndns.org> References: <2147483647.1091721200@blue-four.us.itd.umich.edu> <16658.60099.748155.363097@montanaro.dyndns.org> Message-ID: Everyone's over in python-dev... a little over 200 messages today alone.... it's-time-to-break-out-the-big-delete-key'ly yours, - Dan On Aug 5, 2004, at 7:19 PM, Skip Montanaro wrote: Lance> has this list been unusually quiet lately? Jack's on holiday. Maybe everybody else is taking a cue from him... nobody-here-but-us-chickens-ly, y'rs, From paul at donovansbrain.co.uk Sat Aug 7 14:40:13 2004 From: paul at donovansbrain.co.uk (Paul Donovan) Date: Sat Aug 7 14:38:21 2004 Subject: [Pythonmac-SIG] Eclipse and Python on MOSX? In-Reply-To: <2147483647.1091179818@141-213-238-82.umnet.umich.edu> References: <2147483647.1091179818@141-213-238-82.umnet.umich.edu> Message-ID: On 30 Jul 2004, at 14:30, Lance E Sloan wrote: > Has anybody on this list been able to use the Eclipse IDE for Python > development on Mac OS X successfully? I've tried on my MOSX 10.3.4 > machine, but I'm not able to run a simple "hello, world" program due > to Java exceptions. I got the idea from this IBM DeveloperWorks > article, "Python development with Eclipse and Ant": > . > I went through the steps listed in the article, and everything seemed fine (apart from the unit tests, I couldn't get the python file to work). The whole thing seems cool, but it's deathly slow on my 700MHz iBook. Should be OK on my 3GHz Xeon at work ;-) Do you have Java 1.4.2 installed? I thinks that's a requirement for Eclipse 3.0 on OS X. Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2377 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040807/896f6b4a/smime.bin From lsloan-000002 at umich.edu Sat Aug 7 15:50:30 2004 From: lsloan-000002 at umich.edu (Lance E Sloan) Date: Sat Aug 7 15:51:23 2004 Subject: [Pythonmac-SIG] Eclipse and Python on MOSX? In-Reply-To: References: <2147483647.1091179818@141-213-238-82.umnet.umich.edu> Message-ID: <2147483647.1091872230@[192.168.2.201]> --On Saturday, August 7, 2004 1:40 PM +0100 Paul Donovan wrote: > I went through the steps listed in the article, and everything seemed > fine (apart from the unit tests, I couldn't get the python file to work). > The whole thing seems cool, but it's deathly slow on my 700MHz iBook. > Should be OK on my 3GHz Xeon at work ;-) Yeah, that should do the trick. > Do you have Java 1.4.2 installed? I thinks that's a requirement for > Eclipse 3.0 on OS X. Yes, I've got Java 1.4.2. I was trying to use Eclipse 2.1.3. At the time I downloaded it, a couple weeks ago, that was the latest stable version of Eclipse. Yesterday afternoon I checked again and I saw that version 3.0 was now stable. So I tried it and now it works. I should have mentioned in my original post that I was trying Eclipse 2.1.3. -- Lance E Sloan, Systems Research Programmer III U-M WATS: Web Applications, Technologies, and Solutions Full-service web and database design, development, and hosting. http://www.itcs.umich.edu/wats/ - "Putting U on the Web" From altis at semi-retired.com Sat Aug 7 19:46:47 2004 From: altis at semi-retired.com (Kevin Altis) Date: Sat Aug 7 19:46:43 2004 Subject: [Pythonmac-SIG] applescript to python examples for Address Book? Message-ID: This message should probably go to the PyObjC mailing list, but perhaps someone will have the answer here. I want to be able to get a list of names and email addresses from the Address Book using Python. I have found the Address Book module for PyObjC, but the API doesn't make much sense to me. Delving into the Apple Developer docs didn't help much either. http://developer.apple.com/documentation/UserExperience/Reference/ AddressBook/ObjC_classic/Classes/ABPerson.html#//apple_ref/occ/cl/ ABPerson I'm hoping someone has a script example using PyObjC or aeve or whatever else is available that is basically the equivalent of the first part of the script from Panther Hacks. http://www.macdevcenter.com/pub/a/mac/excerpt/pantherhacks/ -- open Address Book and loop through people tell application "Address Book" repeat with thisPerson in the people set thisName to name of thisPerson repeat with thisAddress in email of thisPerson set thisEmail to value of thisAddress ... Apologies if Python examples are lying around somewhere. I couldn't find anything in my pythonmac-sig list archive, wiki, etc. I want to grab the info and present it to the user as part of a wxPython app. ka --- Kevin Altis altis@semi-retired.com http://altis.pycs.net/ From bob at redivi.com Sat Aug 7 20:10:05 2004 From: bob at redivi.com (Bob Ippolito) Date: Sat Aug 7 20:10:14 2004 Subject: [Pythonmac-SIG] applescript to python examples for Address Book? In-Reply-To: References: Message-ID: <0237BA78-E89D-11D8-B7F3-000A95686CD8@redivi.com> This is PyObjC code.. import sys, codecs sys.stdout = codecs.getwriter('utf8')(sys.stdout) from AddressBook import * ab = ABAddressBook.sharedAddressBook() for person in ab.people(): firstName = person.valueForProperty_(kABFirstNameProperty) lastName = person.valueForProperty_(kABLastNameProperty) emailProperty = person.valueForProperty_(kABEmailProperty) if emailProperty is not None: emails = [emailProperty.valueAtIndex_(i) for i in range(emailProperty.count())] print "%s %s (%s)" % (firstName, lastName, ', '.join(emails)) On Aug 7, 2004, at 1:46 PM, Kevin Altis wrote: > This message should probably go to the PyObjC mailing list, but > perhaps someone will have the answer here. I want to be able to get a > list of names and email addresses from the Address Book using Python. > I have found the Address Book module for PyObjC, but the API doesn't > make much sense to me. Delving into the Apple Developer docs didn't > help much either. > > http://developer.apple.com/documentation/UserExperience/Reference/ > AddressBook/ObjC_classic/Classes/ABPerson.html#//apple_ref/occ/cl/ > ABPerson > > I'm hoping someone has a script example using PyObjC or aeve or > whatever else is available that is basically the equivalent of the > first part of the script from Panther Hacks. > > http://www.macdevcenter.com/pub/a/mac/excerpt/pantherhacks/ > > -- open Address Book and loop through people > > tell application "Address Book" > repeat with thisPerson in the people > set thisName to name of thisPerson > repeat with thisAddress in email of thisPerson > set thisEmail to value of thisAddress > ... > > Apologies if Python examples are lying around somewhere. I couldn't > find anything in my pythonmac-sig list archive, wiki, etc. I want to > grab the info and present it to the user as part of a wxPython app. > > ka > --- > Kevin Altis > altis@semi-retired.com > http://altis.pycs.net/ > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From jeremy.knope at gmail.com Sun Aug 8 03:12:50 2004 From: jeremy.knope at gmail.com (Jerome) Date: Sun Aug 8 03:12:57 2004 Subject: [Pythonmac-SIG] PyGame weirdness on OS X, leaks & exceptions Message-ID: <2c9aa7fe04080718124827a45@mail.gmail.com> It seems there's a weird problem with something with python & pygame on OS X, it works fine if you use pygame.init() in your code but if you do them separate. BOOM! whole bunch of these: 2004-08-07 21:08:15.153 Python[695] *** _NSAutoreleaseNoPool(): Object 0x30ead0 of class NSCFArray autoreleased with no pool in place - just leaking finishing up with this: 2004-08-07 21:08:15.232 Python[695] *** Uncaught exception: Error (1002) creating CGSWindow Trace/BPT trap downloaded a couple pygames that did this, not sure if it's the pygame 1.7 prerelase (1.6.2) or something weird in OS X, replacing their inits with the single pygame.init() solved my problem for now, but curious what's up --jerome From bob at redivi.com Sun Aug 8 11:47:20 2004 From: bob at redivi.com (Bob Ippolito) Date: Sun Aug 8 11:47:26 2004 Subject: [Pythonmac-SIG] PyGame weirdness on OS X, leaks & exceptions In-Reply-To: <2c9aa7fe04080718124827a45@mail.gmail.com> References: <2c9aa7fe04080718124827a45@mail.gmail.com> Message-ID: On Aug 7, 2004, at 9:12 PM, Jerome wrote: > It seems there's a weird problem with something with python & pygame > on OS X, it works fine if you use pygame.init() in your code but if > you do them separate. BOOM! > > whole bunch of these: > 2004-08-07 21:08:15.153 Python[695] *** _NSAutoreleaseNoPool(): Object > 0x30ead0 of class NSCFArray autoreleased with no pool in place - just > leaking > > finishing up with this: > 2004-08-07 21:08:15.232 Python[695] *** Uncaught exception: > Error (1002) creating CGSWindow > Trace/BPT trap > > downloaded a couple pygames that did this, not sure if it's the pygame > 1.7 prerelase (1.6.2) or something weird in OS X, replacing their > inits with the single pygame.init() solved my problem for now, but > curious what's up I don't understand what you mean by "if you do them separate". If code uses pygame before calling pygame.init() then the code is broken, whether or not it happens to work on other platforms. -bob From ronaldoussoren at mac.com Sun Aug 8 11:55:25 2004 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun Aug 8 11:56:00 2004 Subject: [Pythonmac-SIG] PyGame weirdness on OS X, leaks & exceptions In-Reply-To: References: <2c9aa7fe04080718124827a45@mail.gmail.com> Message-ID: <1268F70E-E921-11D8-828E-000A95C77748@mac.com> On 8-aug-04, at 11:47, Bob Ippolito wrote: > On Aug 7, 2004, at 9:12 PM, Jerome wrote: > >> It seems there's a weird problem with something with python & pygame >> on OS X, it works fine if you use pygame.init() in your code but if >> you do them separate. BOOM! >> >> whole bunch of these: >> 2004-08-07 21:08:15.153 Python[695] *** _NSAutoreleaseNoPool(): Object >> 0x30ead0 of class NSCFArray autoreleased with no pool in place - just >> leaking >> >> finishing up with this: >> 2004-08-07 21:08:15.232 Python[695] *** Uncaught exception: >> Error (1002) creating CGSWindow >> Trace/BPT trap >> >> downloaded a couple pygames that did this, not sure if it's the pygame >> 1.7 prerelase (1.6.2) or something weird in OS X, replacing their >> inits with the single pygame.init() solved my problem for now, but >> curious what's up > > I don't understand what you mean by "if you do them separate". If > code uses pygame before calling pygame.init() then the code is broken, > whether or not it happens to work on other platforms. I no absolutely nothing about pygame but the reference docs say: pygame.init() -> passed, failed Initialize all imported pygame modules. Including pygame modules that are not part of the base modules (like font and image). ? It does not raise exceptions, but instead silently counts which modules have failed to init. The return argument contains a count of the number of modules initialized, and the number of modules that failed to initialize. ? You can always initialize the modules you want by hand. The modules that need it have an init() and quit() routine built in, which you can call directly. They also have a get_init() routine which you can use to doublecheck the initialization. Note that the manual init() routines will raise an exception on error. Be aware that most platforms require the display module to be initialized before others. This init() will handle that for you, but if you initialize by hand, be aware of this constraint. ? As with the manual init() routines. It is safe to call this init() as often as you like. If you have imported pygame modules since the. This seems to indicate you don't have to call pygame.init() but can initialize the submodules you want to use by hand. The order of initialization might cause problems. Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 From hengist.podd at virgin.net Sun Aug 8 12:23:49 2004 From: hengist.podd at virgin.net (has) Date: Sun Aug 8 12:23:54 2004 Subject: [Pythonmac-SIG] applescript to python examples for Address Book? Message-ID: Kevin Altis wrote: >I want to be able to get a list of names and email addresses from >the Address Book using Python. [...] >-- open Address Book and loop through people > >tell application "Address Book" > repeat with thisPerson in the people > set thisName to name of thisPerson > repeat with thisAddress in email of thisPerson > set thisEmail to value of thisAddress >... Using appscript : #!/usr/local/bin/pythonw from appscript import * for person in app('Address Book.app').people.get(): name = person.name.get() for email in person.emails.value.get(): ... With well-written applications you can get this info with just a couple of Apple events, which is much more efficient: ab = app('Address Book.app') print zip(ab.people.name.get(), ab.people.emails.value.get()) Note: don't let AppleScript/appscript's use of syntactic sugar fool you. The Apple event object model uses a query-based interface more powerful than conventional OO references, allowing a single message to be sent to any number of objects. HTH has -- http://freespace.virgin.net/hamish.sanderson/ From hengist.podd at virgin.net Sun Aug 8 13:20:50 2004 From: hengist.podd at virgin.net (has) Date: Sun Aug 8 13:23:15 2004 Subject: [Pythonmac-SIG] applescript to python examples for Address Book? Message-ID: I wrote: >ab = app('Address Book.app') >print zip(ab.people.name.get(), ab.people.emails.value.get()) Or if you only want folk who have one or more emails: p = app('Address Book.app').people.filter(its.emails != []) print zip(p.name.get(), p.emails.value.get()) Good stuff (when it works:p). has -- http://freespace.virgin.net/hamish.sanderson/ From jeremy.knope at gmail.com Sun Aug 8 17:13:43 2004 From: jeremy.knope at gmail.com (Jerome) Date: Sun Aug 8 17:13:45 2004 Subject: [Pythonmac-SIG] Re: PyGame weirdness on OS X, leaks & exceptions In-Reply-To: <2c9aa7fe040808081331e3e2e9@mail.gmail.com> References: <2c9aa7fe04080718124827a45@mail.gmail.com> <1268F70E-E921-11D8-828E-000A95C77748@mac.com> <2c9aa7fe040808081331e3e2e9@mail.gmail.com> Message-ID: <2c9aa7fe04080808132e8dde70@mail.gmail.com> oops, sent it to a single person again.... the problem is that when the python script calls pygame.display.init() and then pygame.font.init() or whatever (seems to be display related) it coughs up tons of Cocoa API errors like i pasted, but is fine if i replace them with the general pygame.init it's not that it's using code before it's inited, just seems to break in OS X at least when doing such. i'm trying to figure out where the fault might be, think i should email the pygame guy too? --jerome On Sun, 8 Aug 2004 11:55:25 +0200, Ronald Oussoren wrote: > > > pygame.init() -> passed, failed > Initialize all imported pygame modules. Including pygame modules that > are not part of the base modules (like font and image). > > It does not raise exceptions, but instead silently counts which > modules have failed to init. The return argument contains a count of > the number of modules initialized, and the number of modules that > failed to initialize. > > You can always initialize the modules you want by hand. The modules > that need it have an init() and quit() routine built in, which you can > call directly. They also have a get_init() routine which you can use to > doublecheck the initialization. Note that the manual init() routines > will raise an exception on error. Be aware that most platforms require > the display module to be initialized before others. This init() will > handle that for you, but if you initialize by hand, be aware of this > constraint. > > As with the manual init() routines. It is safe to call this init() as > often as you like. If you have imported pygame modules since the. > > > This seems to indicate you don't have to call pygame.init() but can > initialize the submodules you want to use by hand. The order of > initialization might cause problems. > > Ronald > -- > X|support bv http://www.xsupport.nl/ > T: +31 610271479 F: +31 204416173 > > From eichin at metacarta.com Sun Aug 8 19:17:50 2004 From: eichin at metacarta.com (eichin@metacarta.com) Date: Sun Aug 8 19:17:57 2004 Subject: [Pythonmac-SIG] Re: PyGame weirdness on OS X, leaks & exceptions In-Reply-To: <2c9aa7fe04080808132e8dde70@mail.gmail.com> References: <2c9aa7fe04080718124827a45@mail.gmail.com> <1268F70E-E921-11D8-828E-000A95C77748@mac.com> <2c9aa7fe040808081331e3e2e9@mail.gmail.com> <2c9aa7fe04080808132e8dde70@mail.gmail.com> Message-ID: <7g4qnd5z29.fsf@pikespeak.metacarta.com> I've seen that as well (pygame code "out there" that calls individual module init functions doesn't work under OSX - I'd assumed it was because the code was old and that modern pygame doesn't allow that anymore, but perhaps not. And yes, changing the code to call the "top-level" pygame.init() generally made it work) From bob at redivi.com Sun Aug 8 22:12:11 2004 From: bob at redivi.com (Bob Ippolito) Date: Sun Aug 8 22:12:18 2004 Subject: [Pythonmac-SIG] Re: "Bus error" when using Authorization In-Reply-To: References: Message-ID: <3BB92CB2-E977-11D8-941F-000A95686CD8@redivi.com> On Aug 8, 2004, at 3:48 PM, Vincent Bernat wrote: > Hello ! > > I am trying to use the Authorization class with python to check that > the user owns some rights. Here is a snippet of code : > >>>> from Authorization import * >>>> auth = Authorization() >>>> auth.copyRights(rights=(("org.crans.wifi.daemons.restart", None, > 0),), flags=(kAuthorizationFlagDefaults, > kAuthorisationFlagExtendRights, kAuthorizationFlagInteractionAllowed, > kAuthorizationFlagPreAuthorize)) > > And I get "bus error". My guess is that it's a retain/release bug somewhere. It actually works for me if not done at the interactive prompt. I don't have time right now to track it down any further than that. -bob From jeremy.knope at gmail.com Mon Aug 9 00:38:07 2004 From: jeremy.knope at gmail.com (Jerome) Date: Mon Aug 9 00:38:09 2004 Subject: [Pythonmac-SIG] Re: PyGame weirdness on OS X, leaks & exceptions In-Reply-To: References: <2c9aa7fe04080718124827a45@mail.gmail.com> <1268F70E-E921-11D8-828E-000A95C77748@mac.com> <2c9aa7fe040808081331e3e2e9@mail.gmail.com> <2c9aa7fe04080808132e8dde70@mail.gmail.com> Message-ID: <2c9aa7fe04080815386d47f7bc@mail.gmail.com> ah, good to know :) On Sun, 8 Aug 2004 14:22:22 -0400, Bob Ippolito wrote: > pygame on Mac OS X currently has an initialization hook in > pygame.init() that absolutely must be called unless you have already > set up a proper Cocoa environment. Initializing individual modules > simply will not work on OS X. No use emailing anyone else, I wrote > that code. > > -bob From mdj at physics.ucf.edu Mon Aug 9 21:38:26 2004 From: mdj at physics.ucf.edu (Michael Johnson) Date: Mon Aug 9 22:01:16 2004 Subject: [Pythonmac-SIG] What comes on Panther? Message-ID: Between having a Jaguar installation of MacPython ... and having someone else upgrade my machine to Panther (while not thinking to delete anything first) ... and now installing the add-ons ... I am confused. I may have ended up with some mixture of two versions. Could anyone please tell me what pieces of MacPython come with Panther? And where they are located? Thanks, Michael Johnson From bob at redivi.com Mon Aug 9 22:07:14 2004 From: bob at redivi.com (Bob Ippolito) Date: Mon Aug 9 22:07:20 2004 Subject: [Pythonmac-SIG] What comes on Panther? In-Reply-To: References: Message-ID: On Aug 9, 2004, at 3:38 PM, Michael Johnson wrote: > Between having a Jaguar installation of MacPython ... and having > someone else upgrade my machine to Panther (while not thinking > to delete anything first) ... and now installing the add-ons ... I am > confused. I may have ended up with some mixture of two versions. > > Could anyone please tell me what pieces of MacPython come with > Panther? And where they are located? Panther comes with Python 2.3.0 in /usr/bin/pythonw? and /System/Library/Frameworks/Python.framework with site-packages symlinked to /Library/Python/2.3/. There are instructions for removing the user-installed 10.2.x installation on the MacPython website: http://homepages.cwi.nl/~jack/macpython/uninstall.html -bob From janssen at parc.com Mon Aug 9 23:12:48 2004 From: janssen at parc.com (Bill Janssen) Date: Mon Aug 9 23:14:01 2004 Subject: [Pythonmac-SIG] How to build an app which includes non-standard Python packages? Message-ID: <04Aug9.141250pdt."58612"@synergy1.parc.xerox.com> I'd like to distribute an app built on Python which uses several non-standard Python packages: Medusa, ReportLab, PIL. I plan to insist on Panther, and so use the standard /usr/bin/python. Where in my app should I place the extra packages? Somewhere under Resources? Is there anything special I need to do when building them to make sure they work with the vanilla system Python when the app is installed on another machine? Is there a write-up which explains this? Bill From jwt at onjapan.net Tue Aug 10 00:04:01 2004 From: jwt at onjapan.net (Jim Tittsler) Date: Tue Aug 10 00:04:02 2004 Subject: [Pythonmac-SIG] What comes on Panther? In-Reply-To: References: Message-ID: <0536F689-EA50-11D8-8F2D-000A957919FA@onjapan.net> On Aug 10, 2004, at 05:07, Bob Ippolito wrote: > Panther comes with Python 2.3.0 in /usr/bin/pythonw? and > /System/Library/Frameworks/Python.framework with site-packages > symlinked to /Library/Python/2.3/. Speaking of which... are the version numbers in the property lists correct? I have one machine that was upgraded and one that went through the "archive-and-install" process, and on each the /System/Library/Frameworks/Python.framework/Resources/Info.plist and version.plist files look like they are leftover from version 2.2. Was that an oversight on Apple's part or have I somehow managed to get old files mixed in? -- Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6 Python Starship http://Starship.Python.net/ Ringo MUG Tokyo http://www.ringo.net/rss.html From bob at redivi.com Tue Aug 10 00:14:00 2004 From: bob at redivi.com (Bob Ippolito) Date: Tue Aug 10 00:14:06 2004 Subject: [Pythonmac-SIG] What comes on Panther? In-Reply-To: <0536F689-EA50-11D8-8F2D-000A957919FA@onjapan.net> References: <0536F689-EA50-11D8-8F2D-000A957919FA@onjapan.net> Message-ID: <6A926C76-EA51-11D8-9D40-000A95686CD8@redivi.com> On Aug 9, 2004, at 6:04 PM, Jim Tittsler wrote: > On Aug 10, 2004, at 05:07, Bob Ippolito wrote: > >> Panther comes with Python 2.3.0 in /usr/bin/pythonw? and >> /System/Library/Frameworks/Python.framework with site-packages >> symlinked to /Library/Python/2.3/. > > Speaking of which... are the version numbers in the property lists > correct? I have one machine that was upgraded and one that went > through the "archive-and-install" process, and on each the > /System/Library/Frameworks/Python.framework/Resources/Info.plist and > version.plist files look like they are leftover from version 2.2. Was > that an oversight on Apple's part or have I somehow managed to get old > files mixed in? I would have to guess that it's an oversight on someone's part, and I doubt it's Apple's :) I don't have Panther on this machine at the moment so I can't really say, but this definitely has been resolved in the build of Python that is in the Darwin 8.0b1 preview sources online (both plists say 2.3.3 in that case). -bob From delza at blastradius.com Fri Aug 6 18:45:50 2004 From: delza at blastradius.com (Dethe Elza) Date: Tue Aug 10 04:01:50 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? In-Reply-To: <2c9aa7fe0408050717209a24e1@mail.gmail.com> References: <2c9aa7fe0408050717209a24e1@mail.gmail.com> Message-ID: <135569C9-E7C8-11D8-9094-0003939B59E8@blastradius.com> On 5-Aug-04, at 7:17 AM, Jerome wrote: > I'm trying to figure out how to use SequenceGrabber component in > QuickTime beta 0.2 for python > it seems to have all the functions except i can't find out how to > create the component to start > in Carbon it's mySeqGrab = > OpenDefaultComponent(SeqGrabberComponentType, 0) or something like > that > then you can call stuff like SGInitialize(mySeqGrab) I have no insights into how to solve your problem, but I'm very interested in hearing the solution when you find it. I've just acquired an iSight, you see.... --Dethe A good engineer is a person who makes a design that works with as few original ideas as possible. --Freeman Dyson -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2371 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040806/385cf710/smime.bin From bernat at free.fr Sun Aug 8 21:48:10 2004 From: bernat at free.fr (Vincent Bernat) Date: Tue Aug 10 04:01:51 2004 Subject: [Pythonmac-SIG] "Bus error" when using Authorization Message-ID: Hello ! I am trying to use the Authorization class with python to check that the user owns some rights. Here is a snippet of code : >>> from Authorization import * >>> auth = Authorization() >>> auth.copyRights(rights=(("org.crans.wifi.daemons.restart", None, 0),), flags=(kAuthorizationFlagDefaults, kAuthorisationFlagExtendRights, kAuthorizationFlagInteractionAllowed, kAuthorizationFlagPreAuthorize)) And I get "bus error". I have tried inside gdb : guybrush% gdb python GNU gdb 5.3-20030128 (Apple version gdb-309) (Thu Dec 4 15:41:30 GMT 2003) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin". Reading symbols for shared libraries ..... done (gdb) run Starting program: /usr/bin/python Reading symbols for shared libraries .................. done Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from Authorization import * Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done >>> auth = Authorization() >>> auth.copyRights(rights=(("org.crans.cranswifi.daemons.restart", None, 0),), flags=(kAuthorizationFlagDefaults, kAuthorizationFlagExtendRights, kAuthorizationFlagInteractionAllowed, kAuthorizationFlagPreAuthorize)) Program received signal EXC_BAD_ACCESS, Could not access memory. 0x90006e40 in strlen () (gdb) bt #0 0x90006e40 in strlen () #1 0x92249b38 in char* Security::DataWalkers::walk(Security::DataWalkers::SizeWalker&, char*&) () #2 0x9225b648 in void Security::DataWalkers::walk(Security::DataWalkers::SizeWalker&, AuthorizationItem&) () #3 0x9225b350 in AuthorizationItemSet* Security::DataWalkers::walk(Security::DataWalkers::SizeWalker&, AuthorizationItemSet*&) () #4 0x9225abec in unsigned long Security::DataWalkers::size(AuthorizationItemSet const*) () #5 0x920c4c30 in Security::SecurityServer::ClientSession::authCopyRights(Security::SecurityServer::AuthorizationBlob const&, AuthorizationItemSet const*, AuthorizationItemSet const*, unsigned long, AuthorizationItemSet**) () #6 0x920c4b40 in AuthorizationCopyRights () #7 0x000dd5dc in __pyx_f_14_Authorization_18_AuthorizationBase_copyRights (__pyx_v_self=0x53960, __pyx_args=0x0, __pyx_kwds=0xfefefeff) at src/_Authorization.c:1011 #8 0x95f4a8d0 in PyObject_Call () #9 0x95fa9ba8 in PyEval_GetFuncDesc () #10 0x95fa9598 in PyEval_GetFuncDesc () #11 0x95fa6c64 in PyEval_EvalCode () #12 0x95fa7e30 in PyEval_EvalCodeEx () #13 0x95fa4734 in PyEval_EvalCode () #14 0x95fc85f0 in PyRun_FileExFlags () #15 0x95fc7354 in PyRun_InteractiveOneFlags () #16 0x95fc713c in PyRun_InteractiveLoopFlags () #17 0x95fc6fd4 in PyRun_AnyFileExFlags () #18 0x95fd1ec0 in Py_Main () #19 0x00003c78 in start () #20 0x00003aec in start () (gdb) Any idea ? -- BOFH excuse #354: Chewing gum on /dev/sd3c From jeremy.knope at gmail.com Tue Aug 10 16:10:25 2004 From: jeremy.knope at gmail.com (Jerome) Date: Tue Aug 10 16:10:31 2004 Subject: [Pythonmac-SIG] How to build an app which includes non-standard Python packages? In-Reply-To: <5873053710629464395@unknownmsgid> References: <5873053710629464395@unknownmsgid> Message-ID: <2c9aa7fe040810071048b4fc21@mail.gmail.com> using the bundlebuilder you can tell it to include modules/libraries it's not very perfect tho, i usually get annoyed, and tell it just to include any base stuff, then copy the Imaging, pyGame, or whatever module i want into Resources next to my script manually by getting it from /Library/Python/2.3/ or wherever --jerome On Mon, 9 Aug 2004 14:12:48 PDT, Bill Janssen wrote: > I'd like to distribute an app built on Python which uses several > non-standard Python packages: Medusa, ReportLab, PIL. I plan to > insist on Panther, and so use the standard /usr/bin/python. Where in > my app should I place the extra packages? Somewhere under Resources? > Is there anything special I need to do when building them to make sure > they work with the vanilla system Python when the app is installed on > another machine? Is there a write-up which explains this? > > Bill > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From loredo at astro.cornell.edu Tue Aug 10 18:53:33 2004 From: loredo at astro.cornell.edu (Tom Loredo) Date: Tue Aug 10 18:53:36 2004 Subject: [Pythonmac-SIG] Problems building SciPy-0.3 Message-ID: <200408101653.i7AGrX603035@laplace.astro.cornell.edu> Hi folks- I'm trying to build SciPy-0.3 on a G4 (and on a G3 laptop) running 10.2.8 and MacPy 2.3.3, but with no luck---the build halts with a segfault. I've followed Chris's instructions on the scipy web site, with the exception of not installing Gnuplot & AquaTerm. The one possible complication is that I have some fink stuff installed (not python, though), including f77, but I've renamed it f77-fink, and verified that there is no f77 in my path (the g77 install doesn't install one, so I was worried scipy or f2py might find Fink's f77 rather than using g77). On every first install attempt, I get an error compiling _configtest.c, from code in the included file fputest.c. If I merely restart the build after the error, the build proceeds through this part successfully, but perhaps this is an important symptom. Here's the output from the first build attempt: compiling '_configtest.c': #define FPU_DIGITAL #define CONFIG_SCRIPT #include "fputest.c" gcc options: '-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes' compile options: '-I/Users/loredo/Python/SciPy_complete-0.3/build/temp.darwin-6.8-Power_Macintosh-2.3/config_pygist -I/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/src/play -c' gcc: _configtest.c In file included from fputest.c:10, from _configtest.c:3: fpuset.c:27:27: machine/fpu.h: No such file or directory In file included from fputest.c:10, from _configtest.c:3: fpuset.c: In function `u_fpu_setup': fpuset.c:45: warning: implicit declaration of function `ieee_set_fp_control' fpuset.c:45: `IEEE_TRAP_ENABLE_INV' undeclared (first use in this function) fpuset.c:45: (Each undeclared identifier is reported only once fpuset.c:45: for each function it appears in.) fpuset.c:45: `IEEE_TRAP_ENABLE_DZE' undeclared (first use in this function) fpuset.c:46: `IEEE_TRAP_ENABLE_OVF' undeclared (first use in this function) [snip many lines] removing: _configtest.c _configtest.o compiling '_configtest.c': #define FPU_SUN4 #define CONFIG_SCRIPT #include "fputest.c" gcc options: '-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes' compile options: '-I/Users/loredo/Python/SciPy_complete-0.3/build/temp.darwin-6.8-Power_Macintosh-2.3/config_pygist -I/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/src/play -c' gcc: _configtest.c In file included from fputest.c:10, from _configtest.c:3: fpuset.c: In function `u_fpu_setup': fpuset.c:133: warning: implicit declaration of function `nonstandard_arithmetic' fpuset.c:134: warning: implicit declaration of function `ieee_handler' Traceback (most recent call last): File "setup.py", line 110, in ? setup_package(ignore_packages) File "setup.py", line 83, in setup_package ignore_packages = ignore_packages) File "scipy_core/scipy_distutils/misc_util.py", line 459, in get_subpackages config = setup_module.configuration(*args) File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/setup_xplt.py", line 210, in configuration conf.run() File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/config_pygist.py", line 64, in run self.config_unix() File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/config_pygist.py", line 193, in config_unix self.find_sigfpe(configfile) File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/config_pygist.py", line 311, in find_sigfpe include_dirs=self.unix_include_dirs): File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/distutils/command/config.py", line 260, in try_link libraries, library_dirs, lang) File "/Users/loredo/Python/SciPy_complete-0.3/Lib/xplt/config_pygist.py", line 28, in _link library_dirs=library_dirs) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/distutils/ccompiler.py", line 860, in link_executable debug, extra_preargs, extra_postargs, None, target_lang) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/distutils/unixccompiler.py", line 153, in link libraries) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/distutils/ccompiler.py", line 1249, in gen_lib_options (lib_dir, lib_name) = os.path.split (lib) File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/posixpath.py", line 77, in split i = p.rfind('/') + 1 AttributeError: 'NoneType' object has no attribute 'rfind' As I said, merely running "python setup.py build" again continues the build without complaint, starting: fftw_info: FOUND: libraries = ['rfftw', 'fftw'] library_dirs = ['/usr/local/lib'] define_macros = [('SCIPY_FFTW_H', None)] include_dirs = ['/usr/local/include'] etc.. But it eventually halts with a segfault working on cblas: f2py: build/src/cblas.pyf Reading fortran codes... Reading file 'build/src/cblas.pyf' Post-processing... Block: cblas Block: empty_module Building modules... Building module "cblas"... Constructing wrapper function "empty_module"... empty_module() Wrote C/API module "cblas" to file "build/src/build/src/cblasmodule.c" adding 'build/src/fortranobject.c' to sources. adding 'build/src' to include_dirs. building extension "scipy.linalg.flapack" sources generating flapack interface Segmentation fault Any help anyone can offer on how to diagnose this would be appreciated. Thanks, Tom From loredo at astro.cornell.edu Tue Aug 10 23:49:23 2004 From: loredo at astro.cornell.edu (Tom Loredo) Date: Tue Aug 10 23:49:28 2004 Subject: [Pythonmac-SIG] Possible MacPy 2.3.3 bug in re module Message-ID: <200408102149.i7ALnNE03415@laplace.astro.cornell.edu> Hi folks- With the help of scipy-user folks, I've tracked down the problem with building scipy to what appears to be a bug in MacPy 2.3.3 (Jaguar), presumably in the re module. Here is a text file with a string produced in the scipy build that, when regex-ed, causes a segfault with MacPy 2.3.3; and a script that does the matching: http://www.museweb.com/interface.txt http://www.museweb.com/check_re.py Running the script with MacPy 2.3.3 on 10.2.8 gives a segfault. Running it with /usr/bin/python works fine. I've also tried it on a Sun machine with python2.2.2 and a linux machine with 2.3.3 and it works fine on those, too. It appears this is a MacPy 2.3.3 bug (presumably in the re module). I'd appreciate it if a Jaguar 2.3.3 user would download the script and text and run the script, and let us know if you get a segfault. Perhaps this is just a problem with my installation. Thanks, Tom From ronaldoussoren at mac.com Wed Aug 11 07:30:30 2004 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed Aug 11 07:31:10 2004 Subject: [Pythonmac-SIG] Possible MacPy 2.3.3 bug in re module In-Reply-To: <200408102149.i7ALnNE03415@laplace.astro.cornell.edu> References: <200408102149.i7ALnNE03415@laplace.astro.cornell.edu> Message-ID: <8F3A4F3B-EB57-11D8-90BC-000A95C77748@mac.com> I don't have a system running 10.2 at the moment. The script runs fine on Panther + Apple's Python and with python2.4 from CVS (also on OSX). Ronald From steph-info at wanadoo.fr Wed Aug 11 13:07:00 2004 From: steph-info at wanadoo.fr (Stephane Serra) Date: Wed Aug 11 13:07:04 2004 Subject: [Pythonmac-SIG] Re: Possible MacPy 2.3.3 bug in re module In-Reply-To: <20040811100011.588761E4014@bag.python.org> Message-ID: <91A58B96-EB86-11D8-B781-00050231A219@wanadoo.fr> Hello Tom, This script works fine on Jaguar 10.2.8 and Python 2.3.4. An upgrade to 2.3.4 could correct the problem ? St?phane Serra. From erik at letterror.com Wed Aug 11 13:26:59 2004 From: erik at letterror.com (Erik van Blokland) Date: Wed Aug 11 13:27:04 2004 Subject: [Pythonmac-SIG] version 0.5? Message-ID: <5C234193-EB89-11D8-9B4D-000A956A726C@letterror.com> Hullo, doing something wrong I'm sure. I'm trying to use PackMan in the Python IDE. Selecting the menu gives me a warning: http://www.python.org/packman/version-0.3/darwin-7.5.0- Power_Macintosh.plist HTTP Error 404: Not Found and indeed when I look at http://www.python.org/packman/version-0.3/ there's no directory for darwin-7.5.0. OSX 10.3.4, Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin. Humbly, Erik From ronaldoussoren at mac.com Wed Aug 11 13:40:40 2004 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed Aug 11 13:40:53 2004 Subject: [Pythonmac-SIG] version 0.5? In-Reply-To: <5C234193-EB89-11D8-9B4D-000A956A726C@letterror.com> References: <5C234193-EB89-11D8-9B4D-000A956A726C@letterror.com> Message-ID: <4536F716-EB8B-11D8-A08F-000D93AD379E@mac.com> On 11-aug-04, at 13:26, Erik van Blokland wrote: > Hullo, > > doing something wrong I'm sure. I'm trying to use PackMan in the > Python IDE. > > Selecting the menu gives me a warning: > http://www.python.org/packman/version-0.3/darwin-7.5.0- > Power_Macintosh.plist > HTTP Error 404: Not Found That's a know problem with PackMan: it uses the kernel version instead of the OS version to determine which database it should use. Darwin 7.5.0 is used in OSX 10.3.5 which was released a couple of days ago. Jack is on holiday and therefore hasn't updated the site yet. Ronald From loredo at astro.cornell.edu Wed Aug 11 16:30:30 2004 From: loredo at astro.cornell.edu (Tom Loredo) Date: Wed Aug 11 16:30:34 2004 Subject: [Pythonmac-SIG] Possible MacPy 2.3.3 bug in re module Message-ID: <200408111430.i7BEUUA04222@laplace.astro.cornell.edu> Thanks for the checks with other MacPy/OS versions. Is there a binary build of MacPy 2.3.4 available, or must I build from source? -Tom From loredo at astro.cornell.edu Thu Aug 12 02:27:41 2004 From: loredo at astro.cornell.edu (Tom Loredo) Date: Thu Aug 12 02:27:45 2004 Subject: [Pythonmac-SIG] Building MacPy 2.3.4 for Jaguar Message-ID: <200408120027.i7C0Rfi04921@laplace.astro.cornell.edu> Hi folks- As noted in my recent posts, an apparent bug in 2.3.3 on Jaguar is preventing me from building SciPy. Another user posted success with the part of the build causing problems using 2.3.4. I've attempted a build of 2.3.4, but during "make frameworkinstall" I run into the obvious problem: xcodebuild -target PythonLauncher -buildstyle Deployment install \ DSTROOT=/ INSTALL_PATH=/Applications/MacPython-2.3 /bin/sh: xcodebuild: command not found make[1]: *** [install_PythonLauncher] Error 127 make: *** [frameworkinstallapps] Error 2 As far as I can tell there is no version of Xcode for Jaguar (though from a Google search it appears the beta version worked on Jaguar). Is there any way to build the framework version of MacPy on Jaguar? Is there a binary build of 2.3.4 for Jaguar somewhere that I've overlooked? Thanks, Tom From bob at redivi.com Thu Aug 12 03:34:09 2004 From: bob at redivi.com (Bob Ippolito) Date: Thu Aug 12 03:34:46 2004 Subject: [Pythonmac-SIG] Building MacPy 2.3.4 for Jaguar In-Reply-To: <200408120027.i7C0Rfi04921@laplace.astro.cornell.edu> References: <200408120027.i7C0Rfi04921@laplace.astro.cornell.edu> Message-ID: pbxbuild is the equivalent for Jaguar .. try making an alias of pbxbuild to xcodebuild or something. I have no idea if the project files are still Jaguar compatible, though. -bob On Aug 11, 2004, at 8:27 PM, Tom Loredo wrote: > > Hi folks- > > As noted in my recent posts, an apparent bug in 2.3.3 on Jaguar is > preventing me from building SciPy. Another user posted success > with the part of the build causing problems using 2.3.4. I've > attempted a build of 2.3.4, but during "make frameworkinstall" > I run into the obvious problem: > > xcodebuild -target PythonLauncher -buildstyle Deployment install \ > DSTROOT=/ INSTALL_PATH=/Applications/MacPython-2.3 > /bin/sh: xcodebuild: command not found > make[1]: *** [install_PythonLauncher] Error 127 > make: *** [frameworkinstallapps] Error 2 > > As far as I can tell there is no version of Xcode for Jaguar (though > from a Google search it appears the beta version worked on Jaguar). > Is there any way to build the framework version of MacPy on Jaguar? > Is there a binary build of 2.3.4 for Jaguar somewhere that I've > overlooked? > > Thanks, > Tom > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From loredo at astro.cornell.edu Thu Aug 12 06:07:31 2004 From: loredo at astro.cornell.edu (Tom Loredo) Date: Thu Aug 12 06:07:34 2004 Subject: [Pythonmac-SIG] Building MacPy 2.3.4 for Jaguar Message-ID: <200408120407.i7C47US05111@laplace.astro.cornell.edu> Bob- Thanks for the tip about pbxbuild. It turns out in Mac/OSX/Makefile, there's a symbol PBXBUILD that is defined as 'xcodebuild' but with a comment noting for Jaguar it should be 'pbxbuild'. That change let the build complete. Perhaps someone with CVS priveleges can change Mac/OSX/README to note that Jaguar users must make this change. Unfortunately, 2.3.4 did not fix my regexp problem, so I don't know what's going on with that. Following a tip from the scipy folks, I changed from re to pre and the scipy build proceeds mostly okay after that, until building _fftpack.so when I get this ld error, indicating ld cannot find Python symbols: ------- gcc: build/src/fortranobject.c cc1: warning: changing search order for system directory "/usr/local/include" cc1: warning: as it has already been specified as a non-system directory /usr/local/bin/g77 -lcc_dynamic -bundle build/temp.darwin-6.8-Power_Macintosh-2.3/build/src/Lib/fftpack/ _fftpackmodule.o build/temp.darwin-6.8-Power_Macintosh-2.3/Lib/fftpack/src/zfft.o build/temp.darwin-6.8-Power_Macintosh-2.3/Lib/fftpack/src/drfft.o build/temp.darwin-6.8-Power_Macintosh-2.3/Lib/fftpack/src/zrfft.o build/temp.darwin-6.8-Power_Macintosh-2.3/Lib/fftpack/src/zfftnd.o build/temp.darwin-6.8-Power_Macintosh-2.3/build/src/fortranobject.o -L/usr/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.0 -Lbuild/temp.darwin-6.8-Power_Macintosh-2.3 -ldfftpack -lrfftw -lfftw -lg2c -o build/lib.darwin-6.8-Power_Macintosh-2.3/scipy/fftpack/_fftpack.so /usr/bin/ld: Undefined symbols: _PyArg_ParseTuple _PyArg_ParseTupleAndKeywords _PyCObject_AsVoidPtr _PyCObject_Type _PyComplex_Type _PyDict_GetItemString _PyDict_SetItemString _PyErr_Clear [snip] _Py_FindMethod __PyObject_New restFP saveFP collect2: ld returned 1 exit status error: Command "/usr/local/bin/g77 -lcc_dynamic -bundle build/temp.darwin-6.8-Power_Macintosh-2.3/build/src/Lib/fftpack/ _fftpackmodule.o build/temp.darwin-6.8-Power_Macintosh-2.3/Lib/fftpack/src/zfft.o build/temp.darwin-6.8-Power_Macintosh-2.3/Lib/fftpack/src/drfft.o build/temp.darwin-6.8-Power_Macintosh-2.3/Lib/fftpack/src/zrfft.o build/temp.darwin-6.8-Power_Macintosh-2.3/Lib/fftpack/src/zfftnd.o build/temp.darwin-6.8-Power_Macintosh-2.3/build/src/fortranobject.o -L/usr/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.0 -Lbuild/temp.darwin-6.8-Power_Macintosh-2.3 -ldfftpack -lrfftw -lfftw -lg2c -o build/lib.darwin-6.8-Power_Macintosh-2.3/scipy/fftpack/_fftpack.so" failed with exit status 1 -------- Any advice on how to fix this (is a library path missing?) would be appreciated. Perhaps it's a hint regarding my other problems. -Tom From bob at redivi.com Thu Aug 12 06:20:51 2004 From: bob at redivi.com (Bob Ippolito) Date: Thu Aug 12 06:21:28 2004 Subject: [Pythonmac-SIG] Building MacPy 2.3.4 for Jaguar In-Reply-To: <200408120407.i7C47US05111@laplace.astro.cornell.edu> References: <200408120407.i7C47US05111@laplace.astro.cornell.edu> Message-ID: On Aug 12, 2004, at 12:07 AM, Tom Loredo wrote: > Thanks for the tip about pbxbuild. It turns out in Mac/OSX/Makefile, > there's a symbol PBXBUILD that is defined as 'xcodebuild' but with a > comment noting for Jaguar it should be 'pbxbuild'. That change let > the build complete. Perhaps someone with CVS priveleges can change > Mac/OSX/README to note that Jaguar users must make this change. > > Unfortunately, 2.3.4 did not fix my regexp problem, so I don't know > what's going on with that. Following a tip from the scipy folks, I > changed from re to pre and the scipy build proceeds mostly okay after > that, until building _fftpack.so when I get this ld error, indicating > ld cannot find Python symbols: > > ------- > > gcc: build/src/fortranobject.c > cc1: warning: changing search order for system directory > "/usr/local/include" > cc1: warning: as it has already been specified as a non-system > directory > /usr/local/bin/g77 -lcc_dynamic -bundle > .... > -L/usr/local/lib -L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.0 > -Lbuild/temp.darwin-6.8-Power_Macintosh-2.3 -ldfftpack -lrfftw -lfftw > -lg2c -o > build/lib.darwin-6.8-Power_Macintosh-2.3/scipy/fftpack/_fftpack.so > /usr/bin/ld: Undefined symbols: > _PyArg_ParseTuple ... > Any advice on how to fix this (is a library path missing?) would be > appreciated. Perhaps it's a hint regarding my other problems. Maybe you have a strange locale set that magically causes the regexp problem? The build problem is due to a missing -framework Python on that g77 commandline. Hopefully that build of g77 support's -framework. Perhaps you should just upgrade to Panther like the rest of us have and save yourself some trouble :) -bob From loredo at astro.cornell.edu Thu Aug 12 19:37:02 2004 From: loredo at astro.cornell.edu (Tom Loredo) Date: Thu Aug 12 19:37:06 2004 Subject: [Pythonmac-SIG] Building MacPy 2.3.4 for Jaguar Message-ID: <200408121737.i7CHb2105744@laplace.astro.cornell.edu> Hi Bob- Thanks a lot for the input into these problems. > Maybe you have a strange locale set that magically causes the regexp > problem? I haven't done anything special with the locale, though perhaps some installed software has. Is there a way to check? > The build problem is due to a missing -framework Python on that g77 > commandline. Hopefully that build of g77 support's -framework. It's the g77 build recommended by the SciPy folks, so I presume it should work. I'll fool a bit with it. > Perhaps you should just upgrade to Panther like the rest of us have and > save yourself some trouble :) It's very tempting! But a problem is that I'm developing a package for astronomers (with NASA's support) and it really should support Jaguar users. If I upgrade to Panther, is there anything special that a Python user/developer should do? I.e., is it okay to "Upgrade" or should I "Archive and Install"? Thanks, Tom From bob at redivi.com Thu Aug 12 20:06:47 2004 From: bob at redivi.com (Bob Ippolito) Date: Thu Aug 12 20:07:20 2004 Subject: [Pythonmac-SIG] Building MacPy 2.3.4 for Jaguar In-Reply-To: <200408121737.i7CHb2105744@laplace.astro.cornell.edu> References: <200408121737.i7CHb2105744@laplace.astro.cornell.edu> Message-ID: <603068FC-EC8A-11D8-B2EB-000A95686CD8@redivi.com> On Aug 12, 2004, at 1:37 PM, Tom Loredo wrote: > > Hi Bob- > > Thanks a lot for the input into these problems. > >> Maybe you have a strange locale set that magically causes the regexp >> problem? > > I haven't done anything special with the locale, though perhaps some > installed software has. Is there a way to check? I don't remember, it's an environment variable. I doubt other installed software has affected it without your knowledge. >> The build problem is due to a missing -framework Python on that g77 >> commandline. Hopefully that build of g77 support's -framework. > > It's the g77 build recommended by the SciPy folks, so I presume it > should work. I'll fool a bit with it. > >> Perhaps you should just upgrade to Panther like the rest of us have >> and >> save yourself some trouble :) > > It's very tempting! But a problem is that I'm developing a package > for astronomers (with NASA's support) and it really should support > Jaguar users. Well, 10.4 is coming out sometime in the next ~4-10 months, and it's generally ok to support the latest "minus one" release. That's Apple's policy, anyway. It wouldn't be the worst thing in the world to support 10.3+. > If I upgrade to Panther, is there anything special that a Python > user/developer should do? I.e., is it okay to "Upgrade" or should > I "Archive and Install"? Archive and Install is almost always best, but you should be fine so long as you uninstall the Jaguar MacPython. Instructions for that are linked to somewhere in http://pythonmac.org/wiki/FAQ -bob From sw at wordtech-software.com Fri Aug 13 05:24:11 2004 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri Aug 13 05:24:15 2004 Subject: [Pythonmac-SIG] Carbon GUI/MacPython Message-ID: <411C345B.9040201@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm curious as to why the Carbon side of MacPython doesn't seem to be updated, at least with regard to GUI programming. Earlier, when I queried the list about the W widget set and some related questions, I was advised that these were deprecated and would likely go away at some point in the future. It was also mentioned that MacPython (the PythonIDE and PackageManager) are dependent on the Waste module, which also seems obsolete. My question is, what's going to replace these things? The Carbon API has more modern text processing facilities than Waste (MLTE?), if I have read the documentation correctly, and one can certainly also call the complete set of Interface Builder widgets from Carbon. Or is PyObjC going to become the "official" Mac-native API for Python at some point in the future--the only way to write Python software that takes full advantage of Mac API's? I'm just trying to figure out where I want to focus my investment of time in learning Python GUI programming on the Mac. I'm working with Tcl/Tk Aqua right now, but Tkinter gets such a bad rap on this list, anyway, and it seems pretty clear that PyObjC (and wxPython) are richer toolkits overall. I'm just more interested in Carbon than Cocoa at this point (I do like AppleScript Studio, but it abstracts the Cocoa stuff in a way that is easier for me to learn than ObjC looks), and curious if there's any future in Carbon-specific GUI programming with Python. I certainly don't want to waste time learning an obsolete and unsupported API. - -- Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.smallbizmac.com http://www.kevin-walzer.com mailto:sw@wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBHDRaF6m9qPmThLQRAohiAJ0ewP8ASEYA1gaCDD4dy88DYisVGgCdEGqK 44t//DdtcNZWH5G6rHeWvZY= =aTLT -----END PGP SIGNATURE----- From ujeni at imt.net Fri Aug 13 05:27:33 2004 From: ujeni at imt.net (Dustin Lee) Date: Fri Aug 13 05:27:51 2004 Subject: [Pythonmac-SIG] building mysqldb on mac os x server Message-ID: <411C3525.7000607@imt.net> Hi, I've seen a few messages about getting mysqldb built and installed but some how I can't get things working for me. I'm trying to install MySQLdb 1.0.0. MacOSx version: (uname -a ) Darwin ???.???.???.??? 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26 :16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh powerpc From setup.py I'm confused about this section: elif sys.platform[:6] == "darwin": # Mac OS X include_dirs.append('/sw/include/mysql') library_dirs.append('/sw/lib/mysql') extra_link_args.append('-flat_namespace') I don't have /sw/*. Should I? Does anyone have a working setup.py that installed everything successfully? I've been messing around with the setup.py but after what "looks" like a successful build/install I still get the following: (** Hmmm... just double checked, I actuall get an error about /sw/lib/mysql not existing - but if I comment out those lines from setup.py then it *seems* to build correctly...) Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb Traceback (most recent call last): File "", line 1, in ? File "MySQLdb/__init__.py", line 27, in ? import _mysql ImportError: No module named _mysql >>> Here is the current state of my setup.py: (after a few attempts at changing variables) Any help/suggestions would be appreciated. ############################################################################ #!/usr/bin/env python """Setup script for the MySQLdb module distribution.""" import os, sys from distutils.core import setup from distutils.extension import Extension import string YES = 1 NO = 0 mysqlclient = os.getenv('mysqlclient', 'mysqlclient') mysqlversion = tuple(map(int, string.split(os.getenv('mysqlversion', '4.0.18'), '.'))) mysqloptlibs = string.split(os.getenv('mysqloptlibs', '')) embedded_server = (mysqlclient == 'mysqld') name = "MySQL-%s" % os.path.basename(sys.executable) if embedded_server: name = name + "-embedded" version = "1.0.0" # include files and library locations should cover most platforms include_dirs = [ '/usr/include/mysql', ] library_dirs = [ '/usr/lib/mysql', ] libraries = [mysqlclient] + mysqloptlibs # MySQL-3.23 and newer need libz if mysqlversion > (3,23,0): libraries.append("z") #if mysqlversion > (4,0,0): # libraries.append("crypt") # On some platorms, this can be used to find the shared libraries # at runtime, if they are in a non-standard location. Doesn't # work for Linux gcc. runtime_library_dirs = [] # This can be used to force linking against static libraries. extra_objects = [] # Sometimes the compiler or linker needs an extra switch to make # things work. extra_compile_args = [] extra_link_args = [] if sys.platform == "netbsd1": include_dirs = ['/usr/pkg/include/mysql'] library_dirs = ['/usr/pkg/lib/mysql'] elif sys.platform in ("freebsd4", "openbsd3"): LOCALBASE = os.environ.get('LOCALBASE', '/usr/local') include_dirs = ['%s/include/mysql' % LOCALBASE] library_dirs = ['%s/lib/mysql' % LOCALBASE] elif sys.platform == "sunos5": # Solaris 2.8 + gcc runtime_library_dirs.append('/usr/local/lib:/usr/openwin/lib:/usr/dt/lib') extra_compile_args.append("-fPIC") elif sys.platform == "win32": # Ugh include_dirs = [r'c:\mysql\include'] library_dirs = [r'c:\mysql\lib\opt'] libraries.extend(['zlib', 'msvcrt', 'libcmt', 'wsock32', 'advapi32']) extra_objects = [r'c:\mysql\lib\opt\mysqlclient.lib'] elif sys.platform == "cygwin": include_dirs = ['/c/mysql/include'] library_dirs = ['/c/mysql/lib'] extra_compile_args.append('-DMS_WIN32') elif sys.platform[:6] == "darwin": # Mac OS X include_dirs.append('/sw/include/mysql') library_dirs.append('/sw/lib/mysql') extra_link_args.append('-flat_namespace') elif sys.platform == 'linux2' and os.environ.get('HOSTTYPE') == 'alpha': libraries.extend(['ots', 'cpml']) elif os.name == "posix": # UNIX-ish platforms not covered above pass # default should work else: raise "UnknownPlatform", "sys.platform=%s, os.name=%s" % \ (sys.platform, os.name) long_description = \ """Python interface to MySQL MySQLdb is an interface to the popular MySQL database server for Python. The design goals are: - Compliance with Python database API version 2.0 - Thread-safety - Thread-friendliness (threads will not block each other) - Compatibility with MySQL-3.22 and later This module should be mostly compatible with an older interface written by Joe Skinner and others. However, the older version is a) not thread-friendly, b) written for MySQL 3.21, c) apparently not actively maintained. No code from that version is used in MySQLdb. MySQLdb is free software. """ setup (# Distribution meta-data name = name, version = version, description = "Python interface to MySQL", long_description=long_description, author = "Andy Dustman", author_email = "andy@dustman.net", license = "GPL", platforms = "ALL", url = "http://sourceforge.net/projects/mysql-python", # Description of the modules and packages in the distribution py_modules = ["CompatMysqldb", "_mysql_exceptions", "MySQLdb.converters", "MySQLdb.connections", "MySQLdb.cursors", "MySQLdb.sets", "MySQLdb.times", "MySQLdb.stringtimes", "MySQLdb.mxdatetimes", "MySQLdb.pytimes", "MySQLdb.constants.CR", "MySQLdb.constants.FIELD_TYPE", "MySQLdb.constants.ER", "MySQLdb.constants.FLAG", "MySQLdb.constants.REFRESH", "MySQLdb.constants.CLIENT", ], ext_modules = [Extension( name='_mysql', sources=['_mysql.c'], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_objects=extra_objects, extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, )], ) From bob at redivi.com Fri Aug 13 06:06:39 2004 From: bob at redivi.com (Bob Ippolito) Date: Fri Aug 13 06:07:13 2004 Subject: [Pythonmac-SIG] Carbon GUI/MacPython In-Reply-To: <411C345B.9040201@wordtech-software.com> References: <411C345B.9040201@wordtech-software.com> Message-ID: <2D7EF446-ECDE-11D8-92CA-000A95686CD8@redivi.com> On Aug 12, 2004, at 11:24 PM, Kevin Walzer wrote: > I'm curious as to why the Carbon side of MacPython doesn't seem to be > updated, at least with regard to GUI programming. Earlier, when I > queried the list about the W widget set and some related questions, I > was advised that these were deprecated and would likely go away at some > point in the future. It was also mentioned that MacPython (the > PythonIDE > and PackageManager) are dependent on the Waste module, which also seems > obsolete. W is just *barely* Carbon. It predates Carbon and doesn't do things the Carbon way (especially wrt. event loops). PythonIDE predates Carbon too, and PackageManager uses W (I think, anyway). Nobody wants to work on them because overhauling ancient code isn't very much fun, neither is working with Carbon. I'm pretty sure there's a PyObjC replacement for PackageManager complete or near-complete, and there was a wxPython version of it floating around a while ago. There isn't an official PythonIDE replacement yet, but there is PyOXIDE (written mostly(?) in ObjC, though). > My question is, what's going to replace these things? The Carbon API > has > more modern text processing facilities than Waste (MLTE?), if I have > read the documentation correctly, and one can certainly also call the > complete set of Interface Builder widgets from Carbon. Or is PyObjC > going to become the "official" Mac-native API for Python at some point > in the future--the only way to write Python software that takes full > advantage of Mac API's? The Carbon modules are there, and you can use them. I'm not sure about completeness or correctness, but it's automatically generated from the headers. I know from experience that this sort of automatically generated wrapper generally isn't going to be very good if people don't test it (like the Quicktime wrappers, for example). These sort of bugs are pretty easy to fix (for Jack, anyway), so if you try something that doesn't work and report a bug it will probably get fixed eventually. The question is WHY you would choose Carbon over Cocoa? Have you tried directly using both?! I would say that PyObjC is already more or less the 'official' way to get at Mac-native APIs from Python. If not now, then it will be soon enough. > I'm just trying to figure out where I want to focus my investment of > time in learning Python GUI programming on the Mac. I'm working with > Tcl/Tk Aqua right now, but Tkinter gets such a bad rap on this list, > anyway, and it seems pretty clear that PyObjC (and wxPython) are richer > toolkits overall. I'm just more interested in Carbon than Cocoa at this > point (I do like AppleScript Studio, but it abstracts the Cocoa stuff > in > a way that is easier for me to learn than ObjC looks), and curious if > there's any future in Carbon-specific GUI programming with Python. I > certainly don't want to waste time learning an obsolete and > unsupported API. Support for the Carbon APIs isn't going to go anywhere, but I think you'll more or less be alone in using them if that's what you choose to do. I definitely can't imagine anyone actually choosing Carbon over Cocoa given the choice (no legacy code, no need for OS9, etc.). -bob From ujeni at imt.net Fri Aug 13 14:17:39 2004 From: ujeni at imt.net (Dustin Lee) Date: Fri Aug 13 14:17:52 2004 Subject: [Pythonmac-SIG] building mysqldb on mac os x server In-Reply-To: References: <411C3525.7000607@imt.net> Message-ID: <411CB163.7080703@imt.net> Thanks for the response. I think I've tried that but I'll look again. MySQL came preinstalled with the server edition of mac os x but, sadly, MySQLdb didn't. Has any one successfully installed MySQLdb with a MySQL installation that wasn't installed by fink? dustin Chris Miles wrote: > Hi, > > /sw/ is managed by fink, so it looks like mysqldb simply assumes that > on Darwin(OS X) MySQL has only been installed by fink. > > If you have installed it into a different location (or don't use > fink), you can try modifying setup.py with the location of your > MySQL's include and lib paths. > > I don't use MySQL on OS X, but this is what the problem appears to be > from the info you've sent. Hope that helps. > > Cheers, > Chris > From sw at wordtech-software.com Fri Aug 13 15:39:05 2004 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri Aug 13 15:39:08 2004 Subject: [Pythonmac-SIG] Carbon GUI/MacPython In-Reply-To: <2D7EF446-ECDE-11D8-92CA-000A95686CD8@redivi.com> References: <411C345B.9040201@wordtech-software.com> <2D7EF446-ECDE-11D8-92CA-000A95686CD8@redivi.com> Message-ID: <411CC479.4090702@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bob Ippolito wrote: | | The question is WHY you would choose Carbon over Cocoa? Have you tried | directly using both?! I would say that PyObjC is already more or less | the 'official' way to get at Mac-native APIs from Python. If not now, | then it will be soon enough. At this point, more of the work I'm doing focuses on Carbon. For instance, I'm also working with Tk Aqua, which is Carbon-based. Any extensions there have to be written in C, which I'm learning for just that purpose. As I get further along and drill into the Carbon API/AppleEvents stuff in more depth, it seems logical to me to try to extend that learning. It would be simpler, probably, just to write my Python GUI's in Tkinter (since I'm learning Tk), but I'd rather expand my knowledge of the tools. I have tried Cocoa via AppleScript Studio and like it a lot. Building the GUI and hooking everything up with about 30 lines of AppleScript produced a reasonable GUI for tcpdump. But AppleScript Studio is relatively limited in terms of what it can do--it's certainly not the whole of Cocoa. (Nor is it as powerful as Python.) Unfortunately, I've looked at PyObjC, and I was unable to translate what I've learned from ASS into what is going on with PyObjC. Perhaps I'll change my mind once I get further into Python--still pretty much a beginner at this point. :-) | | | Support for the Carbon APIs isn't going to go anywhere, but I think | you'll more or less be alone in using them if that's what you choose to | do. That seems pretty clear. Perhaps I'll try it for a while and find it's too much work. :-) Thanks for the reply. - -- Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.smallbizmac.com http://www.kevin-walzer.com mailto:sw@wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBHMR5F6m9qPmThLQRAuPnAJ45msjqhrIMnfTguhOpsfqdTkQsUQCfWlld cU4DRZwbNOtS15rJmb562HI= =uNK0 -----END PGP SIGNATURE----- From kevino at tulane.edu Fri Aug 13 21:48:19 2004 From: kevino at tulane.edu (Kevin Ollivier) Date: Fri Aug 13 21:48:38 2004 Subject: [Pythonmac-SIG] Carbon GUI/MacPython In-Reply-To: <2D7EF446-ECDE-11D8-92CA-000A95686CD8@redivi.com> References: <411C345B.9040201@wordtech-software.com> <2D7EF446-ECDE-11D8-92CA-000A95686CD8@redivi.com> Message-ID: Hi Kevin and all, On Aug 12, 2004, at 9:06 PM, Bob Ippolito wrote: > On Aug 12, 2004, at 11:24 PM, Kevin Walzer wrote: > >> I'm curious as to why the Carbon side of MacPython doesn't seem to be >> updated, at least with regard to GUI programming. Earlier, when I >> queried the list about the W widget set and some related questions, I >> was advised that these were deprecated and would likely go away at >> some >> point in the future. It was also mentioned that MacPython (the >> PythonIDE >> and PackageManager) are dependent on the Waste module, which also >> seems >> obsolete. > > W is just *barely* Carbon. It predates Carbon and doesn't do things > the Carbon way (especially wrt. event loops). PythonIDE predates > Carbon too, and PackageManager uses W (I think, anyway). Nobody wants > to work on them because overhauling ancient code isn't very much fun, > neither is working with Carbon. > > I'm pretty sure there's a PyObjC replacement for PackageManager > complete or near-complete, and there was a wxPython version of it > floating around a while ago. There isn't an official PythonIDE > replacement yet, but there is PyOXIDE (written mostly(?) in ObjC, > though). Just as a FYI, the wxPython Package Manager is still around at: http://www.theolliviers.com/python/wxpm/. Probably next weekend I'll look at re-building the bundle with bundlebuilder2 and wxPython 2.5.2, which should be released by Monday. (You can check the wxPython-dev archives at http://lists.wxwidgets.org to find a link to the latest RC release.) On the Carbon side, being someone who works with Carbon and Python myself, I have to say that I really think wxPython is actually the best option for "Carbon" programming on Mac, plus you get cross-platform apps to boot. wxWidgets/wxPython developers have always had the philosophy that we should embrace the native platform as much as possible, and while there's always room for improvement, we're already taking advantage of HIView and Carbon Events pretty extensively, and I think when 2.5.2 is released you will notice the difference from previous releases because of that. As a couple examples of Mac-specific features 2.5.2 has off the top of my head, wx.TextCtrl now works with the Services menu, and you can support files dropped on the app icon by overriding the wx.App.MacOpenFile(filename) AppleEvent handler. I don't think either Tk or W is being as actively developed for Mac. There's more on the way as well. For example, I plan on having both Mozilla and WebKit working reasonably well within wxPython on Mac in the next couple months. Of course, whether or not you need PyObjC or wxPython really depends upon your needs and what you're comfortable with. But I think you'll find yourself running into walls with W, because as Bob says there isn't much demand for using the Carbon (and pre-Carbon) APIs for GUI programming these days, particularly with Python. Without much demand, it's hard for anyone to justify spending the time maintaining and updating the Carbon API wrappers. (And it is a lot of work, with Apple releasing major updates to their APIs every 12-18 months now.) I think you're better off going either cross-platform (wxPython) or Cocoa/PyObjC. HTH, Kevin From sw at wordtech-software.com Fri Aug 13 21:59:04 2004 From: sw at wordtech-software.com (Kevin Walzer) Date: Fri Aug 13 21:59:11 2004 Subject: [Pythonmac-SIG] Carbon GUI/MacPython In-Reply-To: References: <411C345B.9040201@wordtech-software.com> <2D7EF446-ECDE-11D8-92CA-000A95686CD8@redivi.com> Message-ID: <411D1D88.6090408@wordtech-software.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 | | On the Carbon side, being someone who works with Carbon and Python | myself, I have to say that I really think wxPython is actually the best | option for "Carbon" programming on Mac, plus you get cross-platform apps | to boot. wxWidgets/wxPython developers have always had the philosophy | that we should embrace the native platform as much as possible, and | while there's always room for improvement, we're already taking | advantage of HIView and Carbon Events pretty extensively, and I think | when 2.5.2 is released you will notice the difference from previous | releases because of that. As a couple examples of Mac-specific features | 2.5.2 has off the top of my head, wx.TextCtrl now works with the | Services menu, and you can support files dropped on the app icon by | overriding the wx.App.MacOpenFile(filename) AppleEvent handler. I don't | think either Tk or W is being as actively developed for Mac. | Kevin--thanks for putting wxPython in these terms--it makes a lot of sense to me. I know Bob is a strong advocate of PyObjC and I appreciate that--it just looked a bit too far afield from the modest amount I've learned so far. (Admittedly, I have a lot more to learn!) I think that, at the appropriate time, I'll give wxPython a closer look (I have Robin's demo from 2.5.1 running on my machine and I like the way wxPython looks on the Mac--not to mention it seems a little gentler for someone at my level than C++ wx.) Best, Kevin | | | - -- Kevin Walzer, PhD WordTech Software--Open Source Applications and Packages for OS X http://www.wordtech-software.com http://www.smallbizmac.com http://www.kevin-walzer.com mailto:sw@wordtech-software.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBHR2HF6m9qPmThLQRArnGAJ9+Lf0z92Ve1RuKFa+g3CyQWLFdeACaA1vC gKEgkZhMri/LzBRBNU3IqJo= =ox2i -----END PGP SIGNATURE----- From israel at uandmedance.com Fri Aug 13 22:44:12 2004 From: israel at uandmedance.com (israel@uandmedance.com) Date: Fri Aug 13 22:43:06 2004 Subject: [Pythonmac-SIG] trouble with package manager on macosx 10.2.8 with python 2.3.4 Message-ID: <883ACB55-ED69-11D8-971F-000393A47FF2@uandmedance.com> Hello folks. I've run into a problem with the vimshell module and the Package Manager app that comes with python 2.3.4 lately. This might have happened after I installed the alpha for python 2.4 but I'm not sure.. Anyway the problem I'm having is that when I try to run these programs they never successfully run. Python run from the terminal seems ok and I can import to my heart's content. From Console.app:: first time trying to launch vimshell and package manager. Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] 'import site' failed; use -v for traceback 'import site' failed; use -v for traceback subsequent launches return this error in the console.: Aug 13 13:39:19 localhost WindowServer[614]: ERROR! execle(/Applications/MacPython-2.3/PythonIDE.app/Contents/MacOS/ PythonIDE) returned, err=22 Would anyone have any ideas on how to fix this? Thanks for any assistance. ~Israel~ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1219 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040813/287cfdb1/attachment.bin From calvin at xmission.com Sat Aug 14 07:41:05 2004 From: calvin at xmission.com (Calvin) Date: Sat Aug 14 07:41:10 2004 Subject: [Pythonmac-SIG] building mysqldb on mac os x server In-Reply-To: <411CB163.7080703@imt.net> from "Dustin Lee" at Aug 13, 2004 06:17:39 AM Message-ID: Here are the instructions I keep for myself for installing MySQLdb: ***** Install MySQLdb mysql - python: http://sourceforge.net/projects/mysql-python/ http://sourceforge.net/project/showfiles.php?group_id=22307&release_id=182854 thanks to Andy Dustman. Used 0.9.3b1 The include and library directories should be where your mysql include and lib directories are located. Also, make the version your version. identify your version by typing on a command line: $ mysqladmin version modify the following lines in setup.py mysqlversion = tuple(map(int, string.split(os.getenv('mysqlversion', '4.0.13'), '.'))) modify setup.py: include_dirs = [ '/usr/local/mysql/include' ] library_dirs = [ '/usr/local/mysql/lib' ] Rem the following lines if crypt is not installed. #if mysqlversion > (4,0,0): # libraries.append("crypt") also: elif sys.platform == "darwin": # Mac OS X include_dirs.append('/usr/local/mysql/include') library_dirs.append('/usr/local/mysql/lib') here are the basic instructions: $ tar xfz MySQL-python-0.9.2.tar.gz $ cd MySQL-python-0.9.2 --modify setup.py as above-- $ python setup.py build $ su $ python setup.py install ***** > > Thanks for the response. > > I think I've tried that but I'll look again. MySQL came preinstalled > with the server edition of mac os x but, sadly, MySQLdb didn't. Has any > one successfully installed MySQLdb with a MySQL installation that wasn't > installed by fink? > > dustin > > Chris Miles wrote: > > > Hi, > > > > /sw/ is managed by fink, so it looks like mysqldb simply assumes that > > on Darwin(OS X) MySQL has only been installed by fink. > > > > If you have installed it into a different location (or don't use > > fink), you can try modifying setup.py with the location of your > > MySQL's include and lib paths. > > > > I don't use MySQL on OS X, but this is what the problem appears to be > > from the info you've sent. Hope that helps. > > > > Cheers, > > Chris > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From loredo at astro.cornell.edu Sat Aug 14 07:48:34 2004 From: loredo at astro.cornell.edu (Tom Loredo) Date: Sat Aug 14 07:48:36 2004 Subject: [Pythonmac-SIG] Which Python for Panther? Message-ID: <200408140548.i7E5mYS07787@laplace.astro.cornell.edu> Hi again folks- Okay, I bit the bullet and am upgrading to Panther as I type. Now the question is, what Python should I use? Should I just use the supplied 2.3, with the Panther add-ons? Or can I build 2.3.4 (framework) from source? The MacPy on OS X page notes an extension conflict using MacPy 2.3.3, but states "We hope to solve this for 2.3.4." Was it solved? If I do build 2.3.4, can I use the Panther add-ons as provided? Are they even necessary if I build from source? Thanks, Tom From mww at opendarwin.org Sat Aug 14 09:34:55 2004 From: mww at opendarwin.org (Markus W.Weissmann) Date: Sat Aug 14 09:35:04 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: <200408140548.i7E5mYS07787@laplace.astro.cornell.edu> References: <200408140548.i7E5mYS07787@laplace.astro.cornell.edu> Message-ID: <6FA7779F-EDC4-11D8-8E12-000D93AE2252@opendarwin.org> Hi Tom, On Aug 14, 2004, at 07:48, Tom Loredo wrote: > > Hi again folks- > > Okay, I bit the bullet and am upgrading to Panther as I type. Now the > question is, what Python should I use? Should I just use the supplied > 2.3, with the Panther add-ons? Or can I build 2.3.4 (framework) from > source? The MacPy on OS X page notes an extension conflict using MacPy > 2.3.3, but states "We hope to solve this for 2.3.4." Was it solved? > > If I do build 2.3.4, can I use the Panther add-ons as provided? Are > they even necessary if I build from source? If you don't need the framework install, but want Python 2.3.4 and modules for it, I'd suggest using darwinports [1] (large modules collection) or perhaps fink [2]. cheers, Markus [1] http://darwinports.opendarwin.org [2] http://fink.sourceforge.net/ --- Markus W. Weissmann http://www.mweissmann.de/ http://www.opendarwin.org/~mww/ -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040814/832a795c/PGP-0001.pgp From suthercd at mac.com Sat Aug 14 14:51:42 2004 From: suthercd at mac.com (Craig Sutherland) Date: Sat Aug 14 14:51:47 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: <200408140548.i7E5mYS07787@laplace.astro.cornell.edu> References: <200408140548.i7E5mYS07787@laplace.astro.cornell.edu> Message-ID: On Aug 14, 2004, at 12:48 AM, Tom Loredo wrote: > > Hi again folks- > > Okay, I bit the bullet and am upgrading to Panther as I type. Now the > question is, what Python should I use? Should I just use the supplied > 2.3, with the Panther add-ons? Or can I build 2.3.4 (framework) from > source? The MacPy on OS X page notes an extension conflict using MacPy > 2.3.3, but states "We hope to solve this for 2.3.4." Was it solved? > > If I do build 2.3.4, can I use the Panther add-ons as provided? Are > they even necessary if I build from source? > > Thanks, > Tom >snip< Tom, With the latest XCode release and Developer Tools, Python 2.3.4 (#1 Jun 2, 2004) is the framework install provided as default. HTH. Craig Sutherland From kevino at tulane.edu Sun Aug 15 04:24:06 2004 From: kevino at tulane.edu (Kevin Ollivier) Date: Sun Aug 15 04:24:27 2004 Subject: [Pythonmac-SIG] Fwd: ANN: wxPython 2.5.2.7 Message-ID: <2EE81EA2-EE62-11D8-9295-000393CB1C86@tulane.edu> Hi all, For those of you not monitoring the main python list, I'm forwarding Robin's announcement that wxPython 2.5.2 final (aka 2.5.2 build 7) has been released and is available for download at http://www.wxpython.org. Kevin Begin forwarded message: > From: Robin Dunn > Date: August 14, 2004 1:30:19 AM PDT > To: wxPython-users , > wx-users@lists.wxwidgets.org, "Python-List@Python.Org," > , "Python-Announce-List@Python.Org," > > Subject: ANN: wxPython 2.5.2.7 > Reply-To: wx-users@lists.wxwidgets.org > > Announcing > ---------- > > I'm pleased to announce the 2.5.2.7 release of wxPython, now available > for download at http://wxpython.org/download.php or > https://sourceforge.net/project/showfiles.php? > group_id=10718&package_id=10559&release_id=260444 > > > What is wxPython? > ----------------- > > wxPython is a GUI toolkit for the Python programming language. It > allows Python programmers to create programs with a robust, highly > functional graphical user interface, simply and easily. It is > implemented as a Python extension module that wraps the popular > wxWidgets cross platform GUI library, which is written in C++. > > wxPython is a cross-platform toolkit. This means that the same program > will usually run on multiple platforms without modifications. > Currently supported platforms are 32-bit Microsoft Windows, most Linux > or other Unix-like systems using GTK or GTK2, and Apple Macintosh OS > X. > > > Changes in 2.5.2.7 > ------------------ > > The changes in this version are too numerous to list here, please see > the following web sites for more details. If you are upgrading from a > previous version then please do read the MigrationGuide fully before > getting started as there are some backwards incompatible changes. > > http://wxpython.org/recentchanges.php > http://wxpython.org/migrationguide.php > > > New Docs > -------- > > Also available with this release is a sneak peak at the work in > progress for the new Python-specific reference documentation. While > much of the content is not yet present, the docs are still usable, and > in fact helpful since they already accurately document what classes > and methods are present in wxPython and what the parameter names > are. You can download a tarball containing the new docs by following > the wxPythonNewDocs link on the download page, and it can also be > accessed online at http://wxPython.org/docs/api/. > > > -- > Robin Dunn > Software Craftsman > http://wxPython.org Java give you jitters? Relax with wxPython! > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org > For additional commands, e-mail: wx-users-help@lists.wxwidgets.org > From rodneys at io.com Sun Aug 15 18:46:23 2004 From: rodneys at io.com (Rodney Somerstein) Date: Sun Aug 15 18:46:27 2004 Subject: [Pythonmac-SIG] Is Python right for what I want to do? Message-ID: First of all, let me state that I have been watching Python on and off over the last several years and until just recently, it hasn't seemed quite the tool that I wanted to use, even though the language itself seems great. Now, it seems the time may have finally come for me to leap in and start using Python. These questions are not necessarily Mac specific, though in the past there seemed to be more related limitations on the Mac. I have a project that I want to work on which will eventually be open source. I think that Python and wxPython will allow me to do everything that I need capability-wise. Where my questions come in is really more related to packaging and delivery. In the past, I have avoided Python, especially on the Mac, as the installation requirements for an end-user application have seemed overly complex. It seems that I might now be able to produce a double-clickable application with a simple installer that could be used cross-platform. Is this actually easy to do? Does the user have to install Python separately, or is it part of an application created with bundlebuilder? (I know it is pre-installed on Mac OSX, but this is an issue for other platforms). Can bundlebuilder include other needed libraries, such as wxPython in an application? Next comes the question of support for new versions of Python. I note that at the moment, Mac OSX is stuck with version 2.3 of Python without extraordinary efforts (from an end-user standpoint) to install updates. When 2.4 comes out, would I be able to use this in an application and have end-users install such an update as part of an application install? Or will they have to manually install the MacPython update? Obviously I want to avoid this last as eventually when Apple upgrades to 2.4.x I don't want my application to cause problems for users. What are the current plans for Python 2.4 support on the Mac? Will it make it into Tiger? Has an update mechanism been found that will eliminate conflicts with Apple's built-in Python if not? (I found mention of such an effort in the archives, but no details) Is there anything else I would want to be aware of? These kinds of things are really the only thing that has kept me from using Python. I am a hobbyist and want my efforts to be easily available to other users. I want to produce applications with a nice user interface, not command-line tools. I don't want users to have to do complex installs to get the things I write running. So, back to the title of my message, is Python right for what I want to do? Or is it still not quite there? Thanks, -Rodney -- ------------------------------------------------------------------- Rodney Somerstein rodneys@io.com From bob at redivi.com Sun Aug 15 20:02:02 2004 From: bob at redivi.com (Bob Ippolito) Date: Sun Aug 15 20:02:07 2004 Subject: [Pythonmac-SIG] Is Python right for what I want to do? In-Reply-To: References: Message-ID: <35C7DE0A-EEE5-11D8-B58B-000A95686CD8@redivi.com> On Aug 15, 2004, at 12:46 PM, Rodney Somerstein wrote: > I have a project that I want to work on which will eventually be open > source. I think that Python and wxPython will allow me to do > everything that I need capability-wise. Where my questions come in is > really more related to packaging and delivery. In the past, I have > avoided Python, especially on the Mac, as the installation > requirements for an end-user application have seemed overly complex. > It seems that I might now be able to produce a double-clickable > application with a simple installer that could be used cross-platform. On OS X, you can put Python and all other dependencies inside the application bundle itself, with no installer required. On Windows, it's easy to make a simple installer. On Linux you pretty much just have to hope the user is smart enough to figure out the dependencies (unless you do per-distro packaging). > Is this actually easy to do? Does the user have to install Python > separately, or is it part of an application created with > bundlebuilder? (I know it is pre-installed on Mac OSX, but this is an > issue for other platforms). Can bundlebuilder include other needed > libraries, such as wxPython in an application? You can either use the existing installation of Python (with 10.3+) or bundle a version of Python inside your application with bundlebuilder (or some similar tool). bundlebuilder isn't very good right now, so you will need help with that, but there is a tutorial on the wiki and quite a few people on this list that can answer questions. > Next comes the question of support for new versions of Python. I note > that at the moment, Mac OSX is stuck with version 2.3 of Python > without extraordinary efforts (from an end-user standpoint) to install > updates. When 2.4 comes out, would I be able to use this in an > application and have end-users install such an update as part of an > application install? Or will they have to manually install the > MacPython update? Obviously I want to avoid this last as eventually > when Apple upgrades to 2.4.x I don't want my application to cause > problems for users. What are the current plans for Python 2.4 support > on the Mac? Will it make it into Tiger? Has an update mechanism been > found that will eliminate conflicts with Apple's built-in Python if > not? (I found mention of such an effort in the archives, but no > details) According to public information (Apple has released the code), the build of Tiger as of WWDC uses Python 2.3.3. There is, of course, plenty of time for this to change.. but you can assume at least 2.3.3. Since it is the same major version of Python, anything compiled against the Python 2.3.0 on Mac OS X 10.3 should just work with 10.4's (and vice versa, to a large extent). Mac OS X 10.3 will always have conflicts with other versions of Python due to a couple problems with Python 2.3.0. All of the problems have been identified and fixed in later versions of Python. It's possible to "monkeypatch" Python 2.3.0 and give it correct behavior, but that requires changing privileged files and it not recommended. In almost all cases, Python 2.3.0 is good enough and doesn't need to be upgraded. One thing that is currently very difficult is to support Mac OS X 10.2. You will need access to a machine running Mac OS X 10.2 in order to build compatible software. It's *possible* to do it without access to such a machine, but it's VERY difficult and I doubt that you'll get anyone to walk you through it. I build a "template bundle" for my applications from a machine running Mac OS X 10.2. This contains extension modules, parts of the standard library that I use, Python itself, a bootstrap executable, and then I just swap out the (pure python) application code and resources from a machine running Mac OS X 10.3. Though my build process uses Xcode and the PyObjC application template, I did most of the prep work by hand (no bundlebuilder, etc.). > Is there anything else I would want to be aware of? wxPython has had a history of bugs on Mac OS X. This situation is constantly improving, and it may be fine now, but I highly suggest you take a look at other wxPython applications that have Mac OS X builds and see if they work well enough for you. J?ger is the only one that does regular builds that I can think of. > These kinds of things are really the only thing that has kept me from > using Python. I am a hobbyist and want my efforts to be easily > available to other users. I want to produce applications with a nice > user interface, not command-line tools. I don't want users to have to > do complex installs to get the things I write running. The tools to build self-contained Python applications with nice user interfaces have been available for years. The tools for packaging still aren't very good though (but it's also possible to do "by hand", since bundles are just folders). They haven't really improved much since they were first written, but that will change at some point. Hopefully soon. > So, back to the title of my message, is Python right for what I want > to do? Or is it still not quite there? Python (but not wxPython) has been technically ready to do what you want to do on Mac OS X for several years. The packaging tools are not polished but they do work. Better packaging tools are partially developed and will be available eventually, but I can't make any promises as to when I'll have mine done (or if anyone else will come up with something before me). The "state of the art" packaging tool is bundlebuilder2 (currently living at http://svn.red-bean.com/bob/macholib/trunk/ - I don't think it's in working condition right now) , which is a marginal improvement over the original bundlebuilder. Basically does the correct thing with dylibs and frameworks, which makes packaging more automatic (it knows what non-standard libraries your python extensions linked to) and it makes the bundles themselves compatible with more machines (it's possible to have conflicts if the 'correct thing' wasn't done). There is also the Python Cocoa-Application Xcode template as part of PyObjC which is the "state of the art" Python bootstrap application. Even if these two things were combined as-is, it still wouldn't be a very good tool, so I'm toying with some other designs for packaging software. One of my current ideas, and probably the one I will finish first, is to just rip py2exe apart and develop "py2app", which would have a very familiar API. -bob From kevino at tulane.edu Sun Aug 15 21:26:32 2004 From: kevino at tulane.edu (Kevin Ollivier) Date: Sun Aug 15 21:27:26 2004 Subject: [Pythonmac-SIG] Is Python right for what I want to do? In-Reply-To: <35C7DE0A-EEE5-11D8-B58B-000A95686CD8@redivi.com> References: <35C7DE0A-EEE5-11D8-B58B-000A95686CD8@redivi.com> Message-ID: <03FD0CC9-EEF1-11D8-9295-000393CB1C86@tulane.edu> Hi all, On Aug 15, 2004, at 11:02 AM, Bob Ippolito wrote: > On Aug 15, 2004, at 12:46 PM, Rodney Somerstein wrote: > >> I have a project that I want to work on which will eventually be open >> source. I think that Python and wxPython will allow me to do >> everything that I need capability-wise. Where my questions come in is >> really more related to packaging and delivery. In the past, I have >> avoided Python, especially on the Mac, as the installation >> requirements for an end-user application have seemed overly complex. >> It seems that I might now be able to produce a double-clickable >> application with a simple installer that could be used >> cross-platform. > > On OS X, you can put Python and all other dependencies inside the > application bundle itself, with no installer required. On Windows, > it's easy to make a simple installer. On Linux you pretty much just > have to hope the user is smart enough to figure out the dependencies > (unless you do per-distro packaging). Just to add, this really is the case when packaging anything on Linux, so this isn't really a specific minus against Python but rather an issue with the whole "mix and match" of components philosophy on Linux. It's the primary thing that keeps me from building Linux packages - I'd need to do them on a distro-by-distro basis, and have to learn several different packaging formats in the process. >> Is there anything else I would want to be aware of? > > wxPython has had a history of bugs on Mac OS X. This situation is > constantly improving, and it may be fine now, but I highly suggest you > take a look at other wxPython applications that have Mac OS X builds > and see if they work well enough for you. J?ger is the only one that > does regular builds that I can think of. For wxPython, you could also (aside from testing the latest demo of course, which I highly recommend =) sign up for the wxpython-mac@lists.wxwidgets.org and wxPython-dev@lists.wxwidgets.org lists and ask people about their experiences, what they think of wxPython on Mac, etc. > Python (but not wxPython) has been technically ready to do what you > want to do on Mac OS X for several years. The packaging tools are not > polished but they do work. Better packaging tools are partially > developed and will be available eventually, but I can't make any > promises as to when I'll have mine done (or if anyone else will come > up with something before me). > > The "state of the art" packaging tool is bundlebuilder2 (currently > living at http://svn.red-bean.com/bob/macholib/trunk/ - I don't think > it's in working condition right now) , which is a marginal improvement > over the original bundlebuilder. Basically does the correct thing > with dylibs and frameworks, which makes packaging more automatic (it > knows what non-standard libraries your python extensions linked to) > and it makes the bundles themselves compatible with more machines > (it's possible to have conflicts if the 'correct thing' wasn't done). BTW, bb2 works for me so long as I do semi-standalone (Panther only, of course) and also, for my app, I needed to disable ZIP_IMPORT, which has problems with extensions such as PyXML. In the next week or two I'll be making some wxPython .app bundles and will post them here when they're ready. Thanks, Kevin From jmillr at umich.edu Sun Aug 15 21:35:07 2004 From: jmillr at umich.edu (John Miller) Date: Sun Aug 15 21:35:18 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: <20040815100005.043671E4005@bag.python.org> References: <20040815100005.043671E4005@bag.python.org> Message-ID: <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> Craig Sutherland wrote: >> If I do build 2.3.4, can I use the Panther add-ons as provided? Are >> they even necessary if I build from source? >> >> Thanks, >> Tom > >snip< > > Tom, > > With the latest XCode release and Developer Tools, Python 2.3.4 (#1 > Jun 2, 2004) is the framework install provided as default. > > HTH. > Craig Sutherland I'm probably misunderstanding here, but I've installed the latest XCode and Developer Tools, but in terminal I get the following: moire:~ jmillr$ python Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> I don't think python 2.3.4 is installed, it's still 2.3.0. John Miller -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 849 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040815/a6cbd69a/attachment.bin From Jack.Jansen at cwi.nl Mon Aug 16 00:15:08 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Aug 16 00:15:14 2004 Subject: [Pythonmac-SIG] Quicktime, versions, 3GPP In-Reply-To: <066D3978-DF44-11D8-A035-000A956D5598@possibleworlds.com> References: <61DD329C-63B0-11D8-A030-00039345C610@darwin.in-berlin.de> <066D3978-DF44-11D8-A035-000A956D5598@possibleworlds.com> Message-ID: <912ADDBA-EF08-11D8-9AF1-000D934FF6B4@cwi.nl> On 26 Jul 2004, at 22:40, michael ferraro wrote: > hello -- > > i was about to start a project that employed Quicktime to output, in > real-time > the contents of my OpenGL window. I am doing this in order to use a > Quicktime > based SDI output card (The Blackmagic Decklink) to convert to video > without > using a scan converter (The scan converter approach digitizes the > monitor > output and does not let me output a simultaneous alpha channel. > > I checked out python from CVS and used my python2.3 to run setup.py in > Mac/Modules/qt to > build the new stuff. The compile seemed to go ok by the install > generated a number of > messages > [...] > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/site-packages/QuickTime/QuickTime.py:3122: FutureWarning: > hex/oct constants > sys.maxint will return positive values in Python > 2.4 and up > notImplementedMusicErr = (0x80000000 | (0xFFFF & > (notImplementedMusicOSErr))) [and lots more like this]. I think these are not a problem, just ignore them, they'll go away with 2.4. You can quench them with the warning package (warnings.filterwarnings() is the call you want to use), but because the warnings are issued by the parser you have to call warnings.filterwarnings in the module importing QuickTime.QuickTime, I can't do it in the module itself. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Mon Aug 16 00:18:54 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Aug 16 00:18:55 2004 Subject: [Pythonmac-SIG] ValueError: Empty module name In-Reply-To: <4104D512.3070509@9online.fr> References: <4104D512.3070509@9online.fr> Message-ID: <18346154-EF09-11D8-9AF1-000D934FF6B4@cwi.nl> On 26 Jul 2004, at 11:55, Thor Zayan wrote: > I am running IDLE 1.0 with python 2.3 and Tk 8.4 on a Mac under Mac OS > X 10.3.4 french version and all was fun. > > On another hand I installed LyX 1.3.4 and also it was fun. > > But when added in my ~/.MacOSX/environment.plist a LANG property with > value fr_FR to run it in french I noticed that IDLE don't works any > more. I vaguely remember seeing that IDLE has some problems with locale support. Try asking on a more general mailing list (or an idle-specific list, if there is one). -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Mon Aug 16 00:29:41 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Aug 16 00:29:42 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? In-Reply-To: <2c9aa7fe0408050717209a24e1@mail.gmail.com> References: <2c9aa7fe0408050717209a24e1@mail.gmail.com> Message-ID: <999BFA64-EF0A-11D8-9AF1-000D934FF6B4@cwi.nl> On 5 Aug 2004, at 16:17, Jerome wrote: > I'm trying to figure out how to use SequenceGrabber component in > QuickTime beta 0.2 for python > it seems to have all the functions except i can't find out how to > create the component to start > in Carbon it's mySeqGrab = > OpenDefaultComponent(SeqGrabberComponentType, 0) or something like > that > then you can call stuff like SGInitialize(mySeqGrab) You should be able to get at the component manager through Carbon.Cm, so Carbon.Cm.OpenDefaultComponent() is the routine you want. But note that the component manager is (a) rather old code, (b) hardly ever used, at least by me, so (c) only very lightly tested. So: if it doesn't work then the fault is probably mine. Please report back here whether it works. And if you can come up with a sufficiently simple example that would be very much appreciated too! -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Mon Aug 16 00:44:59 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Aug 16 00:45:00 2004 Subject: [Pythonmac-SIG] Carbon GUI/MacPython In-Reply-To: <411C345B.9040201@wordtech-software.com> References: <411C345B.9040201@wordtech-software.com> Message-ID: On 13 Aug 2004, at 05:24, Kevin Walzer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I'm curious as to why the Carbon side of MacPython doesn't seem to be > updated, at least with regard to GUI programming. Earlier, when I > queried the list about the W widget set and some related questions, I > was advised that these were deprecated and would likely go away at some > point in the future. It was also mentioned that MacPython (the > PythonIDE > and PackageManager) are dependent on the Waste module, which also seems > obsolete. > > My question is, what's going to replace these things? The Carbon API > has > more modern text processing facilities than Waste (MLTE?), if I have > read the documentation correctly, and one can certainly also call the > complete set of Interface Builder widgets from Carbon. Or is PyObjC > going to become the "official" Mac-native API for Python at some point > in the future--the only way to write Python software that takes full > advantage of Mac API's? In addition to what Bob and Kevin O said let me add a couple of random thoughts. The reason for no work being done on Carbon is purely lack of time. I am keeping the lowlevel stuff up to date (anything in the Carbon package) but the modules above that (Framework and the W family) would take too much time. But if you want to tackle that: by all means, be my guest! Converting Framework to use Carbon Events (lowlevel APIs are available in Carbon.CarbonEvt) is probably a first step. Then replacing Waste with MLTE (also available) in W, but that may turn out to be more difficult because in some respects Waste is more powerful than MLTE. The final step is getting a modern look and feel, and that's in one way the most difficult step (W does a lot of work to try and make things look pretty and consistent, which worked fine under MacOS 7.5 but broke with MacOS 8) but in other ways it may be easy (after all you'll mainly be ripping out code). -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From nhinson at mail.utexas.edu Fri Aug 13 23:23:07 2004 From: nhinson at mail.utexas.edu (Nathen Hinson) Date: Mon Aug 16 00:47:46 2004 Subject: [Pythonmac-SIG] Issue with distutils on OS X ( 10.3) Message-ID: To All I am receiving an error with distutils while trying to build an extension module ( pyclips ). I get the following Traceback: Traceback (most recent call last): File "setup.py", line 1182, in ? include_dirs=[ClipsLIB_dir]), File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/distutils/core.py", line 149, in setup dist.run_commands() File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/distutils/dist.py", line 907, in run_commands self.run_command(cmd) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/distutils/dist.py", line 927, in run_command cmd_obj.run() File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/distutils/command/build.py", line 107, in run self.run_command(cmd_name) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/distutils/dist.py", line 927, in run_command cmd_obj.run() File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/distutils/command/build_ext.py", line 244, in run customize_compiler(self.compiler) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/distutils/sysconfig.py", line 172, in customize_compiler cc_cmd = cc + ' ' + opt TypeError: cannot concatenate 'str' and 'NoneType' objects I have taken a look at the sysconfig.py script where customize_compiler lives and also taken a look at get_config_vars which is trying to populate a tuple with environmental variables which OS X does not have by default. Running get_config_vars on this machine give me the following output: {'exec_prefix': '/System/Library/Frameworks/Python.framework/Versions/2.3', 'prefix': '/System/Library/Frameworks/Python.framework/Versions/2.3'} The get_config_vars() in customize_compiler is looking for variables that are not in the dictionary I get when using this function on OS X. Does anyone on this list have any ideas or places I might look for answers ? Thanks very much in advance Sincerely Nathen Hinson Systems Analyst On - Site Support User Services Information Technology Services University of Texas at Austin From bob at redivi.com Mon Aug 16 00:54:32 2004 From: bob at redivi.com (Bob Ippolito) Date: Mon Aug 16 00:54:33 2004 Subject: [Pythonmac-SIG] Issue with distutils on OS X ( 10.3) In-Reply-To: References: Message-ID: <124275A6-EF0E-11D8-90EB-000A95686CD8@redivi.com> On Aug 13, 2004, at 5:23 PM, Nathen Hinson wrote: > To All > > I am receiving an error with distutils while trying to build an > extension module ( pyclips ). I get the following Traceback: > > Traceback (most recent call last): > File "setup.py", line 1182, in ? > include_dirs=[ClipsLIB_dir]), > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/distutils/core.py", line 149, in setup > dist.run_commands() > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/distutils/dist.py", line 907, in run_commands > self.run_command(cmd) > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/distutils/dist.py", line 927, in run_command > cmd_obj.run() > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/distutils/command/build.py", line 107, in run > self.run_command(cmd_name) > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/distutils/cmd.py", line 333, in run_command > self.distribution.run_command(command) > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/distutils/dist.py", line 927, in run_command > cmd_obj.run() > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/distutils/command/build_ext.py", line 244, in run > customize_compiler(self.compiler) > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/distutils/sysconfig.py", line 172, in customize_compiler > cc_cmd = cc + ' ' + opt > TypeError: cannot concatenate 'str' and 'NoneType' objects > > I have taken a look at the sysconfig.py script where > customize_compiler lives and also taken a look at get_config_vars > which is trying to populate a tuple with environmental variables which > OS X does not have by default. Running get_config_vars on this machine > give me the following output: > {'exec_prefix': > '/System/Library/Frameworks/Python.framework/Versions/2.3', 'prefix': > '/System/Library/Frameworks/Python.framework/Versions/2.3'} > > The get_config_vars() in customize_compiler is looking for variables > that are not in the dictionary I get when using this function on OS X. > > Does anyone on this list have any ideas or places I might look for > answers ? Do you have Xcode installed? I've never seen this error message before. -bob From Chris.Barker at noaa.gov Mon Aug 16 19:04:24 2004 From: Chris.Barker at noaa.gov (Chris Barker) Date: Mon Aug 16 19:44:56 2004 Subject: [Pythonmac-SIG] Is Python right for what I want to do? In-Reply-To: <03FD0CC9-EEF1-11D8-9295-000393CB1C86@tulane.edu> References: <35C7DE0A-EEE5-11D8-B58B-000A95686CD8@redivi.com> <03FD0CC9-EEF1-11D8-9295-000393CB1C86@tulane.edu> Message-ID: <4120E918.1050807@noaa.gov> Kevin Ollivier wrote: > On Aug 15, 2004, at 11:02 AM, Bob Ippolito wrote: >> On Aug 15, 2004, at 12:46 PM, Rodney Somerstein wrote: >>> It seems that I might now be able to produce a double-clickable >>> application with a simple installer that could be used cross-platform. Th double-clickable application and installer will be platform specific, i.e. one for each platform. However, building them all can be automated. someone on this list posted a link to their project that uses a script to build packages for Windows, Linux and Mac, all with different tools,. but all automated. I can't find the note right now, but with some digging you should be able to. You also might want to look at: http://wiki.wxpython.org/index.cgi/CreatingStandaloneExecutables It could use some updating, but it's a start. >> On Linux you pretty much just >> have to hope the user is smart enough to figure out the dependencies >> (unless you do per-distro packaging). > > Just to add, this really is the case when packaging anything on Linux, > so this isn't really a specific minus against Python but rather an issue > with the whole "mix and match" of components philosophy on Linux. It's > the primary thing that keeps me from building Linux packages - I'd need > to do them on a distro-by-distro basis, and have to learn several > different packaging formats in the process. That's not entirely true. You can include as many libraries as you want with your package, and the more you do, the fewer the dependencies will be. However, most Linux users are pretty sophisticated, so giving a list of dependencies and links to where you can get them is usually good enough. I found setting up bundlebuilder to build a wxPython app to be a pain, but it really only took me a dew hours, and once you've done it once, it's done until you upgrade wxPython, so while annoying, it's really not that big a deal. Which is probably why no one has built a better bundlebuilder yet. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From l at lrowe.co.uk Mon Aug 16 19:37:09 2004 From: l at lrowe.co.uk (Laurence Rowe) Date: Mon Aug 16 19:50:29 2004 Subject: [Pythonmac-SIG] Package Manager and OS X 10.3.5 Message-ID: Just a note to let you know that Package Manager complains that the file python.org/packman/version-0.3/darwin-7.5.0-Power_Macintosh.plist is not found on startup. On an unrelated note, what's the best way to install Zope for development (needs python 2.3.4), is darwinports the way to go? Thanks, Laurence P.S if anyone wants a keylayout file to make their british powerbook keyboards have # and a few other keys in more useful places, drop me an email. From bob at redivi.com Mon Aug 16 22:55:41 2004 From: bob at redivi.com (Bob Ippolito) Date: Mon Aug 16 22:56:18 2004 Subject: [Pythonmac-SIG] Issue with distutils on OS X ( 10.3) In-Reply-To: <713157E5-EFC5-11D8-95EC-000A9597E416@mail.utexas.edu> References: <124275A6-EF0E-11D8-90EB-000A95686CD8@redivi.com> <713157E5-EFC5-11D8-95EC-000A9597E416@mail.utexas.edu> Message-ID: On Aug 16, 2004, at 4:47 PM, Nathen Hinson wrote: > On Aug 15, 2004, at 5:54 PM, Bob Ippolito wrote: > >> On Aug 13, 2004, at 5:23 PM, Nathen Hinson wrote: >> >>> I am receiving an error with distutils while trying to build an >>> extension module ( pyclips ). I get the following Traceback: >>> -- >>> TypeError: cannot concatenate 'str' and 'NoneType' objects >>> >>> I have taken a look at the sysconfig.py script where >>> customize_compiler lives and also taken a look at get_config_vars >>> which is trying to populate a tuple with environmental variables >>> which OS X does not have by default. Running get_config_vars on this >>> machine give me the following output: >>> {'exec_prefix': >>> '/System/Library/Frameworks/Python.framework/Versions/2.3', >>> 'prefix': >>> '/System/Library/Frameworks/Python.framework/Versions/2.3'} >>> >>> The get_config_vars() in customize_compiler is looking for variables >>> that are not in the dictionary I get when using this function on OS >>> X. >>> >>> Does anyone on this list have any ideas or places I might look for >>> answers ? >> >> Do you have Xcode installed? I've never seen this error message >> before. >> > I do have Xcode installed, however I did install it on top of the > 10.2.x developer tools, I did not remove the old developer tools > before installing Xcode. I still have the old project builder > application hanging around. My gcc version is 3.3 as it should be and > the cc is linked back to it appropriately. Do you think that still > having the old developer tools around might make a difference ? Does this happen with other Python projects? Perhaps pyclips is at fault. I've never even heard of it. -bob From jeremy.knope at gmail.com Mon Aug 16 23:50:15 2004 From: jeremy.knope at gmail.com (Jerome) Date: Mon Aug 16 23:50:17 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? In-Reply-To: <999BFA64-EF0A-11D8-9AF1-000D934FF6B4@cwi.nl> References: <2c9aa7fe0408050717209a24e1@mail.gmail.com> <999BFA64-EF0A-11D8-9AF1-000D934FF6B4@cwi.nl> Message-ID: <2c9aa7fe0408161450170e3a79@mail.gmail.com> thanks, that's a start, problem is the Carbon.Cm.OpenDefaultComponent() won't allow a 0 for 2nd argument to allow any subtype, so i dont know how to try my example otherwise, putting other subtypes just get null componentInstances --jerome On Mon, 16 Aug 2004 00:29:41 +0200, Jack Jansen wrote: > > On 5 Aug 2004, at 16:17, Jerome wrote: > > > I'm trying to figure out how to use SequenceGrabber component in > > QuickTime beta 0.2 for python > > it seems to have all the functions except i can't find out how to > > create the component to start > > in Carbon it's mySeqGrab = > > OpenDefaultComponent(SeqGrabberComponentType, 0) or something like > > that > > then you can call stuff like SGInitialize(mySeqGrab) > > You should be able to get at the component manager through Carbon.Cm, > so Carbon.Cm.OpenDefaultComponent() is the routine you want. > > But note that the component manager is (a) rather old code, (b) hardly > ever used, at least by me, so (c) only very lightly tested. So: if it > doesn't work then the fault is probably mine. > > Please report back here whether it works. And if you can come up with a > sufficiently simple example that would be very much appreciated too! > -- > Jack Jansen, , http://www.cwi.nl/~jack > If I can't dance I don't want to be part of your revolution -- Emma > Goldman > > From Jack.Jansen at cwi.nl Tue Aug 17 00:07:01 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Aug 17 00:06:59 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? In-Reply-To: <2c9aa7fe0408161450170e3a79@mail.gmail.com> References: <2c9aa7fe0408050717209a24e1@mail.gmail.com> <999BFA64-EF0A-11D8-9AF1-000D934FF6B4@cwi.nl> <2c9aa7fe0408161450170e3a79@mail.gmail.com> Message-ID: <997DDCA8-EFD0-11D8-A565-000D934FF6B4@cwi.nl> On 16 Aug 2004, at 23:50, Jerome wrote: > thanks, that's a start, problem is the > Carbon.Cm.OpenDefaultComponent() won't allow a 0 for 2nd argument to > allow any subtype, so i dont know how to try my example otherwise, > putting other subtypes just get null componentInstances You should pass '\0\0\0\0': OSType values (the ubiquitous 4-char single quoted strings in C) must be strings on the Python side. I keep going back and forward on this design: sometimes I want to allow integers too, sometimes I think it's too error-prone and want to keep things the way the are, sometimes I want to do something in-between (such as allow only 4-char Python strings or the specific integer values 0 and maybe -1). Anyone have any opinions on this? -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From bob at redivi.com Tue Aug 17 00:11:23 2004 From: bob at redivi.com (Bob Ippolito) Date: Tue Aug 17 00:11:57 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? In-Reply-To: <2c9aa7fe0408161450170e3a79@mail.gmail.com> References: <2c9aa7fe0408050717209a24e1@mail.gmail.com> <999BFA64-EF0A-11D8-9AF1-000D934FF6B4@cwi.nl> <2c9aa7fe0408161450170e3a79@mail.gmail.com> Message-ID: <358573F2-EFD1-11D8-AA0D-000A95686CD8@redivi.com> On Aug 16, 2004, at 5:50 PM, Jerome wrote: > On Mon, 16 Aug 2004 00:29:41 +0200, Jack Jansen > wrote: >> >> On 5 Aug 2004, at 16:17, Jerome wrote: >> >>> I'm trying to figure out how to use SequenceGrabber component in >>> QuickTime beta 0.2 for python >>> it seems to have all the functions except i can't find out how to >>> create the component to start >>> in Carbon it's mySeqGrab = >>> OpenDefaultComponent(SeqGrabberComponentType, 0) or something like >>> that >>> then you can call stuff like SGInitialize(mySeqGrab) >> >> You should be able to get at the component manager through Carbon.Cm, >> so Carbon.Cm.OpenDefaultComponent() is the routine you want. >> >> But note that the component manager is (a) rather old code, (b) hardly >> ever used, at least by me, so (c) only very lightly tested. So: if it >> doesn't work then the fault is probably mine. >> >> Please report back here whether it works. And if you can come up with >> a >> sufficiently simple example that would be very much appreciated too! > thanks, that's a start, problem is the > Carbon.Cm.OpenDefaultComponent() won't allow a 0 for 2nd argument to > allow any subtype, so i dont know how to try my example otherwise, > putting other subtypes just get null componentInstances It's an OSType, so use '\x00\x00\x00\x00' (there might be an alias for that somewhere.. but I never remember it). -bob From bob at redivi.com Tue Aug 17 00:36:23 2004 From: bob at redivi.com (Bob Ippolito) Date: Tue Aug 17 00:37:01 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? In-Reply-To: <997DDCA8-EFD0-11D8-A565-000D934FF6B4@cwi.nl> References: <2c9aa7fe0408050717209a24e1@mail.gmail.com> <999BFA64-EF0A-11D8-9AF1-000D934FF6B4@cwi.nl> <2c9aa7fe0408161450170e3a79@mail.gmail.com> <997DDCA8-EFD0-11D8-A565-000D934FF6B4@cwi.nl> Message-ID: On Aug 16, 2004, at 6:07 PM, Jack Jansen wrote: > > On 16 Aug 2004, at 23:50, Jerome wrote: > >> thanks, that's a start, problem is the >> Carbon.Cm.OpenDefaultComponent() won't allow a 0 for 2nd argument to >> allow any subtype, so i dont know how to try my example otherwise, >> putting other subtypes just get null componentInstances > > You should pass '\0\0\0\0': OSType values (the ubiquitous 4-char > single quoted strings in C) must be strings on the Python side. > > I keep going back and forward on this design: sometimes I want to > allow integers too, sometimes I think it's too error-prone and want to > keep things the way the are, sometimes I want to do something > in-between (such as allow only 4-char Python strings or the specific > integer values 0 and maybe -1). > > Anyone have any opinions on this? I would think that None -> '\x00\x00\x00\x00' would make sense for this particular behavior semantically. Integers might be practically necessary in the future if you move to OS X style headers. They use integers and four-char-code OSTypes interchangeably; integers are used when it won't fit in ascii, as there are a few out there that were intended for macroman encoding. -bob From michael at possibleworlds.com Tue Aug 17 00:41:53 2004 From: michael at possibleworlds.com (michael ferraro) Date: Tue Aug 17 00:42:01 2004 Subject: [Pythonmac-SIG] an odd problem with BundleBuilder Message-ID: <783BC890-EFD5-11D8-8A4C-000A956D5598@possibleworlds.com> I am posting this in the SIG-imaging list as well. I thought someone here might have run into this also An app that I bundle using bundlebuilder that tries to open a jpg file using Image.open() returns: " IOError: cannot identify image file " the same script outside the bundle has no such problem. It also make no difference if the image file is contained within the bundle or not. I'm running OS X 10.3.4 with standard python and PIL 1.1.4 M From bob at redivi.com Tue Aug 17 00:51:28 2004 From: bob at redivi.com (Bob Ippolito) Date: Tue Aug 17 00:52:05 2004 Subject: [Pythonmac-SIG] an odd problem with BundleBuilder In-Reply-To: <783BC890-EFD5-11D8-8A4C-000A956D5598@possibleworlds.com> References: <783BC890-EFD5-11D8-8A4C-000A956D5598@possibleworlds.com> Message-ID: On Aug 16, 2004, at 6:41 PM, michael ferraro wrote: > I am posting this in the SIG-imaging list as well. I thought > someone here might have run into this also > > An app that I bundle using bundlebuilder that tries to open > a jpg file using Image.open() returns: > " IOError: cannot identify image file " > the same script outside the bundle has no such problem. > It also make no difference if the image file is contained > within the bundle or not. > > I'm running OS X 10.3.4 with standard python and PIL 1.1.4 PIL uses a funky way to load image format plugins as late as possible, so modulefinder can't reliably detect which image plugins you may or may not need. py2exe has the same problem with PIL. Basically you need to include the whole PIL package, or you need to explicitly import any image plugins you think you may need. I forget the bb commandline or 'buildapp.py' syntax to do it, so either someone else will have to chime in or you'll have to look it up. -bob From rodneys at io.com Tue Aug 17 06:09:56 2004 From: rodneys at io.com (Rodney Somerstein) Date: Tue Aug 17 06:10:03 2004 Subject: [Pythonmac-SIG] Is Python right for what I want to do? In-Reply-To: <35C7DE0A-EEE5-11D8-B58B-000A95686CD8@redivi.com> References: <35C7DE0A-EEE5-11D8-B58B-000A95686CD8@redivi.com> Message-ID: Thanks to everyone who responded to my questions. I picked up the O'Reilly Learning Python book today and I'm going to give it a try. Even if it doesn't turn out to be the language I want to use for this project, I will still benefit from learning Python anyway. If the current packaging tools aren't the greatest, I figure they will only get better over time. I'll take a closer look at wxPython and pyGame as well. Either or both of those might be the toolkit that I'm looking for when it comes to UI and graphics handling. Thanks again, -Rodney -- ------------------------------------------------------------------- Rodney Somerstein rodneys@io.com From ronaldoussoren at mac.com Tue Aug 17 08:00:00 2004 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue Aug 17 08:08:00 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? In-Reply-To: <997DDCA8-EFD0-11D8-A565-000D934FF6B4@cwi.nl> References: <2c9aa7fe0408050717209a24e1@mail.gmail.com> <999BFA64-EF0A-11D8-9AF1-000D934FF6B4@cwi.nl> <2c9aa7fe0408161450170e3a79@mail.gmail.com> <997DDCA8-EFD0-11D8-A565-000D934FF6B4@cwi.nl> Message-ID: On 17-aug-04, at 0:07, Jack Jansen wrote: > > On 16 Aug 2004, at 23:50, Jerome wrote: > >> thanks, that's a start, problem is the >> Carbon.Cm.OpenDefaultComponent() won't allow a 0 for 2nd argument to >> allow any subtype, so i dont know how to try my example otherwise, >> putting other subtypes just get null componentInstances > > You should pass '\0\0\0\0': OSType values (the ubiquitous 4-char > single quoted strings in C) must be strings on the Python side. > > I keep going back and forward on this design: sometimes I want to > allow integers too, sometimes I think it's too error-prone and want to > keep things the way the are, sometimes I want to do something > in-between (such as allow only 4-char Python strings or the specific > integer values 0 and maybe -1). Some newer API's return OSType values as part of a dictionary, such as the Cocoa file management API's. PyObjC converts those in integers, because it doesn't know better. > > Anyone have any opinions on this? Maybe a subclass of 'int' that accepts 4-character-codes? I have one python one lying around that also has a custom __repr__ and __str__. Or accept either, that would be backward compatible. Ronald From bob at redivi.com Tue Aug 17 08:20:25 2004 From: bob at redivi.com (Bob Ippolito) Date: Tue Aug 17 08:21:06 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? In-Reply-To: References: <2c9aa7fe0408050717209a24e1@mail.gmail.com> <999BFA64-EF0A-11D8-9AF1-000D934FF6B4@cwi.nl> <2c9aa7fe0408161450170e3a79@mail.gmail.com> <997DDCA8-EFD0-11D8-A565-000D934FF6B4@cwi.nl> Message-ID: <86D6D36A-F015-11D8-9F65-000A95686CD8@redivi.com> On Aug 17, 2004, at 2:00 AM, Ronald Oussoren wrote: > > On 17-aug-04, at 0:07, Jack Jansen wrote: > >> >> On 16 Aug 2004, at 23:50, Jerome wrote: >> >>> thanks, that's a start, problem is the >>> Carbon.Cm.OpenDefaultComponent() won't allow a 0 for 2nd argument to >>> allow any subtype, so i dont know how to try my example otherwise, >>> putting other subtypes just get null componentInstances >> >> You should pass '\0\0\0\0': OSType values (the ubiquitous 4-char >> single quoted strings in C) must be strings on the Python side. >> >> I keep going back and forward on this design: sometimes I want to >> allow integers too, sometimes I think it's too error-prone and want >> to keep things the way the are, sometimes I want to do something >> in-between (such as allow only 4-char Python strings or the specific >> integer values 0 and maybe -1). > > Some newer API's return OSType values as part of a dictionary, such as > the Cocoa file management API's. PyObjC converts those in integers, > because it doesn't know better. I forgot about that one. >> Anyone have any opinions on this? > > Maybe a subclass of 'int' that accepts 4-character-codes? I have one > python one lying around that also has a custom __repr__ and __str__. > > Or accept either, that would be backward compatible. Me too, except mine is a subclass of str that accepts integers :) -bob From suthercd at mac.com Tue Aug 17 22:49:23 2004 From: suthercd at mac.com (Craig Sutherland) Date: Tue Aug 17 22:49:32 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> References: <20040815100005.043671E4005@bag.python.org> <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> Message-ID: On Aug 15, 2004, at 2:35 PM, John Miller wrote: > Craig Sutherland wrote: >>> If I do build 2.3.4, can I use the Panther add-ons as provided? Are >>> they even necessary if I build from source? >> Tom, >> >> With the latest XCode release and Developer Tools, Python 2.3.4 (#1 >> Jun 2, 2004) is the framework install provided as default. >snip< > I'm probably misunderstanding here, but I've installed the latest > XCode and Developer Tools, but in terminal I get the following: > > moire:~ jmillr$ python > Python 2.3 (#1, Sep 13 2003, 00:49:11) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> > > I don't think python 2.3.4 is installed, it's still 2.3.0. > > John Miller John- Which Xcode? Xcode IDE 389 1.5 is available from Apple's site. Info for my machine- Python 2.3.4 (#1, Jun 2 2004, 22:41:18) [GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin HTH Craig Sutherland -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1152 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040817/d87c9728/attachment.bin From bob at redivi.com Tue Aug 17 23:09:16 2004 From: bob at redivi.com (Bob Ippolito) Date: Tue Aug 17 23:09:51 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: References: <20040815100005.043671E4005@bag.python.org> <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> Message-ID: On Aug 17, 2004, at 4:49 PM, Craig Sutherland wrote: > > On Aug 15, 2004, at 2:35 PM, John Miller wrote: >> Craig Sutherland wrote: >>>> If I do build 2.3.4, can I use the Panther add-ons as provided? Are >>>> they even necessary if I build from source? >>> Tom, >>> >>> With the latest XCode release and Developer Tools, Python 2.3.4 (#1 >>> Jun 2, 2004) is the framework install provided as default. > >snip< >> I'm probably misunderstanding here, but I've installed the latest >> XCode and Developer Tools, but in terminal I get the following: >> >> moire:~ jmillr$ python >> Python 2.3 (#1, Sep 13 2003, 00:49:11) >> [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> >> >> I don't think python 2.3.4 is installed, it's still 2.3.0. >> >> John Miller > John- > > Which Xcode? Xcode IDE 389 1.5 is available from Apple's site. > > Info for my machine- > > Python 2.3.4 (#1, Jun 2 2004, 22:41:18) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin Can you print out sys.executable and sys.prefix? I don't believe you :) I think that you got this Python from darwinports, Fink, or compiled yourself. -bob From managan at llnl.gov Tue Aug 17 23:12:29 2004 From: managan at llnl.gov (Rob Managan) Date: Tue Aug 17 23:12:53 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: References: <20040815100005.043671E4005@bag.python.org> <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> Message-ID: I see what John Miller wrote. I have a new OSX 10.3 managan% which python /usr/bin/python managan% python Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> and about Xcode says version 1.5 Xcode IDE 389.0 Xcode core 387.0 ToolSupport 372.0 is python 2.3.4 located somewhere else?? At 3:49 PM -0500 8/17/04, Craig Sutherland wrote: >On Aug 15, 2004, at 2:35 PM, John Miller wrote: >>Craig Sutherland wrote: >>>>If I do build 2.3.4, can I use the Panther add-ons as provided? Are >>>>they even necessary if I build from source? >>>Tom, >>> >>>With the latest XCode release and Developer Tools, Python 2.3.4 >>>(#1 Jun 2, 2004) is the framework install provided as default. > >snip< >>I'm probably misunderstanding here, but I've installed the latest >>XCode and Developer Tools, but in terminal I get the following: >> >>moire:~ jmillr$ python >>Python 2.3 (#1, Sep 13 2003, 00:49:11) >>[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin >>Type "help", "copyright", "credits" or "license" for more information. >> >>> >> >>I don't think python 2.3.4 is installed, it's still 2.3.0. >> >>John Miller >John- > >Which Xcode? Xcode IDE 389 1.5 is available from Apple's site. > >Info for my machine- > >Python 2.3.4 (#1, Jun 2 2004, 22:41:18) >[GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin > >HTH >Craig Sutherland > > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG@python.org >http://mail.python.org/mailman/listinfo/pythonmac-sig -- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- Rob Managan email managan at llnl.gov LLNL phone: 925-423-0903 P.O. Box 808, L-095 FAX: 925-422-3389 Livermore, CA 94551-0808 From suthercd at mac.com Tue Aug 17 23:34:51 2004 From: suthercd at mac.com (Craig Sutherland) Date: Tue Aug 17 23:34:56 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: References: <20040815100005.043671E4005@bag.python.org> <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> Message-ID: <4593E202-F095-11D8-BF45-000A958F77A0@mac.com> On Aug 17, 2004, at 4:09 PM, Bob Ippolito wrote: > > On Aug 17, 2004, at 4:49 PM, Craig Sutherland wrote: >> >> On Aug 15, 2004, at 2:35 PM, John Miller wrote: >>> Craig Sutherland wrote: >>>>> If I do build 2.3.4, can I use the Panther add-ons as provided? >>>>> Are >>>>> they even necessary if I build from source? >>>> Tom, >>>> >>>> With the latest XCode release and Developer Tools, Python 2.3.4 (#1 >>>> Jun 2, 2004) is the framework install provided as default. >> >snip< >>> I'm probably misunderstanding here, but I've installed the latest >>> XCode and Developer Tools, but in terminal I get the following: >>> >>> moire:~ jmillr$ python >>> Python 2.3 (#1, Sep 13 2003, 00:49:11) >>> [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin >>> Type "help", "copyright", "credits" or "license" for more >>> information. >>> >>> >>> >>> I don't think python 2.3.4 is installed, it's still 2.3.0. >>> >>> John Miller >> John- >> >> Which Xcode? Xcode IDE 389 1.5 is available from Apple's site. >> >> Info for my machine- >> >> Python 2.3.4 (#1, Jun 2 2004, 22:41:18) >> [GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin > > Can you print out sys.executable and sys.prefix? I don't believe you > :) I think that you got this Python from darwinports, Fink, or > compiled yourself. > > -bob John, Bob, My apologies. Bob, of course, is right. I had run an X11 session and my .xinitrc added /sw/bin to my path. I have installed Python 2.3.4 via fink, and did not check my $PATH before replying to the list. Without reference to fink's install, my info is the same as John presented-- Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Thanks for the correction! Craig Sutherland From altis at semi-retired.com Wed Aug 18 02:50:45 2004 From: altis at semi-retired.com (Kevin Altis) Date: Wed Aug 18 02:50:51 2004 Subject: [Pythonmac-SIG] creating file associations with apps via bundlebuilder? Message-ID: I have a few bundlebuilder scripts that all seem to be making standalones from my PythonCard/wxPython scripts just fine, so thanks to Bob, etc. for that. However, I can't figure out what I need to do to get file extension assocations for those apps. For example, the CodeEditor standalone should be able to open .txt, .text, .xml, .htm, .html, .py, and .pyw at a minimum. If I try and choose the CodeEditor app I built via the Finder Get Info dialog with a .py file it doesn't think CodeEditor is a recommended application. So, I'm assuming there is some .plist file I have to create as well or do some other magic? ka From loredo at astro.cornell.edu Wed Aug 18 05:23:56 2004 From: loredo at astro.cornell.edu (Tom Loredo) Date: Wed Aug 18 05:23:58 2004 Subject: [Pythonmac-SIG] Offline package installs with PackMan Message-ID: <200408180323.i7I3Num12097@laplace.astro.cornell.edu> Hi folks- I've used PackMan to add packages to Python 2.3 (Panther) on my laptop, which I can bring to work where I have a fast net connection. I kept copies of all the packages and copied them to my desktop G4 at home, which lives on a dialup connection. Is there any way I can use PackMan to install those packages? If necessary I'll just download the source and install them the usual way (python setup.py install), but it seems with the binaries available there should be an easy way to do this with PackMan. Thanks, Tom From bob at redivi.com Wed Aug 18 08:10:56 2004 From: bob at redivi.com (Bob Ippolito) Date: Wed Aug 18 08:11:33 2004 Subject: [Pythonmac-SIG] creating file associations with apps via bundlebuilder? In-Reply-To: References: Message-ID: <5E225E9E-F0DD-11D8-933F-000A95686CD8@redivi.com> On Aug 17, 2004, at 8:50 PM, Kevin Altis wrote: > I have a few bundlebuilder scripts that all seem to be making > standalones from my PythonCard/wxPython scripts just fine, so thanks > to Bob, etc. for that. However, I can't figure out what I need to do > to get file extension assocations for those apps. For example, the > CodeEditor standalone should be able to open .txt, .text, .xml, .htm, > .html, .py, and .pyw at a minimum. If I try and choose the CodeEditor > app I built via the Finder Get Info dialog with a .py file it doesn't > think CodeEditor is a recommended application. So, I'm assuming there > is some .plist file I have to create as well or do some other magic? Yes, Info.plist. It's not magic, everything that LaunchServices knows about is in that one file. http://developer.apple.com/documentation/MacOSX/Conceptual/ BPRuntimeConfig/Concepts/PListKeys.html#//apple_ref/doc/uid/20001431/ TPXREF107 -bob From bob at redivi.com Wed Aug 18 08:11:54 2004 From: bob at redivi.com (Bob Ippolito) Date: Wed Aug 18 08:11:57 2004 Subject: [Pythonmac-SIG] Offline package installs with PackMan In-Reply-To: <200408180323.i7I3Num12097@laplace.astro.cornell.edu> References: <200408180323.i7I3Num12097@laplace.astro.cornell.edu> Message-ID: <807610A8-F0DD-11D8-933F-000A95686CD8@redivi.com> On Aug 17, 2004, at 11:23 PM, Tom Loredo wrote: > I've used PackMan to add packages to Python 2.3 (Panther) on my laptop, > which I can bring to work where I have a fast net connection. I kept > copies of all the packages and copied them to my desktop G4 at home, > which lives on a dialup connection. Is there any way I can use > PackMan to install those packages? If necessary I'll just download > the source and install them the usual way (python setup.py install), > but it seems with the binaries available there should be an easy way to > do this with PackMan. I think it looks in /tmp for the tarballs, but you'd have to read the source, search the archives, or wait for someone else to answer to be sure. -bob From ronaldoussoren at mac.com Wed Aug 18 08:12:15 2004 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed Aug 18 08:13:01 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: References: <20040815100005.043671E4005@bag.python.org> <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> Message-ID: <8D4E2400-F0DD-11D8-8EAB-000A95C77748@mac.com> On 17-aug-04, at 23:09, Bob Ippolito wrote: > > On Aug 17, 2004, at 4:49 PM, Craig Sutherland wrote: > >> >> On Aug 15, 2004, at 2:35 PM, John Miller wrote: >>> Craig Sutherland wrote: >>>>> If I do build 2.3.4, can I use the Panther add-ons as provided? >>>>> Are >>>>> they even necessary if I build from source? >>>> Tom, >>>> >>>> With the latest XCode release and Developer Tools, Python 2.3.4 (#1 >>>> Jun 2, 2004) is the framework install provided as default. >> >snip< >>> I'm probably misunderstanding here, but I've installed the latest >>> XCode and Developer Tools, but in terminal I get the following: >>> >>> moire:~ jmillr$ python >>> Python 2.3 (#1, Sep 13 2003, 00:49:11) >>> [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin >>> Type "help", "copyright", "credits" or "license" for more >>> information. >>> >>> >>> >>> I don't think python 2.3.4 is installed, it's still 2.3.0. >>> >>> John Miller >> John- >> >> Which Xcode? Xcode IDE 389 1.5 is available from Apple's site. >> >> Info for my machine- >> >> Python 2.3.4 (#1, Jun 2 2004, 22:41:18) >> [GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin > > Can you print out sys.executable and sys.prefix? I don't believe you > :) I think that you got this Python from darwinports, Fink, or > compiled yourself. He is correct: $ python Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.executable '/usr/bin/python' >>> sys.prefix '/System/Library/Frameworks/Python.framework/Versions/2.3' >>> sys.version '2.3 (#1, Sep 13 2003, 00:49:11) \n[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)]' >>> sys.version_info (2, 3, 0, 'final', 0) >>> $ sw_vers ProductName: Mac OS X ProductVersion: 10.3.5 BuildVersion: 7M34 Xcode 1.5 Component versions Xcode IDE: 389.0 Xcode Core: 387.0 ToolSupport: 372.0 Ronald -- X|support bv http://www.xsupport.nl/ T: +31 610271479 F: +31 204416173 From Jack.Jansen at cwi.nl Wed Aug 18 10:46:22 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed Aug 18 10:47:03 2004 Subject: [Pythonmac-SIG] Offline package installs with PackMan In-Reply-To: <807610A8-F0DD-11D8-933F-000A95686CD8@redivi.com> References: <200408180323.i7I3Num12097@laplace.astro.cornell.edu> <807610A8-F0DD-11D8-933F-000A95686CD8@redivi.com> Message-ID: <1505C264-F0F3-11D8-87DF-000A958D1666@cwi.nl> On 18-aug-04, at 8:11, Bob Ippolito wrote: > On Aug 17, 2004, at 11:23 PM, Tom Loredo wrote: > >> I've used PackMan to add packages to Python 2.3 (Panther) on my >> laptop, >> which I can bring to work where I have a fast net connection. I kept >> copies of all the packages and copied them to my desktop G4 at home, >> which lives on a dialup connection. Is there any way I can use >> PackMan to install those packages? If necessary I'll just download >> the source and install them the usual way (python setup.py install), >> but it seems with the binaries available there should be an easy way >> to >> do this with PackMan. > > I think it looks in /tmp for the tarballs, Correct. In a future version this'll become configurable (together with an option whether you want to keep the packages or not, etc). -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2086 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040818/f1c69ed3/smime.bin From altis at semi-retired.com Wed Aug 18 16:54:50 2004 From: altis at semi-retired.com (Kevin Altis) Date: Wed Aug 18 16:54:54 2004 Subject: [Pythonmac-SIG] creating file associations with apps via bundlebuilder? In-Reply-To: <5E225E9E-F0DD-11D8-933F-000A95686CD8@redivi.com> References: <5E225E9E-F0DD-11D8-933F-000A95686CD8@redivi.com> Message-ID: <8E054616-F126-11D8-9EC7-000A9598382A@semi-retired.com> On Aug 17, 2004, at 11:10 PM, Bob Ippolito wrote: > On Aug 17, 2004, at 8:50 PM, Kevin Altis wrote: > >> I have a few bundlebuilder scripts that all seem to be making >> standalones from my PythonCard/wxPython scripts just fine, so thanks >> to Bob, etc. for that. However, I can't figure out what I need to do >> to get file extension assocations for those apps. For example, the >> CodeEditor standalone should be able to open .txt, .text, .xml, .htm, >> .html, .py, and .pyw at a minimum. If I try and choose the CodeEditor >> app I built via the Finder Get Info dialog with a .py file it doesn't >> think CodeEditor is a recommended application. So, I'm assuming there >> is some .plist file I have to create as well or do some other magic? > > Yes, Info.plist. It's not magic, everything that LaunchServices knows > about is in that one file. > > http://developer.apple.com/documentation/MacOSX/Conceptual/ > BPRuntimeConfig/Concepts/PListKeys.html#//apple_ref/doc/uid/20001431/ > TPXREF107 > > -bob > Thanks. I cobbled together my own Info.plist file using PythonIDE and SubEthaEdit and the doc page as examples. I have a script that I've been using to make the standalone rather than providing a whole lot of command-line args to bundlebuilder. I've included the script below in case it points out some fundamental mistake on my part. I can't figure out a way to provide my own Info.plist file as a variable. Glancing at the bundlebuilder.py script it looks like I would have to read in and parse the Info.plist file using plistlib.PlistParser before setting the parsed XML to myapp.plist? Is there another way? ka --- import os, sys import bundlebuilder # I set this to make adding subfolders into the package easier # KEA 2004-07-22 # rather than hard-coding the path # we'll just get the path from this module ##packageroot = "/Users/kevino/oss/eclass/eclass_builder" packageroot = os.path.abspath(os.path.dirname(__file__)) # for the purposes of building the standalone # change to the directory the build script is in to simplify imports os.chdir(packageroot) # Create the AppBuilder myapp = bundlebuilder.AppBuilder(verbosity=1) # Tell it where to find the main script - the one that loads on startup myapp.mainprogram = os.path.join(packageroot, "codeEditor.py") # drag&dropped filenames show up in sys.argv myapp.argv_emulation=1 # make this app self contained myapp.standalone = 1 myapp.name = "CodeEditor" # need to specify --plist=Info.plist as command-line arg? # the line below doesn't work #myapp.plist = os.path.join(packageroot, "Info.plist") # includePackages forces certain packages to be added to the app bundle ##myapp.includePackages.append("encodings") ##myapp.includePackages.append("_xmlplus") # Here you add supporting files and/or folders to your bundle myapp.resources.append(os.path.join(packageroot, "scriptlets")) myapp.resources.append(os.path.join(packageroot, "codeEditor.rsrc.py")) myapp.resources.append(os.path.join(packageroot, "..", "..", "templates", "dialogs", "runOptionsDialog.rsrc.py")) # bundlebuilder does not yet have the capability to detect what shared libraries # are needed by your app - so in this case I am adding the wxPython libs manually myapp.libs.append("/usr/local/lib/wxPython-2.5.2.7/lib/libwx_macd -2.5.2.dylib") myapp.libs.append("/usr/local/lib/wxPython-2.5.2.7/lib/libwx_macd -2.5.2.rsrc") myapp.libs.append("/usr/local/lib/wxPython-2.5.2.7/lib/libwx_macd_stc -2.5.2.dylib") # Here we build the app! myapp.setup() myapp.build() From bob at redivi.com Wed Aug 18 17:30:58 2004 From: bob at redivi.com (Bob Ippolito) Date: Wed Aug 18 17:31:36 2004 Subject: [Pythonmac-SIG] creating file associations with apps via bundlebuilder? In-Reply-To: <8E054616-F126-11D8-9EC7-000A9598382A@semi-retired.com> References: <5E225E9E-F0DD-11D8-933F-000A95686CD8@redivi.com> <8E054616-F126-11D8-9EC7-000A9598382A@semi-retired.com> Message-ID: <9ABAE3E8-F12B-11D8-9A8D-000A95686CD8@redivi.com> On Aug 18, 2004, at 10:54 AM, Kevin Altis wrote: > On Aug 17, 2004, at 11:10 PM, Bob Ippolito wrote: > >> On Aug 17, 2004, at 8:50 PM, Kevin Altis wrote: >> >>> I have a few bundlebuilder scripts that all seem to be making >>> standalones from my PythonCard/wxPython scripts just fine, so thanks >>> to Bob, etc. for that. However, I can't figure out what I need to do >>> to get file extension assocations for those apps. For example, the >>> CodeEditor standalone should be able to open .txt, .text, .xml, >>> .htm, .html, .py, and .pyw at a minimum. If I try and choose the >>> CodeEditor app I built via the Finder Get Info dialog with a .py >>> file it doesn't think CodeEditor is a recommended application. So, >>> I'm assuming there is some .plist file I have to create as well or >>> do some other magic? >> >> Yes, Info.plist. It's not magic, everything that LaunchServices >> knows about is in that one file. >> >> http://developer.apple.com/documentation/MacOSX/Conceptual/ >> BPRuntimeConfig/Concepts/PListKeys.html#//apple_ref/doc/uid/20001431/ >> TPXREF107 >> > Thanks. I cobbled together my own Info.plist file using PythonIDE and > SubEthaEdit and the doc page as examples. I have a script that I've > been using to make the standalone rather than providing a whole lot of > command-line args to bundlebuilder. I've included the script below in > case it points out some fundamental mistake on my part. I can't figure > out a way to provide my own Info.plist file as a variable. Glancing at > the bundlebuilder.py script it looks like I would have to read in and > parse the Info.plist file using plistlib.PlistParser before setting > the parsed XML to myapp.plist? Is there another way? Yes, you should pass it a plistlib instance, which you can get from opening the file and parsing it with plistlib. There's also a command line argument that will take a plist file. Note that AppBuilder takes keyword arguments like distutils. That is the preferred way to pass in arguments rather than setting them on the object. I think some initialization may happen in __init__. bundlebuilder2 can detect those dependencies automatically.. well, not the rsrc file, but the dylibs. It also rewrites the Mach-O load commands so that they point to the right place. I think the last working version is at: http://undefined.org/python/macholib-v2.0a0.tgz -bob From altis at semi-retired.com Wed Aug 18 17:37:01 2004 From: altis at semi-retired.com (Kevin Altis) Date: Wed Aug 18 17:37:05 2004 Subject: [Pythonmac-SIG] creating file associations with apps via bundlebuilder? In-Reply-To: <8E054616-F126-11D8-9EC7-000A9598382A@semi-retired.com> References: <5E225E9E-F0DD-11D8-933F-000A95686CD8@redivi.com> <8E054616-F126-11D8-9EC7-000A9598382A@semi-retired.com> Message-ID: <72D9987F-F12C-11D8-9EC7-000A9598382A@semi-retired.com> On Aug 18, 2004, at 7:54 AM, Kevin Altis wrote: > On Aug 17, 2004, at 11:10 PM, Bob Ippolito wrote: > >> On Aug 17, 2004, at 8:50 PM, Kevin Altis wrote: >> >>> I have a few bundlebuilder scripts that all seem to be making >>> standalones from my PythonCard/wxPython scripts just fine, so thanks >>> to Bob, etc. for that. However, I can't figure out what I need to do >>> to get file extension assocations for those apps. For example, the >>> CodeEditor standalone should be able to open .txt, .text, .xml, >>> .htm, .html, .py, and .pyw at a minimum. If I try and choose the >>> CodeEditor app I built via the Finder Get Info dialog with a .py >>> file it doesn't think CodeEditor is a recommended application. So, >>> I'm assuming there is some .plist file I have to create as well or >>> do some other magic? >> >> Yes, Info.plist. It's not magic, everything that LaunchServices >> knows about is in that one file. >> >> http://developer.apple.com/documentation/MacOSX/Conceptual/ >> BPRuntimeConfig/Concepts/PListKeys.html#//apple_ref/doc/uid/20001431/ >> TPXREF107 >> >> -bob >> > Thanks. I cobbled together my own Info.plist file using PythonIDE and > SubEthaEdit and the doc page as examples. I have a script that I've > been using to make the standalone rather than providing a whole lot of > command-line args to bundlebuilder. I've included the script below in > case it points out some fundamental mistake on my part. I can't figure > out a way to provide my own Info.plist file as a variable. Glancing at > the bundlebuilder.py script it looks like I would have to read in and > parse the Info.plist file using plistlib.PlistParser before setting > the parsed XML to myapp.plist? Is there another way? > Doh, I wasn't paying attention to the optional arg handling. Plist.fromFile does the trick. myapp.plist = bundlebuilder.Plist.fromFile(os.path.join(packageroot, "Info.plist")) ka From Cameron at Phaseit.net Wed Aug 18 17:49:34 2004 From: Cameron at Phaseit.net (Cameron Laird) Date: Wed Aug 18 17:49:47 2004 Subject: [Pythonmac-SIG] Publicity opportunities Message-ID: <20040818154934.GA8472@lairds.us> Alex (Martelli) is working on a second printed edition of the Python Cookbook. He's open to the idea of Mac-specific recipes. Can we pull together and demonstrate for his readers how much Python enhances MacOS use? Also, as it happens, I'm in a position to use a few paragraphs of Applescript material. I can take anything *you* find interesting about Applescript (and Python)--general principles, specific scripts that do neat things, whatever. Both Alex and I reliably attribute full credit to original authors. From bob at redivi.com Wed Aug 18 17:54:58 2004 From: bob at redivi.com (Bob Ippolito) Date: Wed Aug 18 17:55:35 2004 Subject: [Pythonmac-SIG] creating file associations with apps via bundlebuilder? In-Reply-To: <72D9987F-F12C-11D8-9EC7-000A9598382A@semi-retired.com> References: <5E225E9E-F0DD-11D8-933F-000A95686CD8@redivi.com> <8E054616-F126-11D8-9EC7-000A9598382A@semi-retired.com> <72D9987F-F12C-11D8-9EC7-000A9598382A@semi-retired.com> Message-ID: On Aug 18, 2004, at 11:37 AM, Kevin Altis wrote: > On Aug 18, 2004, at 7:54 AM, Kevin Altis wrote: > >> On Aug 17, 2004, at 11:10 PM, Bob Ippolito wrote: >> >>> On Aug 17, 2004, at 8:50 PM, Kevin Altis wrote: >>> >>>> I have a few bundlebuilder scripts that all seem to be making >>>> standalones from my PythonCard/wxPython scripts just fine, so >>>> thanks to Bob, etc. for that. However, I can't figure out what I >>>> need to do to get file extension assocations for those apps. For >>>> example, the CodeEditor standalone should be able to open .txt, >>>> .text, .xml, .htm, .html, .py, and .pyw at a minimum. If I try and >>>> choose the CodeEditor app I built via the Finder Get Info dialog >>>> with a .py file it doesn't think CodeEditor is a recommended >>>> application. So, I'm assuming there is some .plist file I have to >>>> create as well or do some other magic? >>> >>> Yes, Info.plist. It's not magic, everything that LaunchServices >>> knows about is in that one file. >>> >>> http://developer.apple.com/documentation/MacOSX/Conceptual/ >>> BPRuntimeConfig/Concepts/PListKeys.html#//apple_ref/doc/uid/ >>> 20001431/TPXREF107 >>> >>> -bob >>> >> Thanks. I cobbled together my own Info.plist file using PythonIDE and >> SubEthaEdit and the doc page as examples. I have a script that I've >> been using to make the standalone rather than providing a whole lot >> of command-line args to bundlebuilder. I've included the script below >> in case it points out some fundamental mistake on my part. I can't >> figure out a way to provide my own Info.plist file as a variable. >> Glancing at the bundlebuilder.py script it looks like I would have to >> read in and parse the Info.plist file using plistlib.PlistParser >> before setting the parsed XML to myapp.plist? Is there another way? >> > Doh, I wasn't paying attention to the optional arg handling. > Plist.fromFile does the trick. > > myapp.plist = bundlebuilder.Plist.fromFile(os.path.join(packageroot, > "Info.plist")) I would say plistlib.Plist .. bundlebuilder doesn't or shouldn't export Plist in its "public API". -bob From altis at semi-retired.com Wed Aug 18 18:48:22 2004 From: altis at semi-retired.com (Kevin Altis) Date: Wed Aug 18 18:49:01 2004 Subject: [Pythonmac-SIG] creating file associations with apps via bundlebuilder? In-Reply-To: References: <5E225E9E-F0DD-11D8-933F-000A95686CD8@redivi.com> <8E054616-F126-11D8-9EC7-000A9598382A@semi-retired.com> <72D9987F-F12C-11D8-9EC7-000A9598382A@semi-retired.com> Message-ID: <6A62756C-F136-11D8-9EC7-000A9598382A@semi-retired.com> Hopefully, this is the last question. The standalone appears to build correctly and the Info.plist is being copied. I also added a MacOpenFile method per Kevin Ollivier's instructions at: http://wiki.wxpython.org/index.cgi/Optimizing_20for_20Mac_20OS_20X I can drag a file onto the application icon and the file opens as expected. Also, I can choose the CodeEditor application via the Get Info dialog Open With->Other... for the .py file association. If I choose Change All then CodeEditor shows up in the list of options for Open With, but if I change the default back to PythonLauncher then CodeEditor disappears from the menu, while PythonIDE, SubEthaEdit, and WorldText persist. Perhaps there is a critical line in the Info.plist that I botched or is there some other API I have to call to register my application for some file types so the Finder remembers the application? The Info.plist I'm using is cobbled together from PythonIDE and SubEthaEdit. Thanks for all the help Bob! ka From hengist.podd at virgin.net Wed Aug 18 22:04:24 2004 From: hengist.podd at virgin.net (has) Date: Wed Aug 18 22:04:45 2004 Subject: [Pythonmac-SIG] Publicity opportunities Message-ID: Cameron Laird wrote: >I'm in a position to use a few paragraphs of >Applescript material. I can take anything *you* find interesting >about Applescript (and Python)--general principles, specific >scripts that do neat things, whatever. You mean the AppleScript language in particular or Apple event-based InterApplication Communication in general? The AppleScript language isn't all that interesting, 'cept maybe as a pathological study case for language designers. Its only advantage over other scripting languages is that it currently has better OSA support than any other language; partly because OSS languages have been slow to support it (and often do a pretty poor job of it), partly because OS X's support for third-party OSA languages is second-rate at best. High-level Apple event-based IAC is a killer technology, though its practical use is complicated by huge variations in the quality and style of application interfaces and implementation, and still greatly undersupported. Though it's still way ahead of what's available on other platforms, mind you (although they are closing the gap). If you want to summarise it: local/LAN-based RPC with typed data (including support for type coercions), and vaguely OPath-like query-based mechanism for specifying application objects [1] as represented by the Apple Event Manager object model (basically a thin View+Controller over the application's Model layer; in Cocoa apps, this is provided for free by the Cocoa frameworks and typically reflects the actual Model structure closely; in Carbon apps developers had to hook it all together themselves). As for MacPython, its original AE support (aetools, gensuitemodule) is pretty third-rate, little used and due for replacement, so I wouldn't suggest going there. Bob started working on aeve as a replacement last year; I turned up a few months later, identified various problems in aeve and started work on appscript, which is loosely slated as the eventual replacement to aetools and company. (Had hoped it would be ready in time for MacPython 2.4, but now looks like it'll be 2.5 before it's sufficiently fit for inclusion.) The current version of appscript, 0.5.0, is reasonably complete, moderately usable and sufficiently well documented that someone with experience in application scripting on Frontier or AppleScript can use it quite successfully. (There's a stack of examples on my site if you want to take a look.) However, it does have problems (mostly caused by bugs in applications' terminology, which it's very sensitive to, and weaknesses in Apple's terminology formats/API in general) and omissions (mostly due to my own laziness and lack of deep C skills meaning it's still not finished), and the architecture is dreadfully non-extensible (my first attempt, after all), which means the next version (which I'm working on the now) is a complete rewrite (although its highest-level API should remain more or less identical to the current one). If you really want to discuss stuff some more, I can probably be arm-twisted into it. However, three caveats: 1. I'm not interested in discussing the AppleScript language itself, so if all you want is to execute AppleScript code from Python you're better off asking on one of the AppleScript-oriented mailing lists for which I can give you directions; 2. appscript isn't finished, so if you want to refer to it directly I can't guarantee I won't rip out and replace the API the day after you go to press; and 3. ORA and I have some bad history between us (I had a breakdown last year while writing an AppleScript book for them, which totalled the project) so may be persona non-grata as far as they're concerned (you may want to check with their Mac editor first; if he turns colours it's probably a bad idea). HTH has [1] Note: a LOT of folk mistake application object reference forms for conventional OO references due to their syntactic similarity in AppleScript - this is wrong, and an unfortunate consequence of its heavy use of syntactic sugar in clumsy attempts to appear simple and user-friendly. -- http://freespace.virgin.net/hamish.sanderson/ From paul at donovansbrain.co.uk Wed Aug 18 23:34:37 2004 From: paul at donovansbrain.co.uk (Paul Donovan) Date: Wed Aug 18 23:32:33 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: <4593E202-F095-11D8-BF45-000A958F77A0@mac.com> References: <20040815100005.043671E4005@bag.python.org> <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> <4593E202-F095-11D8-BF45-000A958F77A0@mac.com> Message-ID: <67E62F0D-F15E-11D8-9E76-000393998ACA@donovansbrain.co.uk> On 17 Aug 2004, at 22:34, Craig Sutherland wrote: > My apologies. Bob, of course, is right. I had run an X11 session and > my .xinitrc added /sw/bin to my path. I have installed Python 2.3.4 > via fink, and did not check my $PATH before replying to the list. > Surely this would have helped avoid the confusion: % which python /usr/bin/python ;-) Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2377 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040818/84666bb7/smime.bin From garbanzito at mac.com Thu Aug 19 02:14:47 2004 From: garbanzito at mac.com (steve harley) Date: Thu Aug 19 02:14:55 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: <67E62F0D-F15E-11D8-9E76-000393998ACA@donovansbrain.co.uk> References: <20040815100005.043671E4005@bag.python.org> <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> <4593E202-F095-11D8-BF45-000A958F77A0@mac.com> <67E62F0D-F15E-11D8-9E76-000393998ACA@donovansbrain.co.uk> Message-ID: on 18 Aug 2004, at 3:34 PM, Paul Donovan wrote: > Surely this would have helped avoid the confusion: > > % which python > /usr/bin/python or it may have added confusion: $ which python /usr/local/bin/python $ ls -l /usr/local/bin/python lrwxr-xr-x 1 root admin 15 10 Feb 2004 /usr/local/bin/python -> /usr/bin/python (no idea how i got that symlink) From suthercd at mac.com Thu Aug 19 02:21:04 2004 From: suthercd at mac.com (Craig Sutherland) Date: Thu Aug 19 02:21:12 2004 Subject: [Pythonmac-SIG] Which Python for Panther? In-Reply-To: <67E62F0D-F15E-11D8-9E76-000393998ACA@donovansbrain.co.uk> References: <20040815100005.043671E4005@bag.python.org> <3674AC84-EEF2-11D8-A30C-000A95B5BA08@umich.edu> <4593E202-F095-11D8-BF45-000A958F77A0@mac.com> <67E62F0D-F15E-11D8-9E76-000393998ACA@donovansbrain.co.uk> Message-ID: On Aug 18, 2004, at 4:34 PM, Paul Donovan wrote: > On 17 Aug 2004, at 22:34, Craig Sutherland wrote: >> My apologies. Bob, of course, is right. I had run an X11 session and >> my .xinitrc added /sw/bin to my path. I have installed Python 2.3.4 >> via fink, and did not check my $PATH before replying to the list. > Surely this would have helped avoid the confusion: > > % which python > /usr/bin/python > > Paul Yes. Not being hasty sometimes would also be an asset to develop. An echo $PATH clearly showed my oops. Craig Sutherland From garbanzito at mac.com Thu Aug 19 07:44:28 2004 From: garbanzito at mac.com (steve harley) Date: Thu Aug 19 07:44:38 2004 Subject: [Pythonmac-SIG] Publicity opportunities In-Reply-To: References: Message-ID: on 18 Aug 2004, at 2:04 PM, has wrote: > The AppleScript language isn't all that interesting, [...] > High-level Apple event-based IAC is a killer technology, [...] > The current version of appscript, 0.5.0, is reasonably complete, > moderately usable and sufficiently well documented that someone with > experience in application scripting on Frontier or AppleScript can use > it quite successfully i just want to reinforce has's well-framed comments.. as someone from the trenches of AppleScript & Frontier, and with a decent OO background, a few stabs at Python have quickly convinced me that Python + [something like appscript] can be far more productive than AppleScript, and could quickly become the choice of savvy Mac application scripters if AppleScript weren't so entrenched.. i would love to see Apple support has in his efforts with appscript From skr at telefonica.net Thu Aug 19 14:07:37 2004 From: skr at telefonica.net (oscar sanchez) Date: Thu Aug 19 14:07:44 2004 Subject: [Pythonmac-SIG] Xpython In-Reply-To: References: <2c9aa7fe04080718124827a45@mail.gmail.com> Message-ID: <5C889548-F1D8-11D8-8ED3-000A956D5506@telefonica.net> Hi, I just found the XPython plug-in (bin version, source won't compile), but I can't get to work. I'm putting it at: ~/Library/Application?Support/Apple/Developer?Tools/ I tried also: ~/Library/Application?Support/Apple/Developer?Tools/Plug-ins/ /Library/Application Support/Apple/Developer Tools/Plug-ins/ none of them worked. I've also found that if I have one copy on the first dir and another one on the third, Xcode (1.5) won't startup, so it is detecting them. what I'm missing here? thanks, oscar From bob at redivi.com Thu Aug 19 15:38:25 2004 From: bob at redivi.com (Bob Ippolito) Date: Thu Aug 19 15:39:02 2004 Subject: [Pythonmac-SIG] Xpython In-Reply-To: <5C889548-F1D8-11D8-8ED3-000A956D5506@telefonica.net> References: <2c9aa7fe04080718124827a45@mail.gmail.com> <5C889548-F1D8-11D8-8ED3-000A956D5506@telefonica.net> Message-ID: <0BD274DE-F1E5-11D8-96D9-000A95686CD8@redivi.com> On Aug 19, 2004, at 8:07 AM, oscar sanchez wrote: > Hi, I just found the XPython plug-in (bin version, source won't > compile), but I can't get to work. I'm putting it at: > > ~/Library/Application?Support/Apple/Developer?Tools/ > > I tried also: > > ~/Library/Application?Support/Apple/Developer?Tools/Plug-ins/ > /Library/Application Support/Apple/Developer Tools/Plug-ins/ > > none of them worked. I've also found that if I have one copy on the > first dir and another one on the third, Xcode (1.5) won't startup, so > it is detecting them. what I'm missing here? Maybe it is working, what do you expect it to do? I think you might be able to tell by looking at the console while Xcode is starting up, or maybe it adds a Python menu to the menu bar with some trivial options. It's just a proof of concept and isn't supported in any way shape or form. I don't know why it doesn't compile for you, and it has never been tested with Xcode 1.5. It was developed quite some time ago and isn't likely to be touched again unless Apple opens up some of the Xcode APIs (particularly the debugging plug-in API). -bob From hengist.podd at virgin.net Thu Aug 19 17:59:04 2004 From: hengist.podd at virgin.net (has) Date: Thu Aug 19 18:00:37 2004 Subject: [Pythonmac-SIG] Publicity opportunities Message-ID: steve harley wrote: >i just want to reinforce has's well-framed comments.. as someone from >the trenches of AppleScript & Frontier, and with a decent OO >background, a few stabs at Python have quickly convinced me that Python >+ [something like appscript] can be far more productive than >AppleScript, For benefit of folks unfamiliar with AS: Python's advantages are its plentiful libraries and community expertise. AppleScript has pathetic library support (meaning you have to write most everything from scratch) and a user community that, while enthusiastic, isn't terribly knowledgeable (lots of cargo-cultism; often the blind are leading the blind). The AppleScript language itself is ahead of Python in some ways (very clean and simple OO model, persistent objects), behind in others (weaker built-in types, slow, buggy), and deeply flawed in others (overly complex language model, ambiguous syntax, ghastly unstable keyword soup). For trivial IAC stuff, AS can actually be quite nice (if you know what you're doing). But mostly its just underpowered, undersupported, confusing and frustrating. >and could quickly become the choice of savvy Mac >application scripters if AppleScript weren't so entrenched. Yeah, find it some champions in the pre-press automation field and it'll soon take off. >i would love to see Apple support has in his efforts with appscript I couldn't care less about Apple supporting appscript or not. I think it's fine that OSS developers should provide the language-side support themselves; if they can't be bothered to do it then why should Apple? All I want Apple to do is provide decent APIs and a level playing field. The Cocoa frameworks' OSA support is currently pretty poor: only the AppleScript language component is supported, which isn't much use to users who want to attach or record Python/Perl/etc. scripts in your average Cocoa application. (Sure there's nothing to stop a third-party developing their own Cocoa wrappers for OSA, but it'd be a lot more popular coming from Apple.) They could also stop conflating application scripting with the AppleScript language. While it's a handy marketing label for them, it really skews user perceptions of these two independent technologies and makes it that much harder for other languages to establish mindshare, and I think the AppleScript association probably does as much harm as good for Mac IAC given its lousy rep as a language amongst professional developers. Cheers, has http://freespace.virgin.net/hamish.sanderson/ From boyle5 at llnl.gov Thu Aug 19 19:46:24 2004 From: boyle5 at llnl.gov (James Boyle) Date: Thu Aug 19 19:46:31 2004 Subject: [Pythonmac-SIG] ipython/tk interactive Message-ID: I almost exclusively use ipython in my work. However, I have a problem using ipython and Tk. Using pythonw I can use Tk without any problem. the ipython startup script is at its simplest: #!/usr/bin/python # -*- coding: iso-8859-1 -*- import IPython IPython.Shell.IPShell().mainloop() I can start up using pythonw and perform the actions of the script by hand and get an ipython shell that can be used with Tk. Just using the ipython script and Tk results in the dreaded SetFrontProcess?failed,-606. My question is this - is there anyway to modify the ipython script to enable use of Tk. I would like to keep my usage of ipython consistent across platforms. I have looked at what pythonw does and what the ipython startup does but so far I have not gotten it to work. I am on OSX 10.3.5 and use the Apple python + the Mac Addons + Tk from package manager. Thanks for any suggestions / help. Jim -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 990 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040819/b0d7ea87/attachment.bin From bob at redivi.com Thu Aug 19 19:57:59 2004 From: bob at redivi.com (Bob Ippolito) Date: Thu Aug 19 19:58:38 2004 Subject: [Pythonmac-SIG] ipython/tk interactive In-Reply-To: References: Message-ID: <4E8C8C7B-F209-11D8-BCE1-000A95686CD8@redivi.com> On Aug 19, 2004, at 1:46 PM, James Boyle wrote: > I almost exclusively use ipython in my work. However, I have a problem > using ipython and Tk. > Using pythonw I can use Tk without any problem. > > the ipython startup script is at its simplest: > > #!/usr/bin/python > # -*- coding: iso-8859-1 -*- > import IPython > IPython.Shell.IPShell().mainloop() > > I can start up using pythonw and perform the actions of the script by > hand and get an ipython shell that can be used > with Tk. Just using the ipython script and Tk results in the dreaded > SetFrontProcess?failed,-606. > > My question is this - is there anyway to modify the ipython script to > enable use of Tk. I would like to keep my usage of ipython > consistent across platforms. > I have looked at what pythonw does and what the ipython startup does > but so far I have not gotten it to work. > I am on OSX 10.3.5 and use the Apple python + the Mac Addons + Tk from > package manager. > > Thanks for any suggestions / help. pythonw `which ipython` or (tcsh syntax, anyway.. could go in your .tcshrc or whatever) alias ipython "pythonw `which ipython`" -bob From boyle5 at llnl.gov Thu Aug 19 20:17:01 2004 From: boyle5 at llnl.gov (James Boyle) Date: Thu Aug 19 20:17:06 2004 Subject: [Pythonmac-SIG] ipython/tk interactive In-Reply-To: <4E8C8C7B-F209-11D8-BCE1-000A95686CD8@redivi.com> References: <4E8C8C7B-F209-11D8-BCE1-000A95686CD8@redivi.com> Message-ID: Brilliant - Thanks very much Jim On Aug 19, 2004, at 10:57 AM, Bob Ippolito wrote: > > On Aug 19, 2004, at 1:46 PM, James Boyle wrote: > >> I almost exclusively use ipython in my work. However, I have a >> problem using ipython and Tk. >> Using pythonw I can use Tk without any problem. >> >> the ipython startup script is at its simplest: >> >> #!/usr/bin/python >> # -*- coding: iso-8859-1 -*- >> import IPython >> IPython.Shell.IPShell().mainloop() >> >> I can start up using pythonw and perform the actions of the script by >> hand and get an ipython shell that can be used >> with Tk. Just using the ipython script and Tk results in the dreaded >> SetFrontProcess?failed,-606. >> >> My question is this - is there anyway to modify the ipython script to >> enable use of Tk. I would like to keep my usage of ipython >> consistent across platforms. >> I have looked at what pythonw does and what the ipython startup does >> but so far I have not gotten it to work. >> I am on OSX 10.3.5 and use the Apple python + the Mac Addons + Tk >> from package manager. >> >> Thanks for any suggestions / help. > > pythonw `which ipython` > > or (tcsh syntax, anyway.. could go in your .tcshrc or whatever) > > alias ipython "pythonw `which ipython`" > > -bob > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > From jeremy.knope at gmail.com Thu Aug 19 21:24:56 2004 From: jeremy.knope at gmail.com (Jerome) Date: Thu Aug 19 21:25:16 2004 Subject: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, anybody use it? In-Reply-To: <86D6D36A-F015-11D8-9F65-000A95686CD8@redivi.com> References: <2c9aa7fe0408050717209a24e1@mail.gmail.com> <999BFA64-EF0A-11D8-9AF1-000D934FF6B4@cwi.nl> <2c9aa7fe0408161450170e3a79@mail.gmail.com> <997DDCA8-EFD0-11D8-A565-000D934FF6B4@cwi.nl> <86D6D36A-F015-11D8-9F65-000A95686CD8@redivi.com> Message-ID: <2c9aa7fe040819122473790cd4@mail.gmail.com> So i tried opening the component now since being told that you do \x00\x00\x00\x00 for a 4 byte OSType string that's just 0 so that returned a component instance, yay! but sadness again: In [11]: Qt.SGInitialize(seqGrab) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /Users/jerome/Desktop/ TypeError: Component required but it is a component, ComponentInstance type at least... From garbanzito at mac.com Thu Aug 19 23:08:28 2004 From: garbanzito at mac.com (steve harley) Date: Thu Aug 19 23:09:00 2004 Subject: [Pythonmac-SIG] Publicity opportunities In-Reply-To: References: Message-ID: on 19 Aug 2004, at 9:59 AM, has wrote: > I couldn't care less about Apple supporting appscript or not. I think > it's fine that OSS developers should provide the language-side support > themselves; if they can't be bothered to do it then why should Apple? i was thinking along the lines of Apple including appscript (when finished, i guess) with the default Mac OS X Python, which would make it easier to write a Python/appscript tool that would be plug & play for all Mac users.. on the other hand, if bundling Python apps becomes easier, maybe it will just be enough to build appscript into the bundles > All I want Apple to do is provide decent APIs and a level playing > field. yeah, we would see more efforts like yours if Open Scripting Architecture were to live up to its name From hengist.podd at virgin.net Thu Aug 19 23:44:36 2004 From: hengist.podd at virgin.net (has) Date: Thu Aug 19 23:44:39 2004 Subject: [Pythonmac-SIG] Publicity opportunities In-Reply-To: References: Message-ID: steve harley wrote: >i was thinking along the lines of Apple including appscript (when >finished, i guess) with the default Mac OS X Python, Appscript should eventually go into the standard MacPython distribution, which is what Apple are bundling with the OS these days (minus schemey apps). But little point in making plans before the wretched thing is actually done... :) > which would make it easier to write a Python/appscript tool that >would be plug & play for all Mac users.. on the other hand, if >bundling Python apps becomes easier, maybe it will just be enough to >build appscript into the bundles I think the problem is with installing >1 version of MacPython. I'm assuming Apple put their copy in /System because they want a known stable version for their own use, but then they don't bother keeping it up to date which is really slovenly. If the MacPython Branes can get the multiple installations thing sorted out, I guess this'll become much less of a problem though. >>All I want Apple to do is provide decent APIs and a level playing field. > >yeah, we would see more efforts like yours if Open Scripting >Architecture were to live up to its name Third-parties had years to get their stuff together under MacOSes 7 to 9. Can't blame Apple for not improving an API that nobody else uses; they've no shortage of higher priorities. I think we'll be in a much stronger position to lobby for improvements once we do so. If you're interested in this stuff, give Philip Aker a shout: he's working on OSA support for various languages. Not compatible with the Python licence so won't become the official Python/OSA mechanism unless he changes that, but a significant effort nonetheless. Best, has -- http://freespace.virgin.net/hamish.sanderson/ From marcus.h.mendenhall at vanderbilt.edu Thu Aug 19 23:59:21 2004 From: marcus.h.mendenhall at vanderbilt.edu (Marcus Mendenhall) Date: Thu Aug 19 23:59:24 2004 Subject: [Pythonmac-SIG] Re: Quicktime and SequenceGrabber In-Reply-To: <20040819214441.882AB1E4008@bag.python.org> References: <20040819214441.882AB1E4008@bag.python.org> Message-ID: <064C5694-F22B-11D8-B142-000A95E89E1C@vanderbilt.edu> > From: Jerome > Date: August 19, 2004 2:24:56 PM CDT > To: Python > Subject: Re: Re: [Pythonmac-SIG] QuickTime.Qt beta & SequenceGrabber, > anybody use it? > Reply-To: Jerome > > > So i tried opening the component now since being told that you do > \x00\x00\x00\x00 for a 4 byte OSType string that's just 0 > > so that returned a component instance, yay! > > but sadness again: > > In [11]: Qt.SGInitialize(seqGrab) > ----------------------------------------------------------------------- > ---- > TypeError Traceback (most recent call > last) > > /Users/jerome/Desktop/ > > TypeError: Component required > > but it is a component, ComponentInstance type at least... > A few months ago, I tackled the problem of using SWIG to wrap almost the entire Quicktime library, including SequenceGrabber stuff, for use in python. It works well enough (actually, extremely well), that I can use a python program to put up a window, plug in a firewire camera, and digitize video to a window, with the ability to pass buffers into a queue in python for realtime analysis. I also wrapped some bits of the accelerated video framework so that (under 10.3 and beyond, where this framework exists), a lot of the hard work of converting video formats to floating point arrays is done using the Altivec processor, making the whole thing pretty efficient. I can handle 30 frames/second of 320x240 video in real time, using Numpy math, doing (for example) a square root of a significant chunk of the image (Ok, that's somewhat stupid, but that part was just a demo). If anyone is interested in getting this, contact me at marcus.h.mendenhall@vanderbilt.edu and I will be happy to send the code along. It is includes a setup.py distutils wrapper, so it is capable of compiling and installing itself pretty much unattended. You need swig from fink, of course. It is, as one might expect, shockingly poorly documented except for sample code. I did, however, try to make the sample code fairly self-explanatory, so I don't think it will be too hard to make it work. Marcus Mendenhall -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2468 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040819/7178f108/attachment.bin From altis at semi-retired.com Fri Aug 20 18:29:34 2004 From: altis at semi-retired.com (Kevin Altis) Date: Fri Aug 20 18:29:42 2004 Subject: [Pythonmac-SIG] Fwd: [Pythoncard-users] Re: Item missing from PythonCard 0.8 install? Message-ID: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> Is there a distutils bug in Python 2.3.0 on Mac OS X (Panther) that was fixed in later releases? See the message below. If so, I guess I'll have to start building the tar.gz files on a different OS. ka Begin forwarded message: > From: "Andy Todd" > Date: August 20, 2004 9:24:15 AM PDT > To: "Kevin Altis" > Cc: "pythoncard-Users" > Subject: Re: [Pythoncard-users] Re: Item missing from PythonCard 0.8 > install? > > Kevin Altis wrote: >> >> There is one other bit of weirdness on the Mac that I don't really >> understand since I don't remember distutils doing this before. It is >> copying all the package files to /Library/Python2.3/PythonCard and >> then creating a build directory with lib/PythonCard and scripts-2.3 >> dirs inside that. Does Linux do that too? Perhaps I need to revise >> the commands I run and/or setup.py script, but this is clearly >> wrong, though harmless, except for burning additional disk space. >> Did I mention that distutils is my nemesis? ;-) > [snip] > > Hmm, I think it might just be you Kevin ;-) Downloading the tarball > from SourceForge on my linux machine and running 'python setup.py > install' gives me the build directory under > /usr/lib/python2.3/site-packages/PythonCard > > But, when I do a fresh check out of the PythonCard module and build my > own tarball (using 'python setup.py sdist --formats=gztar') the > problem disappears. > > When I do the same thing on my Mac I see the same problem that you do. > Ergo, it's a bug in Python 2.3.0 which was fixed in one of the > releases up to 2.3.4 (which I'm running on Linux). > > Do you want me to build a 0.8 tarball on my machine? Or should we wait > until a few more fixes are in and include this in 0.8.1? > > Regards, > Andy > -- > ----------------------------------------------------------------------- > --------- > From the desk of Andrew J Todd esq - http://www.halfcooked.com/ > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2300 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040820/7c4cd78d/attachment.bin From bob at redivi.com Fri Aug 20 19:06:13 2004 From: bob at redivi.com (Bob Ippolito) Date: Fri Aug 20 19:06:24 2004 Subject: [Pythonmac-SIG] Fwd: [Pythoncard-users] Re: Item missing from PythonCard 0.8 install? In-Reply-To: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> Message-ID: <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> On Aug 20, 2004, at 12:29 PM, Kevin Altis wrote: > Begin forwarded message: > >> From: "Andy Todd" >> Date: August 20, 2004 9:24:15 AM PDT >> To: "Kevin Altis" >> Cc: "pythoncard-Users" >> Subject: Re: [Pythoncard-users] Re: Item missing from PythonCard 0.8 >> install? >> >> Kevin Altis wrote: >>> > >>> There is one other bit of weirdness on the Mac that I don't really >>> understand since I don't remember distutils doing this before. It is >>> copying all the package files to /Library/Python2.3/PythonCard and >>> then creating a build directory with lib/PythonCard and scripts-2.3 >>> dirs inside that. Does Linux do that too? Perhaps I need to revise >>> the commands I run and/or setup.py script, but this is clearly >>> wrong, though harmless, except for burning additional disk space. >>> Did I mention that distutils is my nemesis? ;-) >> [snip] >> >> Hmm, I think it might just be you Kevin ;-) Downloading the tarball >> from SourceForge on my linux machine and running 'python setup.py >> install' gives me the build directory under >> /usr/lib/python2.3/site-packages/PythonCard >> >> But, when I do a fresh check out of the PythonCard module and build >> my own tarball (using 'python setup.py sdist --formats=gztar') the >> problem disappears. >> >> When I do the same thing on my Mac I see the same problem that you >> do. Ergo, it's a bug in Python 2.3.0 which was fixed in one of the >> releases up to 2.3.4 (which I'm running on Linux). >> >> Do you want me to build a 0.8 tarball on my machine? Or should we >> wait until a few more fixes are in and include this in 0.8.1? > Is there a distutils bug in Python 2.3.0 on Mac OS X (Panther) that > was fixed in later releases? See the message below. If so, I guess > I'll have to start building the tar.gz files on a different OS. It's not clear to me exactly what you are saying.. What is this "build directory" lib/PythonCard and scripts-2.3? Could you please show the full paths on both platforms and explain in more detail why this is wrong? It sounds like a bug in the setup.py, not a bug in distutils. The equivalent of "/usr/lib/python2.3/site-packages" is "/Library/Python/2.3" on the Mac as installed by Apple (this is by way of symlink down in sys.prefix). -bob From altis at semi-retired.com Fri Aug 20 20:09:16 2004 From: altis at semi-retired.com (Kevin Altis) Date: Fri Aug 20 20:09:20 2004 Subject: [Pythonmac-SIG] how do you determine if you're running a bundlebuilder standalone? Message-ID: <0C4B529E-F2D4-11D8-9EC7-000A9598382A@semi-retired.com> I have the following function for determining at runtime whether a program is running standalone, but it needs to be updated for Mac OS X and bundlebuilder. # Thomas Heller's function for determining # if a module is running standalone def main_is_frozen(): return (hasattr(sys, "importers") # py2exe or imp.is_frozen("__main__") # cx_freeze or tools/freeze or hasattr(sys, "frozen") # McMillan installer ) What's the magic attribute for bundlebuilder standalones? ka p.s. I'm waiting to get a Linux built tar.gz of PythonCard 0.8 to test on the Mac in order to give you a more detailed answer to the distutils question. From andy47 at halfcooked.com Fri Aug 20 20:24:13 2004 From: andy47 at halfcooked.com (Andy Todd) Date: Fri Aug 20 20:24:22 2004 Subject: [Pythonmac-SIG] Re: Fwd: [Pythoncard-users] Re: Item missing from PythonCard 0.8 install? In-Reply-To: <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> Message-ID: Bob Ippolito wrote: > On Aug 20, 2004, at 12:29 PM, Kevin Altis wrote: > >> Begin forwarded message: >> >>> From: "Andy Todd" >>> Date: August 20, 2004 9:24:15 AM PDT >>> To: "Kevin Altis" >>> Cc: "pythoncard-Users" >>> Subject: Re: [Pythoncard-users] Re: Item missing from PythonCard 0.8 >>> install? >>> >>> Kevin Altis wrote: >>> >>>> >> >> >>>> There is one other bit of weirdness on the Mac that I don't really >>>> understand since I don't remember distutils doing this before. It is >>>> copying all the package files to /Library/Python2.3/PythonCard and >>>> then creating a build directory with lib/PythonCard and scripts-2.3 >>>> dirs inside that. Does Linux do that too? Perhaps I need to revise >>>> the commands I run and/or setup.py script, but this is clearly >>>> wrong, though harmless, except for burning additional disk space. >>>> Did I mention that distutils is my nemesis? ;-) >>> >>> [snip] >>> >>> Hmm, I think it might just be you Kevin ;-) Downloading the tarball >>> from SourceForge on my linux machine and running 'python setup.py >>> install' gives me the build directory under >>> /usr/lib/python2.3/site-packages/PythonCard >>> >>> But, when I do a fresh check out of the PythonCard module and build >>> my own tarball (using 'python setup.py sdist --formats=gztar') the >>> problem disappears. >>> >>> When I do the same thing on my Mac I see the same problem that you >>> do. Ergo, it's a bug in Python 2.3.0 which was fixed in one of the >>> releases up to 2.3.4 (which I'm running on Linux). >>> >>> Do you want me to build a 0.8 tarball on my machine? Or should we >>> wait until a few more fixes are in and include this in 0.8.1? >> >> Is there a distutils bug in Python 2.3.0 on Mac OS X (Panther) that >> was fixed in later releases? See the message below. If so, I guess >> I'll have to start building the tar.gz files on a different OS. > > > It's not clear to me exactly what you are saying.. What is this "build > directory" lib/PythonCard and scripts-2.3? Could you please show the > full paths on both platforms and explain in more detail why this is wrong? > > It sounds like a bug in the setup.py, not a bug in distutils. The > equivalent of "/usr/lib/python2.3/site-packages" is > "/Library/Python/2.3" on the Mac as installed by Apple (this is by way > of symlink down in sys.prefix). > > -bob > _______________________________________________ It's not a bug in the setup.py. If we build the package on linux and then install it on linux or Mac OSX we get our root directory (PythonCard) with subdirectories components, docs, samples, templates, tests and tools - as expected. This is under /usr/lib/python2.3/site-packages on linux or /Library/Python/2.3/site-packages on the Mac. Build the same package on Mac OSX (10.3.4) and when it is installed we get an additional directory called build under PythonCard. It's not in the tarball. As far as I know this is a distutils working directory which should only exist when the package is being built and not when it is built. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ From bob at redivi.com Fri Aug 20 20:34:22 2004 From: bob at redivi.com (Bob Ippolito) Date: Fri Aug 20 20:34:28 2004 Subject: [Pythonmac-SIG] Re: Fwd: [Pythoncard-users] Re: Item missing from PythonCard 0.8 install? In-Reply-To: References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> Message-ID: <8E2687BA-F2D7-11D8-945F-000A95686CD8@redivi.com> On Aug 20, 2004, at 2:24 PM, Andy Todd wrote: > Bob Ippolito wrote: >> On Aug 20, 2004, at 12:29 PM, Kevin Altis wrote: >>> Begin forwarded message: >>> >>>> From: "Andy Todd" >>>> Date: August 20, 2004 9:24:15 AM PDT >>>> To: "Kevin Altis" >>>> Cc: "pythoncard-Users" >>>> Subject: Re: [Pythoncard-users] Re: Item missing from PythonCard >>>> 0.8 install? >>>> >>>> Kevin Altis wrote: >>>> >>>>> >>> >>> >>>>> There is one other bit of weirdness on the Mac that I don't really >>>>> understand since I don't remember distutils doing this before. It >>>>> is copying all the package files to /Library/Python2.3/PythonCard >>>>> and then creating a build directory with lib/PythonCard and >>>>> scripts-2.3 dirs inside that. Does Linux do that too? Perhaps I >>>>> need to revise the commands I run and/or setup.py script, but >>>>> this is clearly wrong, though harmless, except for burning >>>>> additional disk space. Did I mention that distutils is my >>>>> nemesis? ;-) >>>> >>>> [snip] >>>> >>>> Hmm, I think it might just be you Kevin ;-) Downloading the tarball >>>> from SourceForge on my linux machine and running 'python setup.py >>>> install' gives me the build directory under >>>> /usr/lib/python2.3/site-packages/PythonCard >>>> >>>> But, when I do a fresh check out of the PythonCard module and build >>>> my own tarball (using 'python setup.py sdist --formats=gztar') the >>>> problem disappears. >>>> >>>> When I do the same thing on my Mac I see the same problem that you >>>> do. Ergo, it's a bug in Python 2.3.0 which was fixed in one of the >>>> releases up to 2.3.4 (which I'm running on Linux). >>>> >>>> Do you want me to build a 0.8 tarball on my machine? Or should we >>>> wait until a few more fixes are in and include this in 0.8.1? >>> >>> Is there a distutils bug in Python 2.3.0 on Mac OS X (Panther) that >>> was fixed in later releases? See the message below. If so, I guess >>> I'll have to start building the tar.gz files on a different OS. >> It's not clear to me exactly what you are saying.. What is this >> "build directory" lib/PythonCard and scripts-2.3? Could you please >> show the full paths on both platforms and explain in more detail why >> this is wrong? >> It sounds like a bug in the setup.py, not a bug in distutils. The >> equivalent of "/usr/lib/python2.3/site-packages" is >> "/Library/Python/2.3" on the Mac as installed by Apple (this is by >> way of symlink down in sys.prefix). >> -bob >> _______________________________________________ > > It's not a bug in the setup.py. If we build the package on linux and > then install it on linux or Mac OSX we get our root directory > (PythonCard) with subdirectories components, docs, samples, templates, > tests and tools - as expected. This is under > /usr/lib/python2.3/site-packages on linux or > /Library/Python/2.3/site-packages on the Mac. > > Build the same package on Mac OSX (10.3.4) and when it is installed we > get an additional directory called build under PythonCard. It's not in > the tarball. As far as I know this is a distutils working directory > which should only exist when the package is being built and not when > it is built. If you detail exactly (down to command line steps) what it takes to reproduce this, I'll take a look. I still think it's something wonky in setup.py, I've never heard of anything like this.. whether or not it works on Linux. -bob From andy47 at halfcooked.com Fri Aug 20 21:26:51 2004 From: andy47 at halfcooked.com (Andy Todd) Date: Fri Aug 20 21:26:59 2004 Subject: [Pythonmac-SIG] Re: Fwd: [Pythoncard-users] Re: Item missing from PythonCard 0.8 install? In-Reply-To: <8E2687BA-F2D7-11D8-945F-000A95686CD8@redivi.com> References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> <8E2687BA-F2D7-11D8-945F-000A95686CD8@redivi.com> Message-ID: Bob Ippolito wrote: > > On Aug 20, 2004, at 2:24 PM, Andy Todd wrote: > >> Bob Ippolito wrote: >> >>> On Aug 20, 2004, at 12:29 PM, Kevin Altis wrote: >>> >>>> Begin forwarded message: >>>> >>>>> From: "Andy Todd" >>>>> Date: August 20, 2004 9:24:15 AM PDT >>>>> To: "Kevin Altis" >>>>> Cc: "pythoncard-Users" >>>>> Subject: Re: [Pythoncard-users] Re: Item missing from PythonCard >>>>> 0.8 install? >>>>> >>>>> Kevin Altis wrote: >>>>> >>>>>> >>>> >>>> >>>>>> There is one other bit of weirdness on the Mac that I don't really >>>>>> understand since I don't remember distutils doing this before. It >>>>>> is copying all the package files to /Library/Python2.3/PythonCard >>>>>> and then creating a build directory with lib/PythonCard and >>>>>> scripts-2.3 dirs inside that. Does Linux do that too? Perhaps I >>>>>> need to revise the commands I run and/or setup.py script, but >>>>>> this is clearly wrong, though harmless, except for burning >>>>>> additional disk space. Did I mention that distutils is my >>>>>> nemesis? ;-) >>>>> >>>>> >>>>> [snip] >>>>> >>>>> Hmm, I think it might just be you Kevin ;-) Downloading the tarball >>>>> from SourceForge on my linux machine and running 'python setup.py >>>>> install' gives me the build directory under >>>>> /usr/lib/python2.3/site-packages/PythonCard >>>>> >>>>> But, when I do a fresh check out of the PythonCard module and build >>>>> my own tarball (using 'python setup.py sdist --formats=gztar') the >>>>> problem disappears. >>>>> >>>>> When I do the same thing on my Mac I see the same problem that you >>>>> do. Ergo, it's a bug in Python 2.3.0 which was fixed in one of the >>>>> releases up to 2.3.4 (which I'm running on Linux). >>>>> >>>>> Do you want me to build a 0.8 tarball on my machine? Or should we >>>>> wait until a few more fixes are in and include this in 0.8.1? >>>> >>>> >>>> Is there a distutils bug in Python 2.3.0 on Mac OS X (Panther) that >>>> was fixed in later releases? See the message below. If so, I guess >>>> I'll have to start building the tar.gz files on a different OS. >>> >>> It's not clear to me exactly what you are saying.. What is this >>> "build directory" lib/PythonCard and scripts-2.3? Could you please >>> show the full paths on both platforms and explain in more detail why >>> this is wrong? >>> It sounds like a bug in the setup.py, not a bug in distutils. The >>> equivalent of "/usr/lib/python2.3/site-packages" is >>> "/Library/Python/2.3" on the Mac as installed by Apple (this is by >>> way of symlink down in sys.prefix). >>> -bob >>> _______________________________________________ >> >> >> It's not a bug in the setup.py. If we build the package on linux and >> then install it on linux or Mac OSX we get our root directory >> (PythonCard) with subdirectories components, docs, samples, templates, >> tests and tools - as expected. This is under >> /usr/lib/python2.3/site-packages on linux or >> /Library/Python/2.3/site-packages on the Mac. >> >> Build the same package on Mac OSX (10.3.4) and when it is installed we >> get an additional directory called build under PythonCard. It's not in >> the tarball. As far as I know this is a distutils working directory >> which should only exist when the package is being built and not when >> it is built. > > > If you detail exactly (down to command line steps) what it takes to > reproduce this, I'll take a look. I still think it's something wonky in > setup.py, I've never heard of anything like this.. whether or not it > works on Linux. > > -bob > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > Bob, 1. Do a CVS checkout of the PythonCard package from Sourceforge; $ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/pythoncard login $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/pythoncard co PythonCard 2. Change into the PythonCard directory and build the distribution; $ cd PythonCard $ python setup.py sdist --formats=gzip 3. This will build a PythonCard-0.8.1.tar.gz in the 'dist' subdirectory, copy that to /tmp $ cd dist $ cp PythonCard-0.8.1.tar.gz /tmp 4. Perform the setup install ritual (with incantations); $ cd /tmp $ tar -zxvf PythonCard-0.8.1.tar.gz $ cd PythonCard-0.8.1/ $ python setup.py install You did do the last step as a super user didn't you? If not try again. 5. Then, if steps 1 to 3 were built on Mac OSX you will have a 'build' directory under your site-packages/PythonCard directory, if it's *nix you won't. Not sure about Windows because I haven't got a box handy to check and no one on this list is likely to care. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ From andy47 at halfcooked.com Fri Aug 20 22:22:39 2004 From: andy47 at halfcooked.com (Andy Todd) Date: Fri Aug 20 22:22:56 2004 Subject: [Pythonmac-SIG] Re: Fwd: [Pythoncard-users] Re: Item missing from PythonCard 0.8 install? In-Reply-To: References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> <8E2687BA-F2D7-11D8-945F-000A95686CD8@redivi.com> Message-ID: Andy Todd wrote: > Bob Ippolito wrote: > >> >> On Aug 20, 2004, at 2:24 PM, Andy Todd wrote: >> >>> Bob Ippolito wrote: >>> >>>> On Aug 20, 2004, at 12:29 PM, Kevin Altis wrote: >>>> >>>>> Begin forwarded message: >>>>> >>>>>> From: "Andy Todd" >>>>>> Date: August 20, 2004 9:24:15 AM PDT >>>>>> To: "Kevin Altis" >>>>>> Cc: "pythoncard-Users" >>>>>> Subject: Re: [Pythoncard-users] Re: Item missing from PythonCard >>>>>> 0.8 install? >>>>>> >>>>>> Kevin Altis wrote: >>>>>> >>>>>>> >>>>> >>>>> >>>>>>> There is one other bit of weirdness on the Mac that I don't >>>>>>> really understand since I don't remember distutils doing this >>>>>>> before. It is copying all the package files to >>>>>>> /Library/Python2.3/PythonCard and then creating a build >>>>>>> directory with lib/PythonCard and scripts-2.3 dirs inside that. >>>>>>> Does Linux do that too? Perhaps I need to revise the commands I >>>>>>> run and/or setup.py script, but this is clearly wrong, though >>>>>>> harmless, except for burning additional disk space. Did I >>>>>>> mention that distutils is my nemesis? ;-) >>>>>> >>>>>> >>>>>> >>>>>> [snip] >>>>>> >>>>>> Hmm, I think it might just be you Kevin ;-) Downloading the >>>>>> tarball from SourceForge on my linux machine and running 'python >>>>>> setup.py install' gives me the build directory under >>>>>> /usr/lib/python2.3/site-packages/PythonCard >>>>>> >>>>>> But, when I do a fresh check out of the PythonCard module and >>>>>> build my own tarball (using 'python setup.py sdist >>>>>> --formats=gztar') the problem disappears. >>>>>> >>>>>> When I do the same thing on my Mac I see the same problem that you >>>>>> do. Ergo, it's a bug in Python 2.3.0 which was fixed in one of the >>>>>> releases up to 2.3.4 (which I'm running on Linux). >>>>>> >>>>>> Do you want me to build a 0.8 tarball on my machine? Or should we >>>>>> wait until a few more fixes are in and include this in 0.8.1? >>>>> >>>>> >>>>> >>>>> Is there a distutils bug in Python 2.3.0 on Mac OS X (Panther) that >>>>> was fixed in later releases? See the message below. If so, I guess >>>>> I'll have to start building the tar.gz files on a different OS. >>>> >>>> >>>> It's not clear to me exactly what you are saying.. What is this >>>> "build directory" lib/PythonCard and scripts-2.3? Could you please >>>> show the full paths on both platforms and explain in more detail why >>>> this is wrong? >>>> It sounds like a bug in the setup.py, not a bug in distutils. The >>>> equivalent of "/usr/lib/python2.3/site-packages" is >>>> "/Library/Python/2.3" on the Mac as installed by Apple (this is by >>>> way of symlink down in sys.prefix). >>>> -bob >>>> _______________________________________________ >>> >>> >>> >>> It's not a bug in the setup.py. If we build the package on linux and >>> then install it on linux or Mac OSX we get our root directory >>> (PythonCard) with subdirectories components, docs, samples, >>> templates, tests and tools - as expected. This is under >>> /usr/lib/python2.3/site-packages on linux or >>> /Library/Python/2.3/site-packages on the Mac. >>> >>> Build the same package on Mac OSX (10.3.4) and when it is installed >>> we get an additional directory called build under PythonCard. It's >>> not in the tarball. As far as I know this is a distutils working >>> directory which should only exist when the package is being built and >>> not when it is built. >> >> >> >> If you detail exactly (down to command line steps) what it takes to >> reproduce this, I'll take a look. I still think it's something wonky >> in setup.py, I've never heard of anything like this.. whether or not >> it works on Linux. >> >> -bob >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG@python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > > Bob, > > 1. Do a CVS checkout of the PythonCard package from Sourceforge; > > $ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/pythoncard login > > $ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/pythoncard > co PythonCard > > 2. Change into the PythonCard directory and build the distribution; > > $ cd PythonCard > $ python setup.py sdist --formats=gzip > > 3. This will build a PythonCard-0.8.1.tar.gz in the 'dist' subdirectory, > copy that to /tmp > > $ cd dist > $ cp PythonCard-0.8.1.tar.gz /tmp > > 4. Perform the setup install ritual (with incantations); > > $ cd /tmp > $ tar -zxvf PythonCard-0.8.1.tar.gz > $ cd PythonCard-0.8.1/ > $ python setup.py install > > You did do the last step as a super user didn't you? If not try again. > > 5. Then, if steps 1 to 3 were built on Mac OSX you will have a 'build' > directory under your site-packages/PythonCard directory, if it's *nix > you won't. Not sure about Windows because I haven't got a box handy to > check and no one on this list is likely to care. > > Regards, > Andy Actually, I think the problem is caused by user error - mine mainly. I need to do a little more investigation but by following my own instructions above I've built a tarball which install correctly on both platforms. If I get to the bottom of it I'll let you all know, sorry for wasting everyone's time. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ From delza at alliances.org Fri Aug 20 22:28:18 2004 From: delza at alliances.org (Dethe Elza) Date: Fri Aug 20 22:28:34 2004 Subject: [Pythonmac-SIG] Item missing from PythonCard 0.8 install? In-Reply-To: References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> <8E2687BA-F2D7-11D8-945F-000A95686CD8@redivi.com> Message-ID: <78AE9E6F-F2E7-11D8-B9C3-0003939B59E8@alliances.org> For what it's worth, I always get a ./build directory when I do "python setup.py build" on OS X, with any distutils setup. Since I rarely use distutils on other platforms, I didn't know this behaviour differed. I suspect it's still creating the build directory on other systems, but either a) deletes it afterwards, or b) puts it in /tmp or somewhere non-obvious. But I have no evidence for either handy. --Dethe Art is either plagiarism or revolution. --Paul Gauguin -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2367 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040820/62237ce3/smime.bin From bob at redivi.com Fri Aug 20 22:38:38 2004 From: bob at redivi.com (Bob Ippolito) Date: Fri Aug 20 22:38:44 2004 Subject: [Pythonmac-SIG] Item missing from PythonCard 0.8 install? In-Reply-To: <78AE9E6F-F2E7-11D8-B9C3-0003939B59E8@alliances.org> References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> <8E2687BA-F2D7-11D8-945F-000A95686CD8@redivi.com> <78AE9E6F-F2E7-11D8-B9C3-0003939B59E8@alliances.org> Message-ID: On Aug 20, 2004, at 4:28 PM, Dethe Elza wrote: > For what it's worth, I always get a ./build directory when I do > "python setup.py build" on OS X, with any distutils setup. Since I > rarely use distutils on other platforms, I didn't know this behaviour > differed. I suspect it's still creating the build directory on other > systems, but either a) deletes it afterwards, or b) puts it in /tmp or > somewhere non-obvious. But I have no evidence for either handy. That is expected behavior on all platforms, he is talking about when he makes a sdist tarball it includes the build directory. My feeling is that he screwed up MANIFEST.in or setup.py .. -bob From delza at alliances.org Fri Aug 20 22:52:52 2004 From: delza at alliances.org (Dethe Elza) Date: Fri Aug 20 22:53:10 2004 Subject: [Pythonmac-SIG] Item missing from PythonCard 0.8 install? In-Reply-To: References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> <8E2687BA-F2D7-11D8-945F-000A95686CD8@redivi.com> <78AE9E6F-F2E7-11D8-B9C3-0003939B59E8@alliances.org> Message-ID: Bob Ippolito wrote: >> For what it's worth, I always get a ./build directory when I do >> "python setup.py build" on OS X, with any distutils setup. Since I >> rarely use distutils on other platforms, I didn't know this behaviour >> differed. I suspect it's still creating the build directory on other >> systems, but either a) deletes it afterwards, or b) puts it in /tmp >> or somewhere non-obvious. But I have no evidence for either handy. > > That is expected behavior on all platforms, he is talking about when > he makes a sdist tarball it includes the build directory. My feeling > is that he screwed up MANIFEST.in or setup.py .. OK, thanks. I was wondering what the big deal was. --Dethe PowerPoint can make almost anything appear good and look professional. Quite frankly, I find that a little bit frightening. --David Byrne -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2367 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040820/e89850e1/smime.bin From andy47 at halfcooked.com Fri Aug 20 23:19:27 2004 From: andy47 at halfcooked.com (Andy Todd) Date: Fri Aug 20 23:19:32 2004 Subject: [Pythonmac-SIG] Re: Item missing from PythonCard 0.8 install? In-Reply-To: References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> <8E2687BA-F2D7-11D8-945F-000A95686CD8@redivi.com> <78AE9E6F-F2E7-11D8-B9C3-0003939B59E8@alliances.org> Message-ID: Bob Ippolito wrote: > > On Aug 20, 2004, at 4:28 PM, Dethe Elza wrote: > >> For what it's worth, I always get a ./build directory when I do >> "python setup.py build" on OS X, with any distutils setup. Since I >> rarely use distutils on other platforms, I didn't know this behaviour >> differed. I suspect it's still creating the build directory on other >> systems, but either a) deletes it afterwards, or b) puts it in /tmp or >> somewhere non-obvious. But I have no evidence for either handy. > > > That is expected behavior on all platforms, he is talking about when he > makes a sdist tarball it includes the build directory. My feeling is > that he screwed up MANIFEST.in or setup.py .. > > -bob > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > Actually I wasn't. My point was that the tarball does not include the build directory but that it ends up in our package directory under site-packages. Regardless, it's not a platform specific issue so I'll take it to the distutils mailing list. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ From rswerdlow at transpose.com Fri Aug 20 23:24:41 2004 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Fri Aug 20 23:24:47 2004 Subject: [Pythonmac-SIG] StandAlone Python Application Does not Release Python Message-ID: <001801c486fc$1e5a6e20$046fa8c0@RSWERDLOW800> I'm building a stand-alone Python application using PyObjC 1.1 and Python 2.3 on Panther. We've run into a problem: when we make a new release, the users find that they cannot copy it over the old release, even after they have quit the application - the Finder reports "The operation cannot be completed because the item 'Python' is in use." This only happens if the old release has been run and then quit. I look in the Activity Monitor and I don't see any processes from our application still running and the rest of my processes don't have that file open. The file that is "still in use" is MyApp.app/Contents/Frameworks/Python.framework/Versions/2.3/Python (I know because if I rename that file, the warning message reports the new name). If the user manually moves the old application to the trash then the new version can be copied with a problem. However, why is that file still in use and how do I avoid this? Thanks for your help, Bob From altis at semi-retired.com Fri Aug 20 23:26:42 2004 From: altis at semi-retired.com (Kevin Altis) Date: Fri Aug 20 23:26:49 2004 Subject: [Pythonmac-SIG] Item missing from PythonCard 0.8 install? In-Reply-To: References: <1EFADC5E-F2C6-11D8-9EC7-000A9598382A@semi-retired.com> <3E00E54E-F2CB-11D8-945F-000A95686CD8@redivi.com> <8E2687BA-F2D7-11D8-945F-000A95686CD8@redivi.com> <78AE9E6F-F2E7-11D8-B9C3-0003939B59E8@alliances.org> Message-ID: On Aug 20, 2004, at 1:38 PM, Bob Ippolito wrote: > > On Aug 20, 2004, at 4:28 PM, Dethe Elza wrote: > >> For what it's worth, I always get a ./build directory when I do >> "python setup.py build" on OS X, with any distutils setup. Since I >> rarely use distutils on other platforms, I didn't know this behaviour >> differed. I suspect it's still creating the build directory on other >> systems, but either a) deletes it afterwards, or b) puts it in /tmp >> or somewhere non-obvious. But I have no evidence for either handy. > > That is expected behavior on all platforms, he is talking about when > he makes a sdist tarball it includes the build directory. My feeling > is that he screwed up MANIFEST.in or setup.py .. > Actually, we were talking about the install and not the sdist. I think the explanation is that the MANIFEST.in or setup.py is not specifically excluding build and dist dirs. So, what happens is the very first time you run sudo python setup.py install It works as expected and just creates the build directory where you are running setup.py, but that doesn't end up in the package dir copied to site-packages. However, subsequent runs of install, which we were doing because of testing the install process, end up copying the build dir. So, initially I was confused because after running sdist I had a build dir in PythonCard dir that I just ran setup.py sdist, so when I did the install of course I got a build dir where I didn't expect it. I'm so used to just running the standalone installer on Windows where this situation can't occur or doing a fresh install from a new download and then not repeating the build/install process, that I hadn't come across this problem before. ka From bob at redivi.com Fri Aug 20 23:42:18 2004 From: bob at redivi.com (Bob Ippolito) Date: Fri Aug 20 23:43:02 2004 Subject: [Pythonmac-SIG] how do you determine if you're running a bundlebuilder standalone? In-Reply-To: <0C4B529E-F2D4-11D8-9EC7-000A9598382A@semi-retired.com> References: <0C4B529E-F2D4-11D8-9EC7-000A9598382A@semi-retired.com> Message-ID: On Aug 20, 2004, at 2:09 PM, Kevin Altis wrote: > I have the following function for determining at runtime whether a > program is running standalone, but it needs to be updated for Mac OS X > and bundlebuilder. > > # Thomas Heller's function for determining > # if a module is running standalone > def main_is_frozen(): > return (hasattr(sys, "importers") # py2exe > or imp.is_frozen("__main__") # cx_freeze or tools/freeze > or hasattr(sys, "frozen") # McMillan installer > ) > > What's the magic attribute for bundlebuilder standalones? bundlebuilder sets no such magic attribute to my knowledge. From PyObjC you can tell by looking at NSBundle.mainBundle(). Depending on how the bundle is built, you might be able to tell by looking at sys.executable or sys.prefix. Not sure. py2app, when it's done, will behave more like py2exe in this regard. -bob From bob at redivi.com Fri Aug 20 23:44:05 2004 From: bob at redivi.com (Bob Ippolito) Date: Fri Aug 20 23:44:41 2004 Subject: [Pythonmac-SIG] StandAlone Python Application Does not Release Python In-Reply-To: <001801c486fc$1e5a6e20$046fa8c0@RSWERDLOW800> References: <001801c486fc$1e5a6e20$046fa8c0@RSWERDLOW800> Message-ID: <0EF6B401-F2F2-11D8-868F-000A95686CD8@redivi.com> On Aug 20, 2004, at 5:24 PM, Bob Swerdlow wrote: > I'm building a stand-alone Python application using PyObjC 1.1 and > Python > 2.3 on Panther. We've run into a problem: when we make a new release, > the > users find that they cannot copy it over the old release, even after > they > have quit the application - the Finder reports "The operation cannot be > completed because the item 'Python' is in use." > > This only happens if the old release has been run and then quit. I > look in > the Activity Monitor and I don't see any processes from our application > still running and the rest of my processes don't have that file open. > The > file that is "still in use" is > MyApp.app/Contents/Frameworks/Python.framework/Versions/2.3/Python (I > know > because if I rename that file, the warning message reports the new > name). > > If the user manually moves the old application to the trash then the > new > version can be copied with a problem. However, why is that file still > in > use and how do I avoid this? I think this has something to do with the fact that bundlebuilder uses a script stub that is execve'd. You should try using the PyObjC Xcode template until there is a release of py2app or bundlebuilder2 that uses a proper executable stub. -bob From bob at redivi.com Sat Aug 21 00:06:19 2004 From: bob at redivi.com (Bob Ippolito) Date: Sat Aug 21 00:06:54 2004 Subject: [Pythonmac-SIG] how do you determine if you're running a bundlebuilder standalone? In-Reply-To: <0C4B529E-F2D4-11D8-9EC7-000A9598382A@semi-retired.com> References: <0C4B529E-F2D4-11D8-9EC7-000A9598382A@semi-retired.com> Message-ID: <2A550D58-F2F5-11D8-868F-000A95686CD8@redivi.com> On Aug 20, 2004, at 2:09 PM, Kevin Altis wrote: > I have the following function for determining at runtime whether a > program is running standalone, but it needs to be updated for Mac OS X > and bundlebuilder. > > # Thomas Heller's function for determining > # if a module is running standalone > def main_is_frozen(): > return (hasattr(sys, "importers") # py2exe > or imp.is_frozen("__main__") # cx_freeze or tools/freeze > or hasattr(sys, "frozen") # McMillan installer > ) > > What's the magic attribute for bundlebuilder standalones? FWIW, I don't think hasattr(sys, "importers") is ever true on py2exe, at least not 0.5.3.. that word isn't in the source at all. It uses sys.frozen as well, which is what I plan on using for py2app (likely sys.frozen == 'macosx_app'). -bob From Jack.Jansen at cwi.nl Sat Aug 21 09:52:19 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Sat Aug 21 09:52:17 2004 Subject: [Pythonmac-SIG] StandAlone Python Application Does not Release Python In-Reply-To: <0EF6B401-F2F2-11D8-868F-000A95686CD8@redivi.com> References: <001801c486fc$1e5a6e20$046fa8c0@RSWERDLOW800> <0EF6B401-F2F2-11D8-868F-000A95686CD8@redivi.com> Message-ID: <071CFF8C-F347-11D8-85FD-000D934FF6B4@cwi.nl> On 20 Aug 2004, at 23:44, Bob Ippolito wrote: > > On Aug 20, 2004, at 5:24 PM, Bob Swerdlow wrote: > >> I'm building a stand-alone Python application using PyObjC 1.1 and >> Python >> 2.3 on Panther. We've run into a problem: when we make a new >> release, the >> users find that they cannot copy it over the old release, even after >> they >> have quit the application - the Finder reports "The operation cannot >> be >> completed because the item 'Python' is in use." > > I think this has something to do with the fact that bundlebuilder uses > a script stub that is execve'd. You should try using the PyObjC Xcode > template until there is a release of py2app or bundlebuilder2 that > uses a proper executable stub. BobI, could you explain, please? Someone else reported a similar problem (with Idle, I think?) where he/she also couldn't remove Python because it was in use, about half a year ago. At that time we never found out what the problem was... And, BobS, is there anything in your setup that could be considered out of the ordinary? Such as not running on HFS+ or over a network, or anything else you can think of? -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From bob at redivi.com Sat Aug 21 10:16:42 2004 From: bob at redivi.com (Bob Ippolito) Date: Sat Aug 21 10:17:19 2004 Subject: [Pythonmac-SIG] StandAlone Python Application Does not Release Python In-Reply-To: <071CFF8C-F347-11D8-85FD-000D934FF6B4@cwi.nl> References: <001801c486fc$1e5a6e20$046fa8c0@RSWERDLOW800> <0EF6B401-F2F2-11D8-868F-000A95686CD8@redivi.com> <071CFF8C-F347-11D8-85FD-000D934FF6B4@cwi.nl> Message-ID: <6F26A236-F34A-11D8-A9CD-000A95686CD8@redivi.com> On Aug 21, 2004, at 3:52 AM, Jack Jansen wrote: > > On 20 Aug 2004, at 23:44, Bob Ippolito wrote: > >> >> On Aug 20, 2004, at 5:24 PM, Bob Swerdlow wrote: >> >>> I'm building a stand-alone Python application using PyObjC 1.1 and >>> Python >>> 2.3 on Panther. We've run into a problem: when we make a new >>> release, the >>> users find that they cannot copy it over the old release, even after >>> they >>> have quit the application - the Finder reports "The operation cannot >>> be >>> completed because the item 'Python' is in use." >> >> I think this has something to do with the fact that bundlebuilder >> uses a script stub that is execve'd. You should try using the PyObjC >> Xcode template until there is a release of py2app or bundlebuilder2 >> that uses a proper executable stub. > > BobI, > could you explain, please? Someone else reported a similar problem > (with Idle, I think?) where he/she also couldn't remove Python because > it was in use, about half a year ago. At that time we never found out > what the problem was... It's just a guess, Im pretty sure I've seen it before myself once or twice, but I'm pretty sure I haven't seen it since I switched to the proper application stub. -bob From erik at letterror.com Sat Aug 21 12:15:47 2004 From: erik at letterror.com (Erik van Blokland) Date: Sat Aug 21 12:15:50 2004 Subject: [Pythonmac-SIG] Publicity opportunities In-Reply-To: <20040818154934.GA8472@lairds.us> References: <20040818154934.GA8472@lairds.us> Message-ID: <12156166-F35B-11D8-9E8E-000A956A726C@letterror.com> On 18 Aug 2004, at 17:49, Cameron Laird wrote: > Alex (Martelli) is working on a second printed edition of the Python > Cookbook. He's open to the idea of Mac-specific recipes. Can we > pull together and demonstrate for his readers how much Python enhances > MacOS use? I have some examples using CoreGraphics to make pdfs, process images and create visual mayhem. CG is wild stuff. Erik van Blokland From rswerdlow at transpose.com Sat Aug 21 16:38:50 2004 From: rswerdlow at transpose.com (Bob Swerdlow) Date: Sat Aug 21 16:39:09 2004 Subject: [Pythonmac-SIG] StandAlone Python Application Does not Release Python References: <001801c486fc$1e5a6e20$046fa8c0@RSWERDLOW800> <0EF6B401-F2F2-11D8-868F-000A95686CD8@redivi.com> <071CFF8C-F347-11D8-85FD-000D934FF6B4@cwi.nl> Message-ID: <00fd01c4878c$97fc44c0$046fa8c0@RSWERDLOW800> The only "out of the ordinary" setup stuff I do has to do with building in standalone with optimized code. We do use popen2 and start other processes, but I can see that they have all terminated when the application is stopped. In the build, we found that site.py was not pointing to the standalone files, so our build process goes this way (the app name is Goombah): 1. python buildapp.py --standalone --package=encodings --package=_strptime --package=u rllib2 build 2. save site.pyc to another location 3. python -OO buildapp.py --standalone --strip --package=encodings --package=_strptime --p ackage=urllib2 build 4. copy site.pyc into Goombah.Contents/Resources For completeness, here's the bundle definition: infoPlist = Plist( CFBundleDevelopmentRegion='English', CFBundleGetInfoString='Goombah ' + COOLTUNES_VERSION, CFBundleHelpBookFolder='Goombah Help', CFBundleHelpBookName='Goombah Help', CFBundleIconFile='Goombah.icns', CFBundleIdentifier='com.transpose.goombah', CFBundleInfoDictionaryVersion='6.0', CFBundleName='Goombah', CFBundlePackageType='APPL', CFBundleShortVersionString='BETA TESTING', CFBundleSignature='GMBH', CFBundleVersion=COOLTUNES_VERSION, NSHumanReadableCopyright='Copyright 2001-2004 Transpose, LLC\nAll rights res erved.', NSMainNibFile='MainMenu', NSPrincipalClass='NSApplication' ) buildapp( name = "Goombah", mainprogram = "cooltunesmain" + ".py", resources = ["MainMenu.nib", "MacPleaseWaitDialog.nib", "MacProgressDialog.nib"] + \ creditDocs + helpDocs + iconFiles + \ getblogurlSrcs + libchangesSrcs + macuiSrcs + pyclientSrcs + termsDocs, nibname = "MainMenu", plist = infoPlist ) ----- Original Message ----- From: "Jack Jansen" To: "Bob Ippolito" Cc: "Bob Swerdlow" ; ; "Gary Robinson" Sent: Saturday, August 21, 2004 3:52 AM Subject: Re: [Pythonmac-SIG] StandAlone Python Application Does not Release Python > > On 20 Aug 2004, at 23:44, Bob Ippolito wrote: > > > > > On Aug 20, 2004, at 5:24 PM, Bob Swerdlow wrote: > > > >> I'm building a stand-alone Python application using PyObjC 1.1 and > >> Python > >> 2.3 on Panther. We've run into a problem: when we make a new > >> release, the > >> users find that they cannot copy it over the old release, even after > >> they > >> have quit the application - the Finder reports "The operation cannot > >> be > >> completed because the item 'Python' is in use." > > > > I think this has something to do with the fact that bundlebuilder uses > > a script stub that is execve'd. You should try using the PyObjC Xcode > > template until there is a release of py2app or bundlebuilder2 that > > uses a proper executable stub. > > BobI, > could you explain, please? Someone else reported a similar problem > (with Idle, I think?) where he/she also couldn't remove Python because > it was in use, about half a year ago. At that time we never found out > what the problem was... > > And, BobS, is there anything in your setup that could be considered out > of the ordinary? Such as not running on HFS+ or over a network, or > anything else you can think of? > -- > Jack Jansen, , http://www.cwi.nl/~jack > If I can't dance I don't want to be part of your revolution -- Emma > Goldman > > From bob at redivi.com Sat Aug 21 21:13:52 2004 From: bob at redivi.com (Bob Ippolito) Date: Sat Aug 21 21:14:29 2004 Subject: [Pythonmac-SIG] how do you determine if you're running a bundlebuilder standalone? In-Reply-To: <0C4B529E-F2D4-11D8-9EC7-000A9598382A@semi-retired.com> References: <0C4B529E-F2D4-11D8-9EC7-000A9598382A@semi-retired.com> Message-ID: <3D159CDD-F3A6-11D8-BD35-000A95686CD8@redivi.com> On Aug 20, 2004, at 2:09 PM, Kevin Altis wrote: > I have the following function for determining at runtime whether a > program is running standalone, but it needs to be updated for Mac OS X > and bundlebuilder. > > # Thomas Heller's function for determining > # if a module is running standalone > def main_is_frozen(): > return (hasattr(sys, "importers") # py2exe > or imp.is_frozen("__main__") # cx_freeze or tools/freeze > or hasattr(sys, "frozen") # McMillan installer > ) > > What's the magic attribute for bundlebuilder standalones? Why do you need to know if something is "frozen" with bundlebuilder anyway? Knowing whether it's standalone or not doesn't do much for you.. I'm sure there's a method that will determine what you want to actually know whether or not it is standalone. -bob From altis at semi-retired.com Sat Aug 21 21:20:13 2004 From: altis at semi-retired.com (Kevin Altis) Date: Sat Aug 21 21:20:26 2004 Subject: [Pythonmac-SIG] how do you determine if you're running a bundlebuilder standalone? In-Reply-To: <3D159CDD-F3A6-11D8-BD35-000A95686CD8@redivi.com> References: <0C4B529E-F2D4-11D8-9EC7-000A9598382A@semi-retired.com> <3D159CDD-F3A6-11D8-BD35-000A95686CD8@redivi.com> Message-ID: <207481D2-F3A7-11D8-9EC7-000A9598382A@semi-retired.com> On Aug 21, 2004, at 12:13 PM, Bob Ippolito wrote: > > On Aug 20, 2004, at 2:09 PM, Kevin Altis wrote: > >> I have the following function for determining at runtime whether a >> program is running standalone, but it needs to be updated for Mac OS >> X and bundlebuilder. >> >> # Thomas Heller's function for determining >> # if a module is running standalone >> def main_is_frozen(): >> return (hasattr(sys, "importers") # py2exe >> or imp.is_frozen("__main__") # cx_freeze or tools/freeze >> or hasattr(sys, "frozen") # McMillan installer >> ) >> >> What's the magic attribute for bundlebuilder standalones? > > Why do you need to know if something is "frozen" with bundlebuilder > anyway? Knowing whether it's standalone or not doesn't do much for > you.. I'm sure there's a method that will determine what you want to > actually know whether or not it is standalone. > The main reason I use it is that with PythonCard there are a number of default configuration files that are stored in the package directory, that wouldn't normally be available when running a standalone. When PythonCard is run for the first time on a users system, these files are copied to ~/pythoncard_config and then the user-specific versions are used. When someone builds a standalone, they can copy these files into their local directory if they want to keep the same functionality as someone that would have the full package installed or they can just rely on the default configs that are part of the Python code. So, in the configuration.py module of PythonCard is specifically checks for whether the code is running standalone or not and then sets the config path accordingly, so the user code doesn't really have to worry about these kind of details. ka From bob at redivi.com Sat Aug 21 21:31:35 2004 From: bob at redivi.com (Bob Ippolito) Date: Sat Aug 21 21:32:13 2004 Subject: [Pythonmac-SIG] how do you determine if you're running a bundlebuilder standalone? In-Reply-To: <207481D2-F3A7-11D8-9EC7-000A9598382A@semi-retired.com> References: <0C4B529E-F2D4-11D8-9EC7-000A9598382A@semi-retired.com> <3D159CDD-F3A6-11D8-BD35-000A95686CD8@redivi.com> <207481D2-F3A7-11D8-9EC7-000A9598382A@semi-retired.com> Message-ID: On Aug 21, 2004, at 3:20 PM, Kevin Altis wrote: > On Aug 21, 2004, at 12:13 PM, Bob Ippolito wrote: > >> >> On Aug 20, 2004, at 2:09 PM, Kevin Altis wrote: >> >>> I have the following function for determining at runtime whether a >>> program is running standalone, but it needs to be updated for Mac OS >>> X and bundlebuilder. >>> >>> # Thomas Heller's function for determining >>> # if a module is running standalone >>> def main_is_frozen(): >>> return (hasattr(sys, "importers") # py2exe >>> or imp.is_frozen("__main__") # cx_freeze or tools/freeze >>> or hasattr(sys, "frozen") # McMillan installer >>> ) >>> >>> What's the magic attribute for bundlebuilder standalones? >> >> Why do you need to know if something is "frozen" with bundlebuilder >> anyway? Knowing whether it's standalone or not doesn't do much for >> you.. I'm sure there's a method that will determine what you want to >> actually know whether or not it is standalone. >> > > The main reason I use it is that with PythonCard there are a number of > default configuration files that are stored in the package directory, > that wouldn't normally be available when running a standalone. When > PythonCard is run for the first time on a users system, these files > are copied to ~/pythoncard_config and then the user-specific versions > are used. When someone builds a standalone, they can copy these files > into their local directory if they want to keep the same functionality > as someone that would have the full package installed or they can just > rely on the default configs that are part of the Python code. So, in > the configuration.py module of PythonCard is specifically checks for > whether the code is running standalone or not and then sets the config > path accordingly, so the user code doesn't really have to worry about > these kind of details. Ok so why not check for os.path.join(os.path.dirname(getattr(sys.modules['__main__'], '__file__', '')), 'pythoncard_config'), then os.path.join(os.path.expanduser('~'), 'pythoncard_config'), then the package path, whatever that may be? -bob From eichin at metacarta.com Sat Aug 21 23:22:42 2004 From: eichin at metacarta.com (eichin@metacarta.com) Date: Sat Aug 21 23:22:49 2004 Subject: [Pythonmac-SIG] StandAlone Python Application Does not Release Python In-Reply-To: <001801c486fc$1e5a6e20$046fa8c0@RSWERDLOW800> References: <001801c486fc$1e5a6e20$046fa8c0@RSWERDLOW800> Message-ID: <7g3c2guqxp.fsf@pikespeak.metacarta.com> > 2.3 on Panther. We've run into a problem: when we make a new release, the > users find that they cannot copy it over the old release, even after they > have quit the application - the Finder reports "The operation cannot be > completed because the item 'Python' is in use." > This only happens if the old release has been run and then quit. ... FYI I've seen Jaeger (cross-platform blogreader, written in python, blogmatrix.com) do the exact same thing, so it's not a unique problem... From bob at redivi.com Sat Aug 21 23:50:35 2004 From: bob at redivi.com (Bob Ippolito) Date: Sat Aug 21 23:51:12 2004 Subject: [Pythonmac-SIG] StandAlone Python Application Does not Release Python In-Reply-To: <7g3c2guqxp.fsf@pikespeak.metacarta.com> References: <001801c486fc$1e5a6e20$046fa8c0@RSWERDLOW800> <7g3c2guqxp.fsf@pikespeak.metacarta.com> Message-ID: <221DD2D4-F3BC-11D8-845D-000A95686CD8@redivi.com> On Aug 21, 2004, at 5:22 PM, eichin@metacarta.com wrote: >> 2.3 on Panther. We've run into a problem: when we make a new >> release, the >> users find that they cannot copy it over the old release, even after >> they >> have quit the application - the Finder reports "The operation cannot >> be >> completed because the item 'Python' is in use." >> This only happens if the old release has been run and then quit. ... > > FYI I've seen Jaeger (cross-platform blogreader, written in python, > blogmatrix.com) do the exact same thing, so it's not a unique > problem... Has anyone using the PyObjC Xcode template seen anything like this? I have a strong suspicion that it's related to some combination of an OS bug and the execve hack that bundlebuilder uses, but since I consider that method deprecated I have no interest in investigating the issue unless someone can reproduce it with a proper application stub. -bob From gandreas at delver.com Sun Aug 22 01:25:11 2004 From: gandreas at delver.com (Glenn Andreas) Date: Sun Aug 22 01:26:42 2004 Subject: [Pythonmac-SIG] ANN: PyOXIDE 0.6.4 - Cocoa based Python IDE Message-ID: PyOXIDE 0.6.4 is now available for abuse. There are two new "major" features - a palette of "snippets" (by default, Python Cookbook recipes that get downloaded), and the ability to build a simple bundled app for console IO scripts. There are also some bug fixes (especically in regular expression find & replace) and some speed improvements, and a built in "check for update" menu item. PyOXIDE 0.6.4 has only been tested with 10.3, but should work with 10.2 (assuming it can find the python framework). The sources are built using XCode 1.1 on 10.3. PyOXIDE 0.6.4 is now available on my idisk (as PyOXIDE_0.6.4.dmg): from the pather finder, "connect to other public folder" and type in "gandreas" or http://projects.gandreas.com/pyoxide/ If you want to build from source, you'll need to get PyOXIDE_Src_0.6.4.dmg, and IDEKit_0.2.4.dmg (also built XCode 1.2 on 10.3). IDEKit_0.2.4.dmg is found either on the idisk above or PyOXIDE source is covered under a BSD-style license. The IDEKit framework is covered under LGPL, so you can freely link it in other projects. -- Glenn Andreas gandreas@delver.com Author of Macintosh games: Theldrow 2.3, Blobbo 1.0.2, Cythera 1.0.2 Be good, and you will be lonesome From gandreas at gandreas.com Sat Aug 21 23:35:29 2004 From: gandreas at gandreas.com (glenn andreas) Date: Sun Aug 22 21:06:08 2004 Subject: [Pythonmac-SIG] ANN: PyOXIDE 0.6.4 - Cocoa based Python IDE Message-ID: PyOXIDE 0.6.4 is now available for abuse. There are two new "major" features - a palette of "snippets" (by default, Python Cookbook recipes that get downloaded), and the ability to build a simple bundled app for console IO scripts. There are also some bug fixes (especically in regular expression find & replace) and some speed improvements, and a built in "check for update" menu item. PyOXIDE 0.6.4 has only been tested with 10.3, but should work with 10.2 (assuming it can find the python framework). The sources are built using XCode 1.1 on 10.3. PyOXIDE 0.6.4 is now available on my idisk (as PyOXIDE_0.6.4.dmg): from the pather finder, "connect to other public folder" and type in "gandreas" or http://projects.gandreas.com/pyoxide/ If you want to build from source, you'll need to get PyOXIDE_Src_0.6.4.dmg, and IDEKit_0.2.4.dmg (also built XCode 1.2 on 10.3). IDEKit_0.2.4.dmg is found either on the idisk above or PyOXIDE source is covered under a BSD-style license. The IDEKit framework is covered under LGPL, so you can freely link it in other projects. -- Glenn Andreas gandreas@gandreas.com mondo blobbo, Cythera, Theldrow, oh my! Mad, Bad, and Dangerous to Know From Jack.Jansen at cwi.nl Tue Aug 24 23:38:23 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Tue Aug 24 23:38:27 2004 Subject: [Pythonmac-SIG] 10.3.5 packman database finally available Message-ID: It took a while, due to holidays and ssh key problems, but the 10.3.5 database for Package Manager is finally online. Sorry for the delay, -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From stefan.kirchberg at web.de Wed Aug 25 09:44:14 2004 From: stefan.kirchberg at web.de (Stefan Kirchberg) Date: Wed Aug 25 09:50:37 2004 Subject: [Pythonmac-SIG] Bluetooth functionality? Message-ID: <8FBD0AFD-F66A-11D8-A8DB-000A95DF1A38@web.de> Hi all, I'd like to access Bluetooth functions from Python but I just don't know how to start. There seems to be no such module, and documentation is also very scanty. Google found nothing either. I want to do a BT device discovery, ask a device for a list of provided services, pair a device, and finally use some service. Would be great to have an API similar to the Java JSR-82. Anyone got an idea..? Thanks in advance, cheers Stefan From nbastin at opnet.com Wed Aug 25 16:54:41 2004 From: nbastin at opnet.com (Nick Bastin) Date: Wed Aug 25 16:55:32 2004 Subject: [Pythonmac-SIG] Bluetooth functionality? In-Reply-To: <8FBD0AFD-F66A-11D8-A8DB-000A95DF1A38@web.de> References: <8FBD0AFD-F66A-11D8-A8DB-000A95DF1A38@web.de> Message-ID: On Aug 25, 2004, at 3:44 AM, Stefan Kirchberg wrote: > Hi all, > > I'd like to access Bluetooth functions from Python but I just don't > know how to start. There seems to be no such module, and documentation > is also very scanty. Google found nothing either. > > I want to do a BT device discovery, ask a device for a list of > provided services, pair a device, and finally use some service. Would > be great to have an API similar to the Java JSR-82. AFAIK, there is no module. You need to create a C extension module and wrap the bluetooth C API, which should be reasonably easy. -- Nick From bob at redivi.com Wed Aug 25 17:08:53 2004 From: bob at redivi.com (Bob Ippolito) Date: Wed Aug 25 17:09:28 2004 Subject: [Pythonmac-SIG] Bluetooth functionality? In-Reply-To: References: <8FBD0AFD-F66A-11D8-A8DB-000A95DF1A38@web.de> Message-ID: On Aug 25, 2004, at 10:54 AM, Nick Bastin wrote: > > On Aug 25, 2004, at 3:44 AM, Stefan Kirchberg wrote: > >> I'd like to access Bluetooth functions from Python but I just don't >> know how to start. There seems to be no such module, and >> documentation is also very scanty. Google found nothing either. >> >> I want to do a BT device discovery, ask a device for a list of >> provided services, pair a device, and finally use some service. Would >> be great to have an API similar to the Java JSR-82. > > AFAIK, there is no module. You need to create a C extension module > and wrap the bluetooth C API, which should be reasonably easy. Or you could use the IOBluetooth framework from PyObjC without writing any extension modules or C, which should be significantly easier. -bob From rayme at pobox.com Thu Aug 26 20:03:35 2004 From: rayme at pobox.com (Rayme Jernigan) Date: Thu Aug 26 20:03:40 2004 Subject: [Pythonmac-SIG] memory corruption Python 2.3/Mac OS 10.3? Message-ID: <4003EC57-F78A-11D8-9DD1-000A95AF4302@pobox.com> Hi All. I've been dealing with a nasty bug that looks a lot like memory corruption in the version of Python that comes installed on OS X 10.3.5. In short I have a list of lists that (without my telling it to) is filling itself up with copies of a list element instance. The instance value actually exists... it is defined elsewhere, and it's later assigned to the zeroth element of the list, but it magically gets assigned before I tell it to, and fills up the entire list to boot. Judicious placement of print statements before and after some operations on this list element which do not reference this "list of lists" verify that this is what's happening. Arggh. I run Python by pointing my BBEdit editor to PythonLancher from MacPython 2.3. Think this invokes the default Darwin install of "Python 2.3.0" (sys.version_info produces sys.version_info (2, 3, 0, 'final', 0). I read that one of the fixes to 2.3.3 was to fix a memory corruption problem that involved garbage collection: http://www.python.org/2.3.3/NEWS.html ... so Mac appears to have a pre-garbage collection bug fix version. But before I try to replace the default Darwin install Python 2.3.0 with something else, I wanted to verify that I'm on the right track. Has anyone heard of this problem in the OS X 10.3.5-ish installed version of Python? Is there a fix without the need to rip and replace? Thanks, -Rayme. From bob at redivi.com Thu Aug 26 20:51:50 2004 From: bob at redivi.com (Bob Ippolito) Date: Thu Aug 26 20:52:44 2004 Subject: [Pythonmac-SIG] memory corruption Python 2.3/Mac OS 10.3? In-Reply-To: <4003EC57-F78A-11D8-9DD1-000A95AF4302@pobox.com> References: <4003EC57-F78A-11D8-9DD1-000A95AF4302@pobox.com> Message-ID: On Aug 26, 2004, at 2:03 PM, Rayme Jernigan wrote: > Hi All. I've been dealing with a nasty bug that looks a lot like > memory corruption in the version of Python that comes installed on OS > X 10.3.5. > > In short I have a list of lists that (without my telling it to) is > filling itself up with copies of a list element instance. The instance > value actually exists... it is defined elsewhere, and it's later > assigned to the zeroth element of the list, but it magically gets > assigned before I tell it to, and fills up the entire list to boot. > Judicious placement of print statements before and after some > operations on this list element which do not reference this "list of > lists" verify that this is what's happening. Arggh. Please post a minimal example that demonstrates this bug. -bob From Chris.Barker at noaa.gov Thu Aug 26 21:02:40 2004 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu Aug 26 21:07:20 2004 Subject: [Pythonmac-SIG] memory corruption Python 2.3/Mac OS 10.3? In-Reply-To: <4003EC57-F78A-11D8-9DD1-000A95AF4302@pobox.com> References: <4003EC57-F78A-11D8-9DD1-000A95AF4302@pobox.com> Message-ID: <412E33D0.5070901@noaa.gov> Rayme Jernigan wrote: > I read that one of the fixes to 2.3.3 was to fix a memory corruption > problem that involved garbage collection: > http://www.python.org/2.3.3/NEWS.html It looks to me that those all involve wekrefs. Are you using weakrefs? As Bob said, an example would be very helpful > I run Python by pointing my BBEdit editor to PythonLancher from MacPython 2.3. Think this invokes the default Darwin install of "Python 2.3.0" (sys.version_info produces sys.version_info (2, 3, 0, 'final', 0). I doubt this is it, but try running your code form the command line in Terminal, just to make sure. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov From rayme at pobox.com Thu Aug 26 22:58:14 2004 From: rayme at pobox.com (Rayme Jernigan) Date: Thu Aug 26 22:58:20 2004 Subject: [Pythonmac-SIG] memory corruption Python 2.3/Mac OS 10.3? In-Reply-To: References: <4003EC57-F78A-11D8-9DD1-000A95AF4302@pobox.com> Message-ID: Chris, thanks. I'm not using the weakref module, so I don't think so. And as it happens, I've been directing the code to execute in the terminal. Bob, here's a somewhat minimized bit of code that illustrates the problem. It won't make much sense, but it runs. The interesting part occurs after the "While 1" loop is entered. I have a print statement to flag that for you in the output, as well as before and after print statements to bracket the area of apparent data corruption in "list_of_lists." Thanks. import random maxnumberofdatacycles = 10 datacyclecount = 0 event = 0 class NetClass: def __init__(self, inert, listsize, queuesize): self.inert = inert self.listsize = listsize self.queuesize = queuesize x = 0 # create a list for the list elements self.list_of_lists = [ ] node = [0,0,0,0,0,0,0] # initialize the list with empty list elements while x < self.listsize: self.list_of_lists.append(node) x += 1 # debug print "Initialized self.list_of_lists = ", self.list_of_lists def execute(self, event): self.event = event self.receiver = [0,0,0,0,0,0,0] index = 0 # values to index lists data elements data0 = 0 data1 = 1 data2 = 2 data3 = 3 data4 = 4 data5 = 5 # debug print "Intering the execute method ", self.list_of_lists # if this is a null event, return... youre done if self.event == 0: return (0,0) # get the first receiver self.receiver = self.list_of_lists[index] while 1: # debug print "Entered 'While 1' loop ", self.list_of_lists # is the data0 location zero? if self.receiver[data0] == 0: # debug print "List of lists before operations on unrelated data", self.list_of_lists # store the datacyclecount in the data3 loocation of the receiver self.receiver[data3] = datacyclecount # add the event to the data0 location in the receiver self.receiver[data0] = self.event # debug print "List of lists after operations on unrelated data", self.list_of_lists # put this event in the result location in the receiver self.receiver[data1] = self.event del (self.receiver) # return result return (0,1) class Generator: def __init__(self, range): self.range = self.series = range self.state = 0 def observer(self): if self.series == 0: self.series = random.randrange(1,self.range) if self.state == -1: self.state = 1 elif self.state == 1: self.state = -1 else: self.state = 1 return self.state else: self.series -= 1 return 0 # create a data generator system = Generator(10) # create a network net = NetClass(5,50,20) while datacyclecount <= maxnumberofdatacycles: # get new data event = system.observer() # send the event to the network and get a result back result = net.execute(event) # increment the data cycle counter datacyclecount += 1 On Aug 26, 2004, at 2:51 PM, Bob Ippolito wrote: > > On Aug 26, 2004, at 2:03 PM, Rayme Jernigan wrote: > >> Hi All. I've been dealing with a nasty bug that looks a lot like >> memory corruption in the version of Python that comes installed on OS >> X 10.3.5. >> >> In short I have a list of lists that (without my telling it to) is >> filling itself up with copies of a list element instance. The >> instance value actually exists... it is defined elsewhere, and it's >> later assigned to the zeroth element of the list, but it magically >> gets assigned before I tell it to, and fills up the entire list to >> boot. Judicious placement of print statements before and after some >> operations on this list element which do not reference this "list of >> lists" verify that this is what's happening. Arggh. > > Please post a minimal example that demonstrates this bug. > > -bob > > William R Jernigan Associates 2616 Huntsman Trail Zebulon, NC 27597 Phone: 919.269.0692 From eichin at metacarta.com Thu Aug 26 23:14:59 2004 From: eichin at metacarta.com (eichin@metacarta.com) Date: Thu Aug 26 23:16:13 2004 Subject: [Pythonmac-SIG] memory corruption Python 2.3/Mac OS 10.3? In-Reply-To: References: <4003EC57-F78A-11D8-9DD1-000A95AF4302@pobox.com> Message-ID: <7gk6vlfvos.fsf@pikespeak.metacarta.com> The following example should make it clearer to you what is happening (on linux python 2.1, as it happens, the behaviour is portable, and not a bug.) A clearer (as well as correct) version might use: list_of_lists.append([0] * len(node)) instead... #!/usr/bin/python x = 0 list_of_lists = [ ] node = [0,0,0,0,0,0,0] listsize = 3 # initialize the list with empty list elements while x < listsize: list_of_lists.append(node) x += 1 import pprint pprint.pprint(list_of_lists) # [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]] list_of_lists[1][5] = 3 pprint.pprint(list_of_lists) # [[0, 0, 0, 0, 0, 3, 0], [0, 0, 0, 0, 0, 3, 0], [0, 0, 0, 0, 0, 3, 0]] pprint.pprint(node) # [0, 0, 0, 0, 0, 3, 0] From bob at redivi.com Thu Aug 26 23:30:57 2004 From: bob at redivi.com (Bob Ippolito) Date: Thu Aug 26 23:31:36 2004 Subject: [Pythonmac-SIG] memory corruption Python 2.3/Mac OS 10.3? In-Reply-To: References: <4003EC57-F78A-11D8-9DD1-000A95AF4302@pobox.com> Message-ID: <37DF33B4-F7A7-11D8-A811-000A95686CD8@redivi.com> On Aug 26, 2004, at 4:58 PM, Rayme Jernigan wrote: > Chris, thanks. I'm not using the weakref module, so I don't think so. > And as it happens, I've been directing the code to execute in the > terminal. > > Bob, here's a somewhat minimized bit of code that illustrates the > problem. It won't make much sense, but it runs. The interesting part > occurs after the "While 1" loop is entered. I have a print statement > to flag that for you in the output, as well as before and after print > statements to bracket the area of apparent data corruption in > "list_of_lists." Thanks. ---- > # create a list for the list elements > self.list_of_lists = [ ] > node = [0,0,0,0,0,0,0] > while x < self.listsize: > self.list_of_lists.append(node) > x += 1 Pretty much what I expected. This is a bug in your code, not in Python. What you probably want is self.list_of_lists.append(list(node)) or the like. You're appending *the same exact list object*. If you change one, it changes "them all", because they are the same list. -bob From rayme at pobox.com Fri Aug 27 15:59:11 2004 From: rayme at pobox.com (Rayme Jernigan) Date: Fri Aug 27 15:59:17 2004 Subject: [Pythonmac-SIG] memory corruption Python 2.3/Mac OS 10.3? In-Reply-To: <7gk6vlfvos.fsf@pikespeak.metacarta.com> References: <4003EC57-F78A-11D8-9DD1-000A95AF4302@pobox.com> <7gk6vlfvos.fsf@pikespeak.metacarta.com> Message-ID: <45D33360-F831-11D8-9DD1-000A95AF4302@pobox.com> Ack! Assignment creates references, not copies. A newbie mistake. Thanks for walking this out for me. Bob, you too, I appreciate your time. -Rayme. On Aug 26, 2004, at 5:14 PM, eichin@metacarta.com wrote: > The following example should make it clearer to you what is happening > (on linux python 2.1, as it happens, the behaviour is portable, and > not a bug.) A clearer (as well as correct) version might use: > > list_of_lists.append([0] * len(node)) > > instead... > > #!/usr/bin/python > > x = 0 > list_of_lists = [ ] > > node = [0,0,0,0,0,0,0] > > listsize = 3 > # initialize the list with empty list elements > while x < listsize: > list_of_lists.append(node) > x += 1 > > import pprint > pprint.pprint(list_of_lists) > # [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, > 0]] > list_of_lists[1][5] = 3 > pprint.pprint(list_of_lists) > # [[0, 0, 0, 0, 0, 3, 0], [0, 0, 0, 0, 0, 3, 0], [0, 0, 0, 0, 0, 3, 0]] > pprint.pprint(node) > # [0, 0, 0, 0, 0, 3, 0] > > William R Jernigan Associates 2616 Huntsman Trail Zebulon, NC 27597 Phone: 919.269.0692 From hengist.podd at virgin.net Fri Aug 27 16:49:36 2004 From: hengist.podd at virgin.net (has) Date: Fri Aug 27 16:53:08 2004 Subject: [Pythonmac-SIG] [ann] aemtypes+aemsend 0.1.1 posted Message-ID: Hi all, Unfinished, but there's some example scripts included that should give a fair idea of how it works: http://freespace.virgin.net/hamish.sanderson/aem-0.1.1.tar.gz Example: from aemtypes import * from aemsend import * #get version of application "TextEdit" textedit = Application('/Applications/TextEdit.app') event = textedit.event('core', 'getd', {'----':app.property('vers')}) version = event.send() Notes: - Nicely object-oriented API. Quite pleased with its usability, though the documentation on constructing references needs work as usage isn't at all obvious from Specifier classes alone. Probably needs a 'How-To' guide or something to walk new users through the theory and techniques. - I've decided to go with three packages for the base aem (Apple Event Manager bridge) layer: - aemtypes: encodes and decodes basic types and object specifiers - aemsend: constructs and sends Apple events to local and remote applications - aemreceive: handles incoming Apple events (basically an updated MiniAEFrame) - I've given up on earlier plans for aemtypes' object specifier classes to be [easily] extensible, and will instead implement the terminology-driven appscript layer using composition and delegation instead of inheritance/mixins. - If anyone has an example of MiniAEFrame in use, say as part of a simple BundleBuilder-based app, any chance I could take a peek? - Also, any pointers to info and examples on designing application Model layers in Python would be useful; trying to work out how best to implement a 'Python Scripting' framework a-la Cocoa Scripting, and how it could hook up to a Python-based application's object model. Questions, brickbats, etc. to the usual address. Cheers, has -- http://freespace.virgin.net/hamish.sanderson/ From jeremy.knope at gmail.com Fri Aug 27 17:47:43 2004 From: jeremy.knope at gmail.com (Jerome) Date: Fri Aug 27 17:47:49 2004 Subject: [Pythonmac-SIG] Rendezvous & Python Message-ID: <2c9aa7fe040827084711477ea2@mail.gmail.com> I'm trying to find a rendezvous solution to use in python, of course i know i can use the PyObjC to access OS X's rendezvous, although I'm not sure how to use the publishing part of it, at least not in a non-ui sense maybe. also i've found PyZeroconf, but it seems to lock up in some part of it, so you can't ctrl-C quit a program using it. although maybe this is a simple fix for it. I've been pondering if wrapping a C library for rendezvous would come out better, at least for cross-platform. or maybe pyzeroconf is fixable, just don't like the sticking... anybody got ideas? --jerome From anthonybaxter at gmail.com Fri Aug 27 18:01:25 2004 From: anthonybaxter at gmail.com (Anthony Baxter) Date: Fri Aug 27 18:01:27 2004 Subject: [Pythonmac-SIG] Rendezvous & Python In-Reply-To: <2c9aa7fe040827084711477ea2@mail.gmail.com> References: <2c9aa7fe040827084711477ea2@mail.gmail.com> Message-ID: On Fri, 27 Aug 2004 11:47:43 -0400, Jerome wrote: > I'm trying to find a rendezvous solution to use in python, of course i > know i can use the PyObjC to access OS X's rendezvous, although I'm > not sure how to use the publishing part of it, at least not in a > non-ui sense maybe. There's a few folks who've fiddled with this in Twisted - you could look at their work as a starting point: http://www.seapig.org/svn/twisted-rendezvous/ http://svn.twistedmatrix.com/cvs/trunk/sandbox/itamar/mdns/?root=Twisted From jeremy.knope at gmail.com Fri Aug 27 18:49:08 2004 From: jeremy.knope at gmail.com (Jerome) Date: Fri Aug 27 18:49:20 2004 Subject: [Pythonmac-SIG] Rendezvous & Python In-Reply-To: References: <2c9aa7fe040827084711477ea2@mail.gmail.com> Message-ID: <2c9aa7fe0408270949403acbe6@mail.gmail.com> thanks, i'll take a deeper look this time, i've looked at twisted before and for rendezvous parts but all i came up with was that it used the pyzeroconf module it seemed... probably should just use it and maybe try to figure out it's signal blocking deal... will have to play with it more but does anybody know how to publish a service with PyObjC sans UI, tried runloop stuff but i'm pretty much clueless in that area --jerome On Sat, 28 Aug 2004 02:01:25 +1000, Anthony Baxter wrote: > On Fri, 27 Aug 2004 11:47:43 -0400, Jerome wrote: > > I'm trying to find a rendezvous solution to use in python, of course i > > know i can use the PyObjC to access OS X's rendezvous, although I'm > > not sure how to use the publishing part of it, at least not in a > > non-ui sense maybe. > > There's a few folks who've fiddled with this in Twisted - you could > look at their work as a starting point: > > http://www.seapig.org/svn/twisted-rendezvous/ > http://svn.twistedmatrix.com/cvs/trunk/sandbox/itamar/mdns/?root=Twisted > From joaoleao at gmx.net Fri Aug 27 21:35:38 2004 From: joaoleao at gmx.net (=?ISO-8859-1?Q?Jo=E3o_Le=E3o?=) Date: Fri Aug 27 21:35:46 2004 Subject: [Pythonmac-SIG] Message in Terminal Message-ID: <4670ABBE-F860-11D8-8F15-000393967AF4@gmx.net> Hi list When I run a Python script through Terminal (for ex: "python somescript.py") terminal spits the following output: ## Component Manager: attempting to find symbols in a component alias of type (regR/carP/x!bt) This happens everytime I run a pygame script, although I haven't noticed any problem besides the message. Today it happened again with another script that produced intended output (a list of files in a directory) and it was really annoying to see the above message appear between the first and second lines of the output. It was obvious that the message is caused by subsequent code and not at initialization as I thought before. I was able to insulate the line that caused (in this particular case) the message. After importing CoreGraphics: img = CGImageImport(CGDataProviderCreateWithFilename(inputFile)) Any ideas? Has someone seen this message before? I have the standard Python 2.3 running on Panther 10.3.5 but I remember seeing this message at least since the first release of Panther. May it have something to do with the old and new Python (before and after Panther)? I remember that I didn't removed the old site-packages when I upgraded. Cheers _ jo?o -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1215 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040827/8de37973/attachment.bin From ray.slakinski at gmail.com Fri Aug 27 21:35:37 2004 From: ray.slakinski at gmail.com (Ray Slakinski) Date: Fri Aug 27 21:35:48 2004 Subject: [Pythonmac-SIG] Fun with appscript Message-ID: I just installed appscript, and I'm using it to add mp3 files to a playlist. I can get it to add the track to the main library, but am having some issues getting it over to the playlist. To add it to the main Library I used the following command: t.add('hardDrive:Users:kier:Desktop:hall.mp3') I have tried this to get it into a playlist: app(u'/Applications/iTunes.app').sources['Library'].playlists['myPlayList'].add('hardDrive:Users:kier:Desktop:hall.mp3') I've also tried to set the playlist (add('hardDrive:Users:kier:Desktop:hall.mp3').set) before adding, but the track never seems to want to go into the playlist. Any help would be great! -- [-----] Ray Slakinski GnuPG Fingerprint: 9065 5C54 2C4A B13B 52BB C37A 125B F012 08A7 0A54 Blog: http://ddll.sdf1.net From bob at redivi.com Fri Aug 27 21:40:24 2004 From: bob at redivi.com (Bob Ippolito) Date: Fri Aug 27 21:41:00 2004 Subject: [Pythonmac-SIG] Message in Terminal In-Reply-To: <4670ABBE-F860-11D8-8F15-000393967AF4@gmx.net> References: <4670ABBE-F860-11D8-8F15-000393967AF4@gmx.net> Message-ID: On Aug 27, 2004, at 3:35 PM, Jo?o Le?o wrote: > When I run a Python script through Terminal (for ex: "python > somescript.py") terminal spits the following output: > > ## Component Manager: attempting to find symbols in a component alias > of type (regR/carP/x!bt) > > This happens everytime I run a pygame script, although I haven't > noticed any problem besides the message. > Today it happened again with another script that produced intended > output (a list of files in a directory) and it was really annoying to > see the above message appear between the first and second lines of the > output. > It was obvious that the message is caused by subsequent code and not > at initialization as I thought before. > > I was able to insulate the line that caused (in this particular case) > the message. After importing CoreGraphics: > img = CGImageImport(CGDataProviderCreateWithFilename(inputFile)) > > Any ideas? Has someone seen this message before? > > I have the standard Python 2.3 running on Panther 10.3.5 but I > remember seeing this message at least since the first release of > Panther. > May it have something to do with the old and new Python (before and > after Panther)? I remember that I didn't removed the old site-packages > when I upgraded. This has nothing to do with Python. Some kind of Quicktime component or plugin you installer isn't built correctly and causes that warning whenever Quicktime is initialized. -bob From joaoleao at gmx.net Fri Aug 27 21:45:06 2004 From: joaoleao at gmx.net (=?ISO-8859-1?Q?Jo=E3o_Le=E3o?=) Date: Fri Aug 27 21:45:23 2004 Subject: [Pythonmac-SIG] Message in Terminal In-Reply-To: References: <4670ABBE-F860-11D8-8F15-000393967AF4@gmx.net> Message-ID: <988320D7-F861-11D8-8F15-000393967AF4@gmx.net> > > On Aug 27, 2004, at 3:35 PM, Jo?o Le?o wrote: > >> When I run a Python script through Terminal (for ex: "python >> somescript.py") terminal spits the following output: >> >> ## Component Manager: attempting to find symbols in a component alias >> of type (regR/carP/x!bt) >> >> This happens everytime I run a pygame script, although I haven't >> noticed any problem besides the message. >> Today it happened again with another script that produced intended >> output (a list of files in a directory) and it was really annoying to >> see the above message appear between the first and second lines of >> the output. >> It was obvious that the message is caused by subsequent code and not >> at initialization as I thought before. >> >> I was able to insulate the line that caused (in this particular case) >> the message. After importing CoreGraphics: >> img = CGImageImport(CGDataProviderCreateWithFilename(inputFile)) >> >> Any ideas? Has someone seen this message before? >> >> I have the standard Python 2.3 running on Panther 10.3.5 but I >> remember seeing this message at least since the first release of >> Panther. >> May it have something to do with the old and new Python (before and >> after Panther)? I remember that I didn't removed the old >> site-packages when I upgraded. > > This has nothing to do with Python. Some kind of Quicktime component > or plugin you installer isn't built correctly and causes that warning > whenever Quicktime is initialized. > > -bob Thanks for the quick reply. Just to see if I get it clearer: do these modules "interact" somehow with QuickTime and that's the cause of the output? From bob at redivi.com Fri Aug 27 22:12:59 2004 From: bob at redivi.com (Bob Ippolito) Date: Fri Aug 27 22:13:40 2004 Subject: [Pythonmac-SIG] Message in Terminal In-Reply-To: <988320D7-F861-11D8-8F15-000393967AF4@gmx.net> References: <4670ABBE-F860-11D8-8F15-000393967AF4@gmx.net> <988320D7-F861-11D8-8F15-000393967AF4@gmx.net> Message-ID: <7DB85C5A-F865-11D8-A31B-000A95686CD8@redivi.com> On Aug 27, 2004, at 3:45 PM, Jo?o Le?o wrote: > >> >> On Aug 27, 2004, at 3:35 PM, Jo?o Le?o wrote: >> >>> When I run a Python script through Terminal (for ex: "python >>> somescript.py") terminal spits the following output: >>> >>> ## Component Manager: attempting to find symbols in a component >>> alias of type (regR/carP/x!bt) >>> >>> This happens everytime I run a pygame script, although I haven't >>> noticed any problem besides the message. >>> Today it happened again with another script that produced intended >>> output (a list of files in a directory) and it was really annoying >>> to see the above message appear between the first and second lines >>> of the output. >>> It was obvious that the message is caused by subsequent code and not >>> at initialization as I thought before. >>> >>> I was able to insulate the line that caused (in this particular >>> case) the message. After importing CoreGraphics: >>> img = CGImageImport(CGDataProviderCreateWithFilename(inputFile)) >>> >>> Any ideas? Has someone seen this message before? >>> >>> I have the standard Python 2.3 running on Panther 10.3.5 but I >>> remember seeing this message at least since the first release of >>> Panther. >>> May it have something to do with the old and new Python (before and >>> after Panther)? I remember that I didn't removed the old >>> site-packages when I upgraded. >> >> This has nothing to do with Python. Some kind of Quicktime component >> or plugin you installer isn't built correctly and causes that warning >> whenever Quicktime is initialized. > > Thanks for the quick reply. > Just to see if I get it clearer: do these modules "interact" somehow > with QuickTime and that's the cause of the output? CoreGraphics uses Quicktime to do import/export of various graphics formats. -bob From bob at redivi.com Fri Aug 27 22:28:27 2004 From: bob at redivi.com (Bob Ippolito) Date: Fri Aug 27 22:29:05 2004 Subject: [Pythonmac-SIG] Fwd: [ctypes-users] need help on Mac OS X Message-ID: Begin forwarded message: > From: Thomas Heller > Date: August 27, 2004 3:43:02 PM EDT > To: ctypes-users@lists.sourceforge.net > Subject: [ctypes-users] need help on Mac OS X > > Mac OS X is the only platform I have access to (*) that has a big > endian > architecture, where I was able to compile Python 2.3, and where it is > possible to build libffi. I have also seen related problems (**) on > sparc solaris, also on SF, but I was not able to compile Python 2.3 on > that system - py23 is now required by ctypes. > > I changed the unittests to do better error detecting, and now a lot of > them fails. I think this is a byte order problem, and probably I'm > using libffi in some wrong way. > > I would very much appreciate help from people using the Mac, or maybe > also other big endian architectures - I cannot spend even more time > with > this. Please grab the source from CVS (or wait a few days for the > 0.9.1 > release) and try to find the problems. > > Thanks, > > Thomas > > (*) on the sourceforge compile farm. Slow as molasses. > > (**) IIRC, I got seg faults due accesses to unaligned data types. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > ctypes-users mailing list > ctypes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ctypes-users From hengist.podd at virgin.net Sat Aug 28 02:23:42 2004 From: hengist.podd at virgin.net (has) Date: Sat Aug 28 02:24:26 2004 Subject: [Pythonmac-SIG] Fun with appscript In-Reply-To: References: Message-ID: Ray Slakinski wrote: >I just installed appscript, and I'm using it to add mp3 files to a playlist. > >To add it to the main Library I used the following command: > >t.add('hardDrive:Users:kier:Desktop:hall.mp3') See the terminology for 'add' (use the RenderAppTerminology applet to render it as HTML): add(...) -- add one or more files to a playlist list of Alias -- the file(s) to add [to=InsertionLoc] -- the location of the added file(s) Result: k.track -- reference to added track(s) Try: from Carbon.File import FSSpec itunes.add(FSSpec('/Users/kier/Desktop/hall.mp3'), to=itunes.sources['Library'].playlists['myPlayList']) HTH has -- Notes: 1. The type shown for the 'to' parameter appears to be incorrect (I tried using an insertion location and iTunes raised an error), but works with a reference to the playlist as you were doing. (Broken terminology resources and flawed or buggy implementations can be the bane of the application scripter's life, and Apple's own applications are less than perfect.) 2. The Apple Event Manager includes coercions for FSSpec->Alias and item->list-of-item, which gives some flexibility in what you can pass it, so use an FSSpec as that's easiest (I've no idea how to instantiate Carbon.File.Alias and the documentation isn't very helpful). 3. Unlike the standard 'make' command, there isn't a special case for 'add' that'd allow you to write insertionloc.add(fss), so for now you're stuck with the formal version: app.add(fss, to=insertionloc) -- http://freespace.virgin.net/hamish.sanderson/ From rodneys at io.com Sat Aug 28 23:09:18 2004 From: rodneys at io.com (Rodney Somerstein) Date: Sat Aug 28 23:09:25 2004 Subject: [Pythonmac-SIG] MacPython and .pyc files In-Reply-To: <20040823100028.C8D8E1E400D@bag.python.org> References: <20040823100028.C8D8E1E400D@bag.python.org> Message-ID: I am learning to use Python under Mac OS 10.3.5 and Python 2.3. Despite what Learning Python tells me, Python doesn't seem to generate .pyc files. What changes do I need to make in order to have this happen? I suspect it is some kind of simple Unix permissions issue to allow Python to write the files. Thanks, -Rodney -- ------------------------------------------------------------------- Rodney Somerstein rodneys@io.com From bob at redivi.com Sat Aug 28 23:17:31 2004 From: bob at redivi.com (Bob Ippolito) Date: Sat Aug 28 23:18:27 2004 Subject: [Pythonmac-SIG] MacPython and .pyc files In-Reply-To: References: <20040823100028.C8D8E1E400D@bag.python.org> Message-ID: On Aug 28, 2004, at 5:09 PM, Rodney Somerstein wrote: > I am learning to use Python under Mac OS 10.3.5 and Python 2.3. > Despite what Learning Python tells me, Python doesn't seem to generate > .pyc files. What changes do I need to make in order to have this > happen? I suspect it is some kind of simple Unix permissions issue to > allow Python to write the files. It generates .pyc files when appropriate, you really shouldn't worry about it. This part of the tutorial has a little more information: http://docs.python.org/tut/node8.html#SECTION008120000000000000000 -bob From rodneys at io.com Sat Aug 28 23:39:59 2004 From: rodneys at io.com (Rodney Somerstein) Date: Sat Aug 28 23:40:04 2004 Subject: [Pythonmac-SIG] More newbie questions In-Reply-To: References: <20040823100028.C8D8E1E400D@bag.python.org> Message-ID: Thanks for the quick response about generating .pyc files. I noticed that when I do an import, it seems to generate the .pyc file. Simply running the file via python doesn't produce the .pyc file. Since my programs are tiny right now anyway, the load speed isn't really an issue. I'll not worry about this right now as suggested. This next one is a bit more of an issue, though. How can I get imports to work from the command line in IDLE or PythonIDE? I can't seem to figure out any way to set the current working directory. Trying to put the full path on the command line simply results in an error. This might be simple, but it is stumping me and the limited documentation doesn't seem to help. Do I have to set the sys.path to include my scripts directory (/Users/rodneys/Documents/python)? If so, how do I go about this? Hopefully I'll be moving on to some actual interesting programming questions in the near future. Thanks, -Rodney From jdhunter at ace.bsd.uchicago.edu Sat Aug 28 23:58:55 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Sun Aug 29 00:48:09 2004 Subject: [Pythonmac-SIG] python with readline support Message-ID: I just installed GNU readline 5.0 on my OSX 10.3 powerbook G4. I would like to have python with readline support. I am using the framework /System/Library/Frameworks/Python.framework/Versions/2.3/bin/python2.3 which reports python2.3 (#1, Sep 13 2003..) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495] on darwin My question is: is there an easy way to get readline support in python. Normally you have to rebuild it. Has anyone done this (how would I rebuild python if using the framework?) Does someone have a binary compatible python2.3 with readline support that they could email me and I could just drop in place of the executable listed above? Thanks, John Hunter From jwt at onjapan.net Sun Aug 29 01:39:14 2004 From: jwt at onjapan.net (Jim Tittsler) Date: Sun Aug 29 01:39:06 2004 Subject: [Pythonmac-SIG] python with readline support In-Reply-To: References: Message-ID: <789BEAF5-F94B-11D8-B352-000A957919FA@onjapan.net> On Aug 29, 2004, at 06:58, John Hunter wrote: > My question is: is there an easy way to get readline support in > python. Normally you have to rebuild it. Has anyone done this (how The *easiest* method is to install it with the PackageManager (AKA Python Install Manager, AKA Package Install Manager for Python) which is part of the MacPython addons you can download from readline support is in one of the "official" packages, so you can download and install it with just a few clicks. -- Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6 Python Starship http://Starship.Python.net/ Ringo MUG Tokyo http://www.ringo.net/rss.html From calvin at xmission.com Sun Aug 29 02:21:56 2004 From: calvin at xmission.com (Calvin) Date: Sun Aug 29 02:22:00 2004 Subject: [Pythonmac-SIG] More newbie questions In-Reply-To: from "Rodney Somerstein" at Aug 28, 2004 05:39:59 PM Message-ID: > This next one is a bit more of an issue, though. How can I get > imports to work from the command line in IDLE or PythonIDE? I can't > seem to figure out any way to set the current working directory. > Trying to put the full path on the command line simply results in an > error. This might be simple, but it is stumping me and the limited > documentation doesn't seem to help. Do I have to set the sys.path to > include my scripts directory (/Users/rodneys/Documents/python)? If > so, how do I go about this? My cheap-o answer to this problem is either to use terminal and start python from the directory where your objects are (my prefered method) or import os and os.chdir('your path') then you can import the objects in that directory. Of course, I did this from terminal so your mileage may vary. -calvin From bob at redivi.com Sun Aug 29 02:32:42 2004 From: bob at redivi.com (Bob Ippolito) Date: Sun Aug 29 02:33:22 2004 Subject: [Pythonmac-SIG] More newbie questions In-Reply-To: References: Message-ID: On Aug 28, 2004, at 8:21 PM, Calvin wrote: >> This next one is a bit more of an issue, though. How can I get >> imports to work from the command line in IDLE or PythonIDE? I can't >> seem to figure out any way to set the current working directory. >> Trying to put the full path on the command line simply results in an >> error. This might be simple, but it is stumping me and the limited >> documentation doesn't seem to help. Do I have to set the sys.path to >> include my scripts directory (/Users/rodneys/Documents/python)? If >> so, how do I go about this? > > My cheap-o answer to this problem is either to use terminal and start > python from the directory where your objects are (my prefered method) > or > > import os > and os.chdir('your path') > > then you can import the objects in that directory. Of course, I did > this > from terminal so your mileage may vary. A better solution is to just use /Users/rodneys/Library/Python/2.3/site-packages as your scripts directory or do this to add your python documents directory to your sys.path (just do this once): import os try: os.makedirs(os.path.expanduser('~/Library/Python/2.3/site-packages')) except: pass file(os.path.expanduser('~/Library/Python/2.3/site-packages/myscripts. pth'), 'w').write(os.path.expanduser('~Documents/python')) -bob From hengist.podd at virgin.net Sun Aug 29 19:54:27 2004 From: hengist.podd at virgin.net (has) Date: Sun Aug 29 19:54:39 2004 Subject: [Pythonmac-SIG] [ann] aem 0.2.0 + osaterminology 0.1.0 posted Message-ID: Hey, Posted another progress update. See: http://freespace.virgin.net/hamish.sanderson/appscript.html The aem package now includes aemreceive - a reworking of MiniAEFrame. To find out the raw codes for constructing object specifiers via aem.types, see osaterminology.tools.quickdoc. If anyone's any thoughts on how aemreceive should implement Apple Event Object Model support, please fire away. Also, any thoughts on how incoming Apple events should be handled in PyObjC-based apps? Cheers, has -- http://freespace.virgin.net/hamish.sanderson/ From jdhunter at ace.bsd.uchicago.edu Mon Aug 30 04:00:44 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Mon Aug 30 04:49:58 2004 Subject: [Pythonmac-SIG] python with readline support In-Reply-To: <789BEAF5-F94B-11D8-B352-000A957919FA@onjapan.net> (Jim Tittsler's message of "Sun, 29 Aug 2004 08:39:14 +0900") References: <789BEAF5-F94B-11D8-B352-000A957919FA@onjapan.net> Message-ID: >>>>> "Jim" == Jim Tittsler writes: Jim> The *easiest* method is to install it with the PackageManager Jim> (AKA Python Install Manager, AKA Package Install Manager for Jim> Python) which is part of the MacPython addons you can Jim> download from Jim> Jim> readline support is in one of the "official" packages, so you Jim> can download and install it with just a few clicks. Great - worked like a charm - thanks! JDH From hengist.podd at virgin.net Mon Aug 30 14:46:51 2004 From: hengist.podd at virgin.net (has) Date: Mon Aug 30 14:47:11 2004 Subject: [Pythonmac-SIG] Carbon.AE - AEInstallCoercionHandler ? Message-ID: Hi, Really a question for Jack I suppose, but I'm wondering if there's a reason why Carbon.AE doesn't include functions for installing and removing coercion handlers? Ta, has p.s. Also curious about AEInstallSpecialHandler, which Carbon.AE does include - what, if anything, would you use it for? (Apple's docs are hopeless at explaining this stuff.) -- http://freespace.virgin.net/hamish.sanderson/ From rutledge.50 at osu.edu Mon Aug 30 16:29:10 2004 From: rutledge.50 at osu.edu (Lincoln Rutledge) Date: Mon Aug 30 16:27:23 2004 Subject: [Pythonmac-SIG] traceback looking for _bsddb Message-ID: <1093876150.21715.27.camel@lin651ap.hfsec.rdh.ohio-state.edu> Hi Python Mac'ers, I am running 10.3.5 with Jack Jansen's goodies installed, Tcl/Tk and IDLE are working. I am using Phil Pearson's cool cli blog program bzero, and it is looking for _bsddb. Here is the traceback: > Publish > opening state file /Users/lrutled/.bzero/the rock garden/directory.dbm > Traceback (most recent call last): > File "/usr/local/bin/bzero", line 40, in ? > go() > File "/usr/local/bin/bzero", line 37, in go > main.main() > File "b0lib/main.py", line 194, in main > File "b0lib/poll.py", line 153, in main > File "b0lib/publish.py", line 28, in __init__ > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/anydbm.py", > line 82, in open > mod = __import__(result) > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/dbhash.py", > line 5, in ? > import bsddb > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/bsddb/__init__.py", > line 40, in ? > import _bsddb > ImportError: No module named _bsddb > Exception exceptions.AttributeError: "Publisher instance has no > attribute 'state'" in > ignored I do not have Apple Developer Tools or the BSD SDK installed, so that may be the problem. Or a path problem or deity knows. If anyone has a clue for me, I'd sure appreciate it :) Phil thinks I'm missing something on the Python side, and I believe him as he has bzero running on a couple other platforms. Pack-man doesn't show any addons that I don't have that look promising, but maybe I need to investigate that some more. Or maybe the prefix "_" shouldn't be there (import _bsddb)... Anyhoo, thanks, Lincoln electro-magnetic pulses from French above ground nuke testing. From lrutledge at realemail.net Mon Aug 30 16:15:45 2004 From: lrutledge at realemail.net (Lincoln Rutledge) Date: Mon Aug 30 16:35:12 2004 Subject: [Pythonmac-SIG] traceback looking for _bsddb Message-ID: <1093875345.21715.23.camel@lin651ap.hfsec.rdh.ohio-state.edu> Hi Python Mac'ers, I am running 10.3.5 with Jack Jansen's goodies installed, Tcl/Tk and IDLE are working. I am using Phil Pearson's cool cli blog program bzero, and it is looking for _bsddb. Here is the traceback: > Publish > opening state file /Users/lrutled/.bzero/the rock garden/directory.dbm > Traceback (most recent call last): > File "/usr/local/bin/bzero", line 40, in ? > go() > File "/usr/local/bin/bzero", line 37, in go > main.main() > File "b0lib/main.py", line 194, in main > File "b0lib/poll.py", line 153, in main > File "b0lib/publish.py", line 28, in __init__ > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/anydbm.py", > line 82, in open > mod = __import__(result) > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/dbhash.py", > line 5, in ? > import bsddb > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/bsddb/__init__.py", > line 40, in ? > import _bsddb > ImportError: No module named _bsddb > Exception exceptions.AttributeError: "Publisher instance has no > attribute 'state'" in > ignored I do not have Apple Developer Tools or the BSD SDK installed, so that may be the problem. Or a path problem or deity knows. If anyone has a clue for me, I'd sure appreciate it :) Phil thinks I'm missing something on the Python side, and I believe him as he has bzero running on a couple other platforms. Pack-man doesn't show any addons that I don't have that look promising, but maybe I need to investigate that some more. Or maybe the prefix "_" shouldn't be there (import _bsddb)... Anyhoo, thanks, Lincoln The salesman and the system analyst took off to spend a weekend in the forest, hunting bear. They'd rented a cabin, and, when they got there, took their backpacks off and put them inside. At which point the salesman turned to his friend, and said, "You unpack while I go and find us a bear." Puzzled, the analyst finished unpacking and then went and sat down on the porch. Soon he could hear rustling noises in the forest. The noises got nearer -- and louder -- and suddenly there was the salesman, running like hell across the clearing toward the cabin, pursued by one of the largest and most ferocious grizzly bears the analyst had ever seen. "Open the door!", screamed the salesman. The analyst whipped open the door, and the salesman ran to the door, suddenly stopped, and stepped aside. The bear, unable to stop, continued through the door and into the cabin. The salesman slammed the door closed and grinned at his friend. "Got him!", he exclaimed, "now, you skin this one and I'll go rustle us up another!" From Jack.Jansen at cwi.nl Mon Aug 30 16:37:24 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Aug 30 16:36:59 2004 Subject: [Pythonmac-SIG] Carbon.AE - AEInstallCoercionHandler ? In-Reply-To: References: Message-ID: <1BF4FD38-FA92-11D8-9A3D-000A958D1666@cwi.nl> On 30-aug-04, at 14:46, has wrote: > Hi, > > Really a question for Jack I suppose, but I'm wondering if there's a > reason why Carbon.AE doesn't include functions for installing and > removing coercion handlers? Probably because either (a) I didn't understand what they were, (b) I was too lazy, or (c) both of the above. Point me to one (also in the apple docs, please) and I'll see whether it's feasible to add them. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From Jack.Jansen at cwi.nl Mon Aug 30 16:39:25 2004 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Mon Aug 30 16:39:10 2004 Subject: [Pythonmac-SIG] traceback looking for _bsddb In-Reply-To: <1093876150.21715.27.camel@lin651ap.hfsec.rdh.ohio-state.edu> References: <1093876150.21715.27.camel@lin651ap.hfsec.rdh.ohio-state.edu> Message-ID: <6394B081-FA92-11D8-9A3D-000A958D1666@cwi.nl> On 30-aug-04, at 16:29, Lincoln Rutledge wrote: > Hi Python Mac'ers, > I am running 10.3.5 with Jack Jansen's goodies installed, Tcl/Tk and > IDLE are working. I am using Phil Pearson's cool cli blog program > bzero, and it is looking for _bsddb. You need to install the bsddb package. But: that package isn't currently featured in Package Manager, and I think I've heard here that it is non-trivial to build. So, questions for you all: - Is bsddb interesting enough to add to the Package Manager? - Can someone send me a recipe for how to build it? -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From bob at redivi.com Mon Aug 30 20:02:10 2004 From: bob at redivi.com (Bob Ippolito) Date: Mon Aug 30 20:02:46 2004 Subject: [Pythonmac-SIG] traceback looking for _bsddb In-Reply-To: <6394B081-FA92-11D8-9A3D-000A958D1666@cwi.nl> References: <1093876150.21715.27.camel@lin651ap.hfsec.rdh.ohio-state.edu> <6394B081-FA92-11D8-9A3D-000A958D1666@cwi.nl> Message-ID: On Aug 30, 2004, at 10:39 AM, Jack Jansen wrote: > > On 30-aug-04, at 16:29, Lincoln Rutledge wrote: > >> Hi Python Mac'ers, >> I am running 10.3.5 with Jack Jansen's goodies installed, Tcl/Tk and >> IDLE are working. I am using Phil Pearson's cool cli blog program >> bzero, and it is looking for _bsddb. > > You need to install the bsddb package. But: that package isn't > currently featured in Package Manager, and I think I've heard here > that it is non-trivial to build. I'm pretty sure it's trivial to build. > So, questions for you all: > - Is bsddb interesting enough to add to the Package Manager? Yes > - Can someone send me a recipe for how to build it? I think it's trivial.. I don't remember any problems. I have _bsddb.so from 4.1.6 linked with BerkeleyDB 4.1.25 in my repository: http://undefined.org/python/pimp/ -bob From mwh at python.net Tue Aug 31 00:45:28 2004 From: mwh at python.net (Michael Hudson) Date: Tue Aug 31 00:45:30 2004 Subject: [Pythonmac-SIG] python with readline support In-Reply-To: (John Hunter's message of "Sun, 29 Aug 2004 21:00:44 -0500") References: <789BEAF5-F94B-11D8-B352-000A957919FA@onjapan.net> Message-ID: <2msma4454n.fsf@starship.python.net> John Hunter writes: >>>>>> "Jim" == Jim Tittsler writes: > > > Jim> The *easiest* method is to install it with the PackageManager > Jim> (AKA Python Install Manager, AKA Package Install Manager for > Jim> Python) which is part of the MacPython addons you can > Jim> download from > Jim> > Jim> readline support is in one of the "official" packages, so you > Jim> can download and install it with just a few clicks. > > Great - worked like a charm - thanks! I'd be interested to know what readline 5 breaks, if anything :-) Particularly with Python from CVS HEAD... Cheers, mwh -- All programs evolve until they can send email. -- Richard Letts Except Microsoft Exchange. -- Art -- http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html From hengist.podd at virgin.net Tue Aug 31 10:01:52 2004 From: hengist.podd at virgin.net (has) Date: Tue Aug 31 22:53:48 2004 Subject: [Pythonmac-SIG] Carbon.AE - AEInstallCoercionHandler ? In-Reply-To: <1BF4FD38-FA92-11D8-9A3D-000A958D1666@cwi.nl> References: <1BF4FD38-FA92-11D8-9A3D-000A958D1666@cwi.nl> Message-ID: Hey, >>Really a question for Jack I suppose, but I'm wondering if there's >>a reason why Carbon.AE doesn't include functions for installing and >>removing coercion handlers? > >Probably because either (a) I didn't understand what they were, (b) >I was too lazy, or (c) both of the above. See IM:IAC 4-41 for a description, and the Carbon Apple Event Manager Reference (/Developer/Documentation/Carbon/interapplicationcomm/AppleEventManager/Apple_Event_Manager/Apple_Event__er_Reference/index.html, or whatever it is in 10.3) lists the API. I've attached a hacked (i.e. cut-n-paste coding), semi-working _AEModule.c FYI. I've found and fixed a bug with AEReplaceDescData (should be an AEDesc method), added code for installing and removing coercion handlers, and a generic coercion handler that calls a Python function. I've screwed something up so that it crashes the Python interpreter when you try to use it, but you know this stuff much better than I do so I expect you can figure it out - prolly dangled a pointer some place or something stupid like that. Thanks, has --------- # TEST CODE #!/usr/local/bin/pythonw from Carbon.File import FSSpec from Carbon import AE from aem.types import Codecs c = Codecs() def unicodeToAlias(fromDesc, toType, toDesc): print 'FROM DESC %r' % fromDesc print 'type %r' % fromDesc.type print 'data %r' % fromDesc.data print 'DESIRED TYPE %r' % toType print 'TO DESC %r' % toDesc print 'type %r' % toDesc.type # print 'data %r' % toDesc.data # !!! something's not right here # insert test data into toDesc; Python interpreter crashes on this line when uncommented #toDesc.AEReplaceDescData('alis', '\x00\x00\x00\x00\x01B\x00\x02\x00\x00\x0cMacintosh HD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbdER\xbbH+\x00\x00\x00\x02\x00\x95\nReadMe.txt\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04#\xac\xbdRwuWAFFMSIE\xff\xff\xff\xff\x00\x00\x01 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03has\x00\x00\x10\x00\x08\x00\x00\xbdED\xab\x00\x00\x00\x11\x00\x08\x00\x00\xbdRie\x00\x00\x00\x01\x00\x08\x00\x02\x00\x95\x00\x00"*\x00\x02\x00!Macintosh HD:Users:has:ReadMe.txt\x00\x00\x0e\x00\x16\x00\n\x00R\x00e\x00a\x00d\x00M\x00e\x00.\x00t\x00x\x00t\x00\x0f\x00\x1a\x00\x0c\x00M\x00a\x00c\x00i\x00n\x00t\x00o\x00s\x00h\x00 \x00H\x00D\x00\x12\x00\x14Users/has/ReadMe.txt\x00\x13\x00\x01/\x00\xff\xff\x00\x00') # installing and removing handlers _seems_ to work ok AE.AEInstallCoercionHandler('utxt', 'alis', unicodeToAlias) print AE.AEGetCoercionHandler('utxt', 'alis') AE.AERemoveCoercionHandler('utxt', 'alis') # as does fixed AEReplaceDescData desc = c.pack(u'/Users/has/ReadMe.txt') desc.AEReplaceDescData('TEXT', 'hello world') print 'Replaced type %r, data %r' % (desc.type, desc.data) # actually invoking coercion is all kinds of buggy, however AE.AEInstallCoercionHandler('utxt', 'alis', unicodeToAlias) desc = c.pack(u'/Users/has/ReadMe.txt') print desc.AECoerceDesc('alis') -- http://freespace.virgin.net/hamish.sanderson/ -------------- next part -------------- A non-text attachment was scrubbed... Name: _AEmodule.c Type: application/mac-binhex40 Size: 64439 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040831/19363b4d/_AEmodule-0001.hqx