From junkster at rochester.rr.com Thu Aug 2 00:50:37 2007 From: junkster at rochester.rr.com (Benjamin Schollnick) Date: Wed, 1 Aug 2007 18:50:37 -0400 Subject: [Pythonmac-SIG] py2app warning: may need to include email.Util In-Reply-To: References: <3B940336-83E0-4150-9C0B-544B6BD3F12A@mac.com> Message-ID: <4EEDBEBC-421B-401A-B511-BB526F129022@rochester.rr.com> Sorry for jumping in so late.... >>> My py2app-bundled Mac application recently started failing with "no >>> module named email.Util" when trying to display images. It turns out >>> pyfits uses urllib which uses email.Util, which apparently has been >>> renamed email.util with some kind of clever lazy import code so >>> one can >>> still use email.Util. Apparently the cleverness is too much for >>> py2app's >>> module finder. > > I submitted a patch for python (changing email.Utils->email.utils in > urllib, with similar patches for urllib2 and smtplib). But I agree > that a recipe for py2app would be very good, since some people will > run py2app against 2.5. > > The following recipe seems to work, but I don't know if it's really > the right way to go. It is based on extrapolating from the current > recipes. None of them seem to do the same job and I've not found any > docs on writing recipes: I hate to say this, but I don't see *HOW* to use the recipes..... I'm running into the email issue, as well as not seeing sndhdr.... And I can't seem to find easy solution.... Can anyone point me towards a method to use py2app recipes? - Benjamin > > def check(cmd, mf): > m = mf.findNode('email') > if m is None or m.filename is None: > return None > oldNames = [ > 'base64MIME', > 'Charset', > 'Encoders', > 'Errors', > 'Generator', > 'Header', > 'Iterators', > 'Message', > 'MIMEAudio', > 'MIMEBase', > 'MIMEImage', > 'MIMEMessage', > 'MIMEMultipart', > 'MIMENonMultipart', > 'MIMEText', > 'Parser', > 'quopriMIME', > 'Utils', > 'message_from_string', > 'message_from_file', > ] > oldModules = ["email." + name for name in oldNames] > > return dict( > modules = oldModules, > ) > > Regards, > > -- Russell > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From christopher.e.kees at erdc.usace.army.mil Thu Aug 2 21:30:04 2007 From: christopher.e.kees at erdc.usace.army.mil (Chris Kees) Date: Thu, 2 Aug 2007 14:30:04 -0500 Subject: [Pythonmac-SIG] building 64 bit on Mac Pro Message-ID: <0C003312-D64B-43EC-A9F8-89D2DFC07F44@erdc.usace.army.mil> Hi, I'm having trouble building a 64 bit interpreter that works with the Numeric or numpy modules on a Mac Pro. I've searched through the archives and settled on the following configure options: ./configure --prefix=${HOME} \ CC="/usr/bin/gcc -m64 -arch x86_64" \ OPT="-Wall -m64 -arch x86_64" \ CFLAGS="-Wall -m64 -arch x86_64" \ LD="/usr/bin/gcc -m64 -arch x86_64" \ LDFLAGS="-Wall -m64 -arch x86_64" \ CXX="/usr/bin/g++ -m64 -arch x86_64" \ CXXFLAGS="-Wall -m64 -arch x86_64" \ --disable-framework --disable-toolbox-glue --disable-universalsdk When I build a recent source from http://svn.python.org/projects/ python/trunk or http://svn.python.org/projects/python/branches/ release25-maint I get a lot of the same failed tests. Also, three significant tests for the old Numeric module fail. The new numpy won't build because it needs the md5 module. I'm able to build and run in 64 bit on red hat enterprise. I used to be able to do it on a G5 so this seems to be a tiger/intel problem. Anybody have any experience with this configuration? Chris 2 tests failed: test_cookielib test_uuid 41 tests skipped: test__locale test_aepack test_al test_applesingle test_bsddb test_bsddb3 test_bz2 test_cd test_cl test_ctypes test_dl test_gdbm test_gl test_hashlib test_hmac test_imageop test_imgfile test_linuxaudiodev test_locale test_macfs test_macostools test_md5 test_nis test_ossaudiodev test_pep247 test_pep277 test_rgbimg test_scriptpackages test_sha test_socket_ssl test_sqlite test_startfile test_sunaudiodev test_tcl test_unicodedata test_urllib2 test_urllib2_localnet test_urllib2net test_winreg test_winsound test_zipfile64 18 skips unexpected on darwin: test_hashlib test_hmac test_dl test_aepack test_applesingle test_bz2 test_urllib2net test_macostools test_ctypes test_urllib2 test_tcl test_urllib2_localnet test_sha test_pep247 test_unicodedata test_md5 test_scriptpackages test_macfs 2 tests failed: test_cookielib test_uuid 51 tests skipped: test__locale test_aepack test_al test_applesingle test_bsddb test_bsddb3 test_bz2 test_cd test_cl test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_ctypes test_curses test_dl test_gdbm test_gl test_hashlib test_hmac test_imageop test_imgfile test_largefile test_linuxaudiodev test_locale test_macostools test_md5 test_normalization test_ossaudiodev test_pep247 test_pep277 test_scriptpackages test_sha test_socket_ssl test_socketserver test_sqlite test_startfile test_sunaudiodev test_sundry test_tarfile test_tcl test_timeout test_unicodedata test_urllib2 test_urllib2_localnet test_urllib2net test_urllibnet test_winreg test_winsound test_zipfile64 19 skips unexpected on darwin: test_hashlib test_bz2 test_dl test_aepack test_sha test_urllib2_localnet test_applesingle test_urllib2net test_macostools test_ctypes test_urllib2 test_tcl test_sundry test_hmac test_pep247 test_tarfile test_unicodedata test_md5 test_scriptpackages From rowen at cesmail.net Mon Aug 6 22:15:19 2007 From: rowen at cesmail.net (Russell E. Owen) Date: Mon, 06 Aug 2007 13:15:19 -0700 Subject: [Pythonmac-SIG] py2app warning: may need to include email.Util References: <3B940336-83E0-4150-9C0B-544B6BD3F12A@mac.com> <4EEDBEBC-421B-401A-B511-BB526F129022@rochester.rr.com> Message-ID: In article <4EEDBEBC-421B-401A-B511-BB526F129022 at rochester.rr.com>, Benjamin Schollnick wrote: > Sorry for jumping in so late.... > > >>> My py2app-bundled Mac application recently started failing with "no > >>> module named email.Util" when trying to display images. It turns out > >>> pyfits uses urllib which uses email.Util, which apparently has been > >>> renamed email.util with some kind of clever lazy import code so > >>> one can > >>> still use email.Util. Apparently the cleverness is too much for > >>> py2app's > >>> module finder. > > > > I submitted a patch for python (changing email.Utils->email.utils in > > urllib, with similar patches for urllib2 and smtplib). But I agree > > that a recipe for py2app would be very good, since some people will > > run py2app against 2.5. > > > > The following recipe seems to work, but I don't know if it's really > > the right way to go. It is based on extrapolating from the current > > recipes. None of them seem to do the same job and I've not found any > > docs on writing recipes: > > I hate to say this, but I don't see *HOW* to use the recipes..... > > I'm running into the email issue, as well as not seeing sndhdr.... > > And I can't seem to find easy solution.... > > Can anyone point me towards a method to use py2app recipes? I suggest you try to fix the problem by supplying addition information to the setup function in your setup.py script. I often end up using the "packages" and "data_files" arguments. I don't recall all the others, but you can run py2app asking for help to see a list of command line arguments, most or all of which can be supplied as arguments to the setup function. I don't think recipes are going to help you -- at least not yet. Recipes are a very convenient way to tell py2app how to handle certain common situations. The recipe contains information about when it should be used and py2app automatically uses the one that match. As py2app runs, it tells you which recipes it is using. So once you figure out what additional info py2app needs for your particular situation you can then write a recipe to handle it and submit it to the py2app project. But I found that tricky for the case you quoted because of the lack of documentation on writing recipes. -- Russell From bray at sent.com Mon Aug 6 23:10:52 2007 From: bray at sent.com (Brian Ray) Date: Mon, 6 Aug 2007 16:10:52 -0500 Subject: [Pythonmac-SIG] ANN: ChiPy August Meeting Topic "Snakes On Apples" Message-ID: <8AF4FA5E-681E-45D3-A734-A0BFEB31A8F8@sent.com> ChiPy the Chipmunk** invites you to attend August's Chicago Python User Group meeting. ChiPy says, "This will be the best meet ever!" When ---- Thursday August 9th 2007 7:00PM Cost ---- Free Topics ------ Snakes on Apples Developing Python on the Mac. All are welcome, no Macintosh, Unix, or Python experience required. - TextMate with Python -- Kumar McMillan + how to edit / navigate -- all the stuff that makes it comparable to emacs or whatnot (I'll keep this short) + hack: how to write commands / Bundles to automate your coding needs - Address Book Plugin for syncing with gmail contacts utilizing libgmail -- Brian Ray - Python Sprint at Google and PyCon '08 updates / discussion - After: If you wish, follow Chipy the Chipmunk to Greektown or Taylor Street Venue ----- :: The University of Illinois at Chicago Science and Engineering Offices (SEO 1000) 851 South Morgan Street Chicago, Illinois 60607 (note: Emergency Cell 773 835 9876, if you get lost and need moral support) CTA ~~~ FROM O'HARE AIRPORT BY CTA TRAIN: Take the CTA BLUE LINE TRAIN from O'Hare to the UIC-Halsted stop. Exit up stairs in center of the train platform (the platform also has two long ramps on either side heading East and West, which also can be used). Proceed South on street level to the UIC campus. FROM MIDWAY AIRPORT BY CTA TRAIN: Take the CTA ORANGE LINE TRAIN from Midway to the Clark/Lake station. Exit the train, GO DOWNSTAIRS and transfer to the CTA BLUE LINE. Take the Blue Line train towards 54/Cermak (Forest Park) and exit at the UIC-Halsted stop. Exit up stairs in center of the train platform (the platform also has two long ramps on either side heading East and West, which also can be used). Proceed South on street level to the UIC campus. Driving ~~~~~~~ PARKING: Public parking is available via a four-level parking garage on the NE corner of Taylor & Halsted streets, and at the open parking lot on the SE corner of Taylor and Morgan streets. IF PARKING IN THE GARAGE, ENTER ON THE LEFT DRIVEWAY as you turn Nor th into the building, ensuring that you take a ticket. If parking in the open lot, enter through the Southern most driveway, the one that has the attendant booth. DRIVING FROM THE NORTH: Take 90/94 South (Kennedy Expressway) to the Taylor Street/Roosevelt Ave, Exit 52A. Keep to the right and turn right immediately onto Taylor Street. The entrance to the parking garage will be immediately to your right. FROM THE SOUTH: Take 90/94 Nor th (Dan Ryan Expressway). Pass to the far right lane and take the Roosevelt Ave exit, Exit 52B. Stay in the middle or far right lane and go straight through the first intersection, paralleling the expressway. Turn left onto Taylor Street. The entrance to the parking garage will be to your right. FROM THE WEST: Take 290 East (Eisenhower Expressway) to 90/94 South (Dan Ryan Expressway). Immediately exit to the right onto Taylor Street/Roosevelt Ave, Exit 52A. Stay to the right and turn right at the light onto Taylor Street. The entrance to the parking garage will be immediately to your right. FROM THE EAST: In the Loop area, take Harrison Street. Proceed west and turn left onto Halsted Street. Continue South on Halsted, turn left onto Taylor and left again into the parking garage. Food Donations -------------- Roy Talman & Associates About ChiPy ----------- ChiPy is a group of Chicago Python Programmers, l33t, and n00bs. Meetings are held monthly at various locations around Chicago. Also, ChiPy is a proud sponsor of many Open Source and Educational efforts in Chicago. Stay tuned to the mailing list for more info. ChiPy website: ChiPy Mailing List: Python website: ** "ChiPy the Chipmunk" is a fictitious character. Any similarity to actual chipmunks, living or dead, is purely coincidental. ------ From hsoi at hsoi.com Tue Aug 7 19:46:08 2007 From: hsoi at hsoi.com (John C. Daub) Date: Tue, 07 Aug 2007 12:46:08 -0500 Subject: [Pythonmac-SIG] Troubles using Boost.Python and Mac types Message-ID: Hello. I've been using Python for a little while and am now embedding it in an application which is primarily Cocoa based but has a core library that's written in C++ and uses a lot of Core Foundation. I'm trying to wrap up our file specifier class using Boost.Python, but am having difficulties in figuring out how to get Boost.Python to work with types it doesn't understand, such as a CFStringRef. My C++ file specifier class is called FSItem, and it's the main class I need to wrap up. As a sample case, it has a method: virtual CFStringRef CopyAsPath() const; This will convert the FSItem to a path and return it as a CFStringRef, which the caller must CFRelease(). When I first created my module I did so like this: BOOST_PYTHON_MODULE(Gonzo) { boost::python::class_("FSItem") .def("copyaspath", &Gonzo::FSItem::CopyAsPath) ; } Of course, that generated a compile error that I needed a return_value_policy<> that understood CFStringRef's. I've been struggling to come up with the way to make this happen. I need to convert the CFStringRef to something the script can understand, and I do know about CFStringRefObj_New() from Python/pymactoolbox.h. And try as I might to find sample code, documentation, etc. well... while I get some things, I just can't get over the last hump of exactly how to implement a ResultConverterGenerator for a CFStringRef. My questions: 1. Does anyone know how to create a ResultConverterGenerator for a CFStringRef? 2. What's the API contract regarding CFStringRefObj_New()? Does it assume ownership of the CFStringRef given to it? The source code seems to do that, but I want to make sure. 3. I posted here due to the Mac-ness of this all, but as I'm a newbie to this realm I'm not sure it's the right/best forum. Would the C++ SIG mailing list be the better place? Thank you. -- John C. Daub }:-)>= "We live thinking we will never die. We die thinking we had never lived. Cut it out." -- Jason Becker From karstenw at eichhorn-frankfurt.de Thu Aug 9 17:25:52 2007 From: karstenw at eichhorn-frankfurt.de (Karsten Wolf) Date: Thu, 9 Aug 2007 17:25:52 +0200 Subject: [Pythonmac-SIG] appscript and filemaker Message-ID: <46B757D2-E40E-48BF-B6F5-3CD377AA671E@eichhorn-frankfurt.de> Hi, I'm new to python & appscript and try to control some FileMaker 9 databases. I'd like to handle container fields (CF). Getting these in appscript is a little more difficult than in other scripting languages. When getting a record as a list, a CF shows up as . Accessing this list item yields nothing; AEDesc.data='', AEDesc.type='tdta'. Accessing the CF in a separate request gives the correct data; AEDesc.data='some binary stuff' and AEDesc.type='PICT' So far so good. How do I write PICT (or any other image type) data into a CF? -karsten From hengist.podd at virgin.net Mon Aug 13 13:14:52 2007 From: hengist.podd at virgin.net (has) Date: Mon, 13 Aug 2007 12:14:52 +0100 Subject: [Pythonmac-SIG] appscript and filemaker In-Reply-To: References: Message-ID: <11BE765A-8AFE-458A-BADA-B683F0315E8E@virgin.net> Karsten Wolf wrote: > I'm new to python & appscript and try to control some FileMaker 9 > databases. Don't have a copy of FileMaker myself, but will try to help best I can. > I'd like to handle container fields (CF). > > Getting these in appscript is a little more difficult than in other > scripting languages. When getting a record as a list, a CF shows up > as . AEDesc values are equivalent to AppleScript's ?data....? values. > Accessing this list item yields nothing; AEDesc.data='', > AEDesc.type='tdta'. What does the equivalent AppleScript give you? Appscript should give the same result. > Accessing the CF in a separate request gives the correct data; > AEDesc.data='some binary stuff' and AEDesc.type='PICT' > > So far so good. > > How do I write PICT (or any other image type) data into a CF? Appscript's support for picture types is the same as AppleScript's, i.e. pretty lame. (If anyone feels like writing a patch to improve it, please do.) However, if you know how to do it in AppleScript, post the code here and I can supply the Python equivalent for you. HTH has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From hengist.podd at virgin.net Mon Aug 13 19:57:30 2007 From: hengist.podd at virgin.net (has) Date: Mon, 13 Aug 2007 18:57:30 +0100 Subject: [Pythonmac-SIG] appscript and filemaker In-Reply-To: References: <11BE765A-8AFE-458A-BADA-B683F0315E8E@virgin.net> Message-ID: <8DDCE32C-CFA0-4973-9096-4740EB457C0C@virgin.net> On 13 Aug 2007, at 18:01, Karsten Wolf wrote: >>> Accessing this list item yields nothing; AEDesc.data='', >>> AEDesc.type='tdta'. >> >> What does the equivalent AppleScript give you? Appscript should give >> the same result. > > Ok. I've crosschecked with Frontier and AppleScript. > > I'm using FileMaker 9 Advanced and it has changed behaviour > compared to previous versions. It used to deliver the PICT data if > a record was retrieved as a list (see below the Frontier binary > screenshot). Looks like a bug in FMP9 then; might want to file a report on it. >>> However, if you know how to do it in AppleScript, >> post the code here and I can supply the Python equivalent for you. > > AppleScript returns on > > get cell "e" of record 16 of layout "Untitled Copy" of window > "Untitled" > > ?data PICT8F5C0000000001...? > > Frontier has a binary type which can be sent to FileMaker: 20.png> These are equivalent to a CarbonX.AE.AEDesc instance in Python. > In both cases the returned data can be sent back to FileMaker; like > this: > tell application "FileMaker Pro Advanced" > set t to get cell "e" of record 16 of layout "Untitled Copy" of > window "Untitled" > set cell "e" of record 15 of layout "Untitled Copy" of window > "Untitled" to t > end tell > > > I simply don't know how to re-package the returned data. I have > some binary (raw in pythonese) data and an OSType (AEDesc.type). > How do i package them to be sent via appscript? Same deal. Just pass the returned AEDesc straight back to FMP as-is. fmp = app('FileMaker Pro Advanced') t = fmp.windows['Untitled'].layouts['Untitled Copy'].records[16].cells ['e'].get() fmp.windows['Untitled'].layouts['Untitled Copy'].records[15].cells ['e'].set(t) HTH has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org From janssen at parc.com Wed Aug 15 17:29:25 2007 From: janssen at parc.com (Bill Janssen) Date: Wed, 15 Aug 2007 08:29:25 PDT Subject: [Pythonmac-SIG] CPython VM for iPhone? Message-ID: <07Aug15.082930pdt."57996"@synergy1.parc.xerox.com> I thought I'd see if anyone has begun porting the CPython VM to the iPhone? Presumably with a PyGUI interface to UIKit? http://iphone.fiveforty.net/wiki/index.php/UIKit_Hello_World http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Bill From gibbz at ou.edu Thu Aug 16 04:37:33 2007 From: gibbz at ou.edu (Jeremy Gibbs) Date: Wed, 15 Aug 2007 21:37:33 -0500 Subject: [Pythonmac-SIG] py2app and ghostscript Message-ID: I am testing out wxpython and py2app. I have a simple GUI that acts as a front-end to a vector graphics software package. The software writes images in .eps format. wxPython needs jpg format to view. I use PIL to open .eps and save as .jpg When I run the script from the command line it works great. However, when I use py2app, it will create the .eps file, but barfs on PILs conversion of eps to jpg. I understand PIl uses gs to do this conversion. The system console gave the message "gs command not found" So it is apparent that i am not having py2app package the correct ghostscript libraries etc. to work. Does anyone know what the command for py2app would be to include everything in the app that ghostscript needs to work? Thanks, Jeremy From treaves at silverfieldstech.com Fri Aug 17 04:15:11 2007 From: treaves at silverfieldstech.com (Timothy Reaves) Date: Thu, 16 Aug 2007 22:15:11 -0400 Subject: [Pythonmac-SIG] Source for pythonmac.org releases? Message-ID: I can't seem to find source for these. I need to compile myself, as I'm running 10.5. I'm seeing some weird stuff, and want to determine if a recompile will take care of it. From ronaldoussoren at mac.com Fri Aug 17 08:35:24 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 17 Aug 2007 08:35:24 +0200 Subject: [Pythonmac-SIG] Source for pythonmac.org releases? In-Reply-To: References: Message-ID: On 17 Aug, 2007, at 4:15, Timothy Reaves wrote: > I can't seem to find source for these. I need to compile myself, as > I'm running > 10.5. I'm seeing some weird stuff, and want to determine if a > recompile will > take care of it. AFAIK the binaries on pythonmac.org got contributed by various people. I don't think many of them require patches to the source code, although some might. Some like, PIL, need additional software installed to build (such as libjpeg for PIL). What packages are you looking for? Ronald > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070817/048ea9c3/attachment.bin From farshid.ghods at gmail.com Fri Aug 17 08:50:03 2007 From: farshid.ghods at gmail.com (farshid) Date: Thu, 16 Aug 2007 23:50:03 -0700 Subject: [Pythonmac-SIG] issue on making python extension from C code Message-ID: Hi , I am hitting this very strange issue that i am providing a wrapper for some hash method that is 192 bit or ( unsigned long long int in c) . when i invoke this function from other C code and i run the code it returns correct hash value , but when i compile it and install it with setup,py , the result is something totally different. Is it that when python convert c code into ".so" file it changes data types of variables??? maybe a bug? Thanks, Farshid here is the code the method is wrapper for tiger method; typedef unsigned long long int word64; typedef unsigned long word32; typedef unsigned char byte; void tiger(byte*, word64, word64*); PyObject *wrap_function(PyObject *self, PyObject *args) { word64 result[3]; char *command; // if (!PyArg_ParseTuple(args, "s",&command)) // return NULL; //printf("command is %s\n",command); command = "abc"; tiger((byte*)command,strlen(command),result); char new_str [48]; sprintf(new_str,"%08X%08X%08X%08X%08X%08X",(word32)(result[0]>>32), (word32)(result[0]),(word32)(result[1]>>32),(word32)(result[1]), (word32)(result[2]>>32),(word32)(result[2])); printf("inside wrap_function %s\n",new_str); return Py_BuildValue("s",new_str,strlen(new_str)); } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070816/b2aac408/attachment.html From treaves at silverfieldstech.com Sat Aug 18 15:36:25 2007 From: treaves at silverfieldstech.com (Timothy Reaves) Date: Sat, 18 Aug 2007 09:36:25 -0400 Subject: [Pythonmac-SIG] Source for pythonmac.org releases? In-Reply-To: References: Message-ID: Ronald Oussoren wrote: > > On 17 Aug, 2007, at 4:15, Timothy Reaves wrote: > >> I can't seem to find source for these. I need to compile myself, as >> I'm running >> 10.5. I'm seeing some weird stuff, and want to determine if a >> recompile will >> take care of it. > > AFAIK the binaries on pythonmac.org got contributed by various people. > I don't think many of them require patches to the source code, although > some might. Some like, PIL, need additional software installed to build > (such as libjpeg for PIL). > > What packages are you looking for? > > Ronald > I'm looking for the Python package itself. Where as the code could be the same, I don't believe th python source as a make install for a framework on Apple. Could be wrong, but don't think so. From kw at codebykevin.com Sat Aug 18 17:26:13 2007 From: kw at codebykevin.com (Kevin Walzer) Date: Sat, 18 Aug 2007 11:26:13 -0400 Subject: [Pythonmac-SIG] Source for pythonmac.org releases? In-Reply-To: References: Message-ID: <46C70F95.8060704@codebykevin.com> Timothy Reaves wrote: > > I'm looking for the Python package itself. Where as the code could be the > same, I don't believe th python source as a make install for a framework on > Apple. Could be wrong, but don't think so. > The source code for Python is available at http://python.org, and the official source package should build a framework install just fine on OS X. Just follow the instructions in the "readme" file. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From janssen at parc.com Sat Aug 18 23:12:38 2007 From: janssen at parc.com (Bill Janssen) Date: Sat, 18 Aug 2007 14:12:38 PDT Subject: [Pythonmac-SIG] Does urllib.getproxies() work in 2.4/2.5 on Mac? Message-ID: <07Aug18.141241pdt."57996"@synergy1.parc.xerox.com> I noticed that with the system Python 2.3.5 on OS X 10.4, the automatic proxy setting doesn't work for urlopen(). It's because the code in urllib.py expects os.name() to return 'mac', and instead it returns 'posix'. Is this fixed in later versions of Python, anyone know? You can test by calling "urllib.getproxies()" and seeing if it returns your proxysettings. Bill From bray at sent.com Sun Aug 19 02:20:00 2007 From: bray at sent.com (Brian Ray) Date: Sat, 18 Aug 2007 19:20:00 -0500 Subject: [Pythonmac-SIG] Does urllib.getproxies() work in 2.4/2.5 on Mac? In-Reply-To: <07Aug18.141241pdt."57996"@synergy1.parc.xerox.com> References: <07Aug18.141241pdt."57996"@synergy1.parc.xerox.com> Message-ID: <0305DA05-57C7-4434-A51B-F550E7DBDCCC@sent.com> On Aug 18, 2007, at 4:12 PM, Bill Janssen wrote: > Is this fixed in later versions of Python, anyone know? You can test > by calling "urllib.getproxies()" and seeing if it returns your > proxysettings. Python 2.5.1 (r251:54863, Aug 5 2007, 21:08:32) _>>> urllib.getproxies() _ {} Does this answer your quesiton? Brian Ray bray at sent.com http://kazavoo.com/blog From janssen at parc.com Sun Aug 19 09:52:56 2007 From: janssen at parc.com (Bill Janssen) Date: Sun, 19 Aug 2007 00:52:56 PDT Subject: [Pythonmac-SIG] Does urllib.getproxies() work in 2.4/2.5 on Mac? In-Reply-To: <07Aug18.141241pdt."57996"@synergy1.parc.xerox.com> References: <07Aug18.141241pdt."57996"@synergy1.parc.xerox.com> Message-ID: <07Aug19.005301pdt."57996"@synergy1.parc.xerox.com> > I noticed that with the system Python 2.3.5 on OS X 10.4, the > automatic proxy setting doesn't work for urlopen(). It's because the > code in urllib.py expects os.name() to return 'mac', and instead it > returns 'posix'. > > Is this fixed in later versions of Python, anyone know? You can test > by calling "urllib.getproxies()" and seeing if it returns your > proxysettings. Silly of me -- I should have just looked. Jack Jansen fixed it in 2004. Bill From ronaldoussoren at mac.com Sun Aug 19 09:50:11 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 19 Aug 2007 09:50:11 +0200 Subject: [Pythonmac-SIG] Does urllib.getproxies() work in 2.4/2.5 on Mac? In-Reply-To: <07Aug18.141241pdt.57996@synergy1.parc.xerox.com> References: <07Aug18.141241pdt.57996@synergy1.parc.xerox.com> Message-ID: <9B247DAE-3E6A-490C-9E93-1477E39C8686@mac.com> On 18 Aug, 2007, at 23:12, Bill Janssen wrote: > I noticed that with the system Python 2.3.5 on OS X 10.4, the > automatic proxy setting doesn't work for urlopen(). It's because the > code in urllib.py expects os.name() to return 'mac', and instead it > returns 'posix'. > > Is this fixed in later versions of Python, anyone know? You can test > by calling "urllib.getproxies()" and seeing if it returns your > proxysettings. python2.5 checks for sys.platform == 'darwin' and should therefore do the right thing. Ronald > > > Bill > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070819/024b7da2/attachment.bin From skip at pobox.com Wed Aug 22 21:42:26 2007 From: skip at pobox.com (skip at pobox.com) Date: Wed, 22 Aug 2007 14:42:26 -0500 Subject: [Pythonmac-SIG] How to generate C files in Mac/Modules? Message-ID: <18124.37282.521790.463619@montanaro.dyndns.org> How are all the extension modules in Mac/Modules generated? I'm trying to remove PyArg_Parse() from the Python 3 C API. They use PyArg_Parse extensively. If they were autogenerated I'd rather fix the generator instead of editing each file by hand. Thanks, Skip From ronaldoussoren at mac.com Thu Aug 23 08:45:22 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 23 Aug 2007 08:45:22 +0200 Subject: [Pythonmac-SIG] How to generate C files in Mac/Modules? In-Reply-To: <18124.37282.521790.463619@montanaro.dyndns.org> References: <18124.37282.521790.463619@montanaro.dyndns.org> Message-ID: <3396BE44-17A2-40AC-810B-35DA815D30C7@mac.com> On 22 Aug, 2007, at 21:42, skip at pobox.com wrote: > > How are all the extension modules in Mac/Modules generated? I'm > trying to > remove PyArg_Parse() from the Python 3 C API. They use PyArg_Parse > extensively. If they were autogenerated I'd rather fix the generator > instead of editing each file by hand. They are generated using bgen, which is in Tools/bgen/bgen. The last time I looked at this (which is a couple of years ago) you basicly had to be Jack to run this :-(. You also have to have the MacOS9 SDK headers, bgen doesn't look at the system headers at the moment. I've talked with Jack about both issues a while back and they should be fixed, but neither of us have much time to actually do that. Ronald > > > Thanks, > > Skip > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3562 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070823/4c876d64/attachment.bin From bray at sent.com Thu Aug 23 09:54:53 2007 From: bray at sent.com (Brian Ray) Date: Thu, 23 Aug 2007 02:54:53 -0500 Subject: [Pythonmac-SIG] How to generate C files in Mac/Modules? In-Reply-To: <3396BE44-17A2-40AC-810B-35DA815D30C7@mac.com> References: <18124.37282.521790.463619@montanaro.dyndns.org> <3396BE44-17A2-40AC-810B-35DA815D30C7@mac.com> Message-ID: On Aug 23, 2007, at 1:45 AM, Ronald Oussoren wrote: > > On 22 Aug, 2007, at 21:42, skip at pobox.com wrote: > >> >> How are all the extension modules in Mac/Modules generated? I'm >> trying to >> remove PyArg_Parse() from the Python 3 C API. They use PyArg_Parse >> extensively. If they were autogenerated I'd rather fix the generator >> instead of editing each file by hand. > > They are generated using bgen, which is in Tools/bgen/bgen. The > last time I looked at this (which is a couple of years ago) you > basicly had to be Jack to run this :-(. You also have to have the > MacOS9 SDK headers, bgen doesn't look at the system headers at the > moment. I see PyArg_Parse... being generated from there. Maybe its just a matter of changing it in the two or three places? Although, I am not sure what your doing. I was curious and also found this doc from MacPython: Mentions bgen and something called Modulator. Also I notice in the bgen module README it states something about not being mac-specific. This must not be true. I wonder if FlatCarbon headers could be used instead of MacOS9 SDK. I do not have any answers but I too am trying to get up to speed how all this works. Brian Ray bray at sent.com http://kazavoo.com/blog From tobias.rodaebel at mac.com Mon Aug 27 16:10:42 2007 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Mon, 27 Aug 2007 16:10:42 +0200 Subject: [Pythonmac-SIG] zc.buildout recipe for pyobjc projects Message-ID: Hi list, I've written a ZC Buildout recipe that helps to create pyobjc application bundles by using py2app and PyObjC. It aims to provide handling eggs within a zc.buildout environment. Now I am wondering about how to name it and in which repository (svn) I should check this in. My suggestion for a name would be 'pyobjc.recipe.build'. But I don't know if I violate other conventions by doing this. I want to upload it to the cheeseshop soon. Any hints or suggestions? Regards, Tobias From ronaldoussoren at mac.com Mon Aug 27 16:49:19 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 27 Aug 2007 07:49:19 -0700 Subject: [Pythonmac-SIG] zc.buildout recipe for pyobjc projects In-Reply-To: References: Message-ID: On Monday, August 27, 2007, at 04:14PM, "Tobias Rod?bel" wrote: >Hi list, > >I've written a ZC Buildout recipe that helps to create pyobjc >application bundles by using py2app and PyObjC. It aims to provide >handling eggs within a zc.buildout environment. Now I am wondering >about how to name it and in which repository (svn) I should check >this in. My suggestion for a name would be 'pyobjc.recipe.build'. But >I don't know if I violate other conventions by doing this. I want to >upload it to the cheeseshop soon. > >Any hints or suggestions? I'm not entirely happy with the usage of the pyobjc namespace. I see several patterns being used on PyPI for this: .recipe. and . seem to be the ones used most. IMHO the former communicates more clearly that this is a buildout recipe. BTW. Now I definitely have to look at buildout :-) Ronald (PyObjC maintainer) > >Regards, >Tobias > > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG at python.org >http://mail.python.org/mailman/listinfo/pythonmac-sig > > From tobias.rodaebel at mac.com Mon Aug 27 17:09:59 2007 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Mon, 27 Aug 2007 17:09:59 +0200 Subject: [Pythonmac-SIG] zc.buildout recipe for pyobjc projects In-Reply-To: References: Message-ID: <395228A8-6366-4CDC-8B4B-D89757B74D64@mac.com> Hi Ronald, On 08/27/2007, at 16:49 Ronald Oussoren wrote: > > I'm not entirely happy with the usage of the pyobjc namespace. I > see several patterns being used on PyPI for this: > .recipe. and . seem to be the > ones used most. IMHO the former communicates more clearly that this > is a buildout recipe. I would prefer a kind of community namespace for but didn't find one (pythononmac seems a bit long) that fits in. > > BTW. Now I definitely have to look at buildout :-) You definitely should! :-) BTW: Thank you and your folks for the great job you did on PyObjC! > > Ronald > > (PyObjC maintainer) Tobias From angrybaldguy at gmail.com Tue Aug 28 04:56:14 2007 From: angrybaldguy at gmail.com (Owen Jacobson) Date: Mon, 27 Aug 2007 19:56:14 -0700 Subject: [Pythonmac-SIG] Py2App and third-party .egg dependencies installed through easy_install Message-ID: <240cdd640708271956g283728c9s1f0e25a735105e66@mail.gmail.com> Hi, I'm using an easy_install'ed copy of ZSI 2.0rc3, residing in ~/Library/Python/2.5/site-packages/ as ZSI-2.0_rc3-py2.5.egg. I have a py2app-enabled setup.py that reads as follows: #!/usr/bin/env python from setuptools import setup Plist = dict(CFBundleDocumentTypes= [], CFBundleIdentifier='net.lionsanctuary.foo.Client') APP = ['startui.py'] DATA_FILES = [] OPTIONS = {'plist': Plist, } setup( name='Name Goes Here', version='0.0.1', app=APP, # Added requires to see if it helped requires=['ZSI'], data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) --eof-- The script "startui.py" does indirectly reference ZSI classes: startui.pu: from foo import login foo/login/__init__.py: from soap.LoginService_services import LoginServiceLocator soap/LoginService_services.py: import ZSI (and others) All paths relative to the directory containing setup.py, obviously. The resulting .app bundle does not contain ZSI and as such will not run, even on my own system. How can I convince py2app to either include the .egg file or the relevant pieces of it? Owen From tobias.rodaebel at mac.com Tue Aug 28 09:56:58 2007 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Tue, 28 Aug 2007 09:56:58 +0200 Subject: [Pythonmac-SIG] Py2App and third-party .egg dependencies installed through easy_install In-Reply-To: <240cdd640708271956g283728c9s1f0e25a735105e66@mail.gmail.com> References: <240cdd640708271956g283728c9s1f0e25a735105e66@mail.gmail.com> Message-ID: <75541EF1-A6BE-4765-BE85-891A74D3AFCB@mac.com> Hi Owen, py2app (in particula modulegraph) cannot handle eggs in the right way. unzip the ZSI egg into a directory with the same name, delete the egg and try the following setup.py ===================== snip ===================== #!/usr/bin/env python from setuptools import setup Plist = dict(CFBundleDocumentTypes= [], CFBundleIdentifier='net.lionsanctuary.foo.Client') APP = ['startui.py'] DATA_FILES = [] OPTIONS = { 'plist': Plist, 'packages' : ['ZSI'], } setup( name='fooapp', version='0.0.1', app=APP, install_requires=['ZSI'], data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) ===================== snip ===================== Cheers, Tobias Am 28.08.2007 um 04:56 schrieb Owen Jacobson: > Hi, > > I'm using an easy_install'ed copy of ZSI 2.0rc3, residing in > ~/Library/Python/2.5/site-packages/ as ZSI-2.0_rc3-py2.5.egg. I have > a py2app-enabled setup.py that reads as follows: > > #!/usr/bin/env python > from setuptools import setup > > Plist = dict(CFBundleDocumentTypes= [], > CFBundleIdentifier='net.lionsanctuary.foo.Client') > > APP = ['startui.py'] > DATA_FILES = [] > OPTIONS = {'plist': Plist, > } > > setup( > name='Name Goes Here', > version='0.0.1', > app=APP, > # Added requires to see if it helped > requires=['ZSI'], > data_files=DATA_FILES, > options={'py2app': OPTIONS}, > setup_requires=['py2app'], > ) > --eof-- > > The script "startui.py" does indirectly reference ZSI classes: > startui.pu: from foo import login > foo/login/__init__.py: from soap.LoginService_services import > LoginServiceLocator > soap/LoginService_services.py: import ZSI (and others) > > All paths relative to the directory containing setup.py, obviously. > > The resulting .app bundle does not contain ZSI and as such will not > run, even on my own system. How can I convince py2app to either > include the .egg file or the relevant pieces of it? > > Owen > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From ronaldoussoren at mac.com Tue Aug 28 13:07:03 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 28 Aug 2007 04:07:03 -0700 Subject: [Pythonmac-SIG] Py2App and third-party .egg dependencies In-Reply-To: <75541EF1-A6BE-4765-BE85-891A74D3AFCB@mac.com> References: <240cdd640708271956g283728c9s1f0e25a735105e66@mail.gmail.com> <75541EF1-A6BE-4765-BE85-891A74D3AFCB@mac.com> Message-ID: On Tuesday, August 28, 2007, at 09:58AM, "Tobias Rod?bel" wrote: >Hi Owen, > >py2app (in particula modulegraph) cannot handle eggs in the right way. ... yet. I have a patch for py2app & friends that deals with zipped packages on sys.path (that is, zipped eggs), but haven't managed to merge that yet. That is a partial fix for issues like this, I'd like to teach py2app about eggs, that is add an option to copy entire eggs into the application bundle (possibly rewriting some bits of those eggs to avoid creating .python-eggs turds in user home directories for extensions). >unzip the ZSI egg into a directory with the same name, delete the egg >and try the following setup.py Or install using "easy_install -Z" instead of unzipping. Ronald > >===================== snip ===================== >#!/usr/bin/env python >from setuptools import setup > >Plist = dict(CFBundleDocumentTypes= [], > CFBundleIdentifier='net.lionsanctuary.foo.Client') > >APP = ['startui.py'] >DATA_FILES = [] >OPTIONS = { > 'plist': Plist, > 'packages' : ['ZSI'], >} > >setup( > name='fooapp', > version='0.0.1', > app=APP, > install_requires=['ZSI'], > data_files=DATA_FILES, > options={'py2app': OPTIONS}, > setup_requires=['py2app'], >) >===================== snip ===================== > >Cheers, >Tobias > >Am 28.08.2007 um 04:56 schrieb Owen Jacobson: > >> Hi, >> >> I'm using an easy_install'ed copy of ZSI 2.0rc3, residing in >> ~/Library/Python/2.5/site-packages/ as ZSI-2.0_rc3-py2.5.egg. I have >> a py2app-enabled setup.py that reads as follows: >> >> #!/usr/bin/env python >> from setuptools import setup >> >> Plist = dict(CFBundleDocumentTypes= [], >> CFBundleIdentifier='net.lionsanctuary.foo.Client') >> >> APP = ['startui.py'] >> DATA_FILES = [] >> OPTIONS = {'plist': Plist, >> } >> >> setup( >> name='Name Goes Here', >> version='0.0.1', >> app=APP, >> # Added requires to see if it helped >> requires=['ZSI'], >> data_files=DATA_FILES, >> options={'py2app': OPTIONS}, >> setup_requires=['py2app'], >> ) >> --eof-- >> >> The script "startui.py" does indirectly reference ZSI classes: >> startui.pu: from foo import login >> foo/login/__init__.py: from soap.LoginService_services import >> LoginServiceLocator >> soap/LoginService_services.py: import ZSI (and others) >> >> All paths relative to the directory containing setup.py, obviously. >> >> The resulting .app bundle does not contain ZSI and as such will not >> run, even on my own system. How can I convince py2app to either >> include the .egg file or the relevant pieces of it? >> >> Owen >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG at python.org >http://mail.python.org/mailman/listinfo/pythonmac-sig > > From tobias.rodaebel at mac.com Tue Aug 28 22:49:07 2007 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Tue, 28 Aug 2007 22:49:07 +0200 Subject: [Pythonmac-SIG] Py2App and third-party .egg dependencies In-Reply-To: References: <240cdd640708271956g283728c9s1f0e25a735105e66@mail.gmail.com> <75541EF1-A6BE-4765-BE85-891A74D3AFCB@mac.com> Message-ID: <4987170C-80B4-4821-9D4C-77F49738AF55@mac.com> On Tuesday, August 28, 2007, at 13:07 Ronald Oussoren wrote: > On Tuesday, August 28, 2007, at 09:58AM, "Tobias Rod?bel" > wrote: >> Hi Owen, >> >> py2app (in particula modulegraph) cannot handle eggs in the right >> way. > > ... yet. I have a patch for py2app & friends that deals with > zipped packages on sys.path (that is, zipped eggs), but haven't > managed to merge that yet. I'm very interested in having a look at this patch. :-) > That is a partial fix for issues like this, I'd like to teach > py2app about eggs, that is add an option to copy entire eggs into > the application bundle (possibly rewriting some bits of those eggs > to avoid creating .python-eggs turds in user home directories for > extensions). Why do you see the need of rewriting some bits of those eggs? I don't know if I really understand the problem. Maybe setting the environment variable PYTHON_EGG_CACHE helps. Or pkg_resources.set_extraction_path(path) as described here http:// peak.telecommunity.com/DevCenter/PkgResources#resource-extraction Cheers, Tobias From angrybaldguy at gmail.com Wed Aug 29 02:44:28 2007 From: angrybaldguy at gmail.com (Owen Jacobson) Date: Tue, 28 Aug 2007 17:44:28 -0700 Subject: [Pythonmac-SIG] Py2App and third-party .egg dependencies In-Reply-To: References: <240cdd640708271956g283728c9s1f0e25a735105e66@mail.gmail.com> <75541EF1-A6BE-4765-BE85-891A74D3AFCB@mac.com> Message-ID: <240cdd640708281744t31e0ad09la98d535d2cb3ac9f@mail.gmail.com> On 8/28/07, Ronald Oussoren wrote: > > On Tuesday, August 28, 2007, at 09:58AM, "Tobias Rod?bel" wrote: > >Hi Owen, > > > >py2app (in particula modulegraph) cannot handle eggs in the right way. > > ... yet. I have a patch for py2app & friends that deals with zipped packages on sys.path (that is, zipped eggs), but haven't managed to merge that yet. > > That is a partial fix for issues like this, I'd like to teach py2app about eggs, that is add an option to copy entire eggs into the application bundle (possibly rewriting some bits of those eggs to avoid creating .python-eggs turds in user home directories for extensions). > > >unzip the ZSI egg into a directory with the same name, delete the egg > >and try the following setup.py > > Or install using "easy_install -Z" instead of unzipping. Interesting. That works, even though ZSI depends in turn on other .egg distributions, which get correctly detected by modulegraph and correctly unpacked and copied by py2app. I wonder what it is about the ZSI .egg distribution that trips modulegraph up. Anyways, thank you very much to you both, py2app is much happier now. Good cheer, Owen From ronaldoussoren at mac.com Wed Aug 29 07:58:49 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 29 Aug 2007 07:58:49 +0200 Subject: [Pythonmac-SIG] Py2App and third-party .egg dependencies In-Reply-To: <4987170C-80B4-4821-9D4C-77F49738AF55@mac.com> References: <240cdd640708271956g283728c9s1f0e25a735105e66@mail.gmail.com> <75541EF1-A6BE-4765-BE85-891A74D3AFCB@mac.com> <4987170C-80B4-4821-9D4C-77F49738AF55@mac.com> Message-ID: On 28 Aug, 2007, at 22:49, Tobias Rod?bel wrote: > On Tuesday, August 28, 2007, at 13:07 Ronald Oussoren wrote: > >> On Tuesday, August 28, 2007, at 09:58AM, "Tobias Rod?bel" > > wrote: >>> Hi Owen, >>> >>> py2app (in particula modulegraph) cannot handle eggs in the right >>> way. >> >> ... yet. I have a patch for py2app & friends that deals with >> zipped packages on sys.path (that is, zipped eggs), but haven't >> managed to merge that yet. > > I'm very interested in having a look at this patch. :-) I want to merge that this week, but I've wanted to do that for several weeks now :-( > > >> That is a partial fix for issues like this, I'd like to teach >> py2app about eggs, that is add an option to copy entire eggs into >> the application bundle (possibly rewriting some bits of those eggs >> to avoid creating .python-eggs turds in user home directories for >> extensions). > > Why do you see the need of rewriting some bits of those eggs? I > don't know if I really understand the problem. Maybe setting the > environment variable PYTHON_EGG_CACHE helps. Or > pkg_resources.set_extraction_path(path) as described here http://peak.telecommunity.com/DevCenter/PkgResources#resource-extraction A zip-safe egg may contain extensions and those won't work when they are inside the zipfile. The setuptools "work-around" for this is to have a python module in the zipfile that will extract the extension into a ~/.python-eggs when someone tries to import the extension. That works, but is IMHO not needed for .app bundles. What I intend to do is to do the extraction when building the .app bundle and replace the python file by one that knows where the exensions are stored in the .app bundle. That keeps the end-users system nice and clean. pkg_resources.set_extraction_path is usefull as well, py2app should probably detect that the application uses pkg_resources if so call pkg_sources.set_extract_path(os.path.expanduser("~/Library/Application Support/APPNAME/python-eggs")) to ensure that data files get extracted into an application-specific directory instead of a global one. Ronald > > > Cheers, > Tobias > From tobias.rodaebel at mac.com Wed Aug 29 13:40:42 2007 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Wed, 29 Aug 2007 13:40:42 +0200 Subject: [Pythonmac-SIG] py2app: options 'plugin'/'app' Message-ID: Hi Ronald, I was wondering why 'plugin' and 'app' are no py2app options? There is no other setup command needing them, I guess. I patched py2app/ build_app.py, to have 'plugin' and 'app' as real py2app-options. That gives the opportunity to define them through setup.cfg as well, they will be listed via --help etc. This is my patch: --- build_app.py 2007-08-29 13:32:15.000000000 +0200 +++ my_build_app.py 2007-08-29 13:33:49.000000000 +0200 @@ -12,6 +12,7 @@ import plistlib import shlex from cStringIO import StringIO +from types import ListType, TupleType from setuptools import Command from distutils.util import convert_path @@ -105,6 +106,12 @@ def FixupTargets(targets, default_attribute): if not targets: return targets + try: + targets = eval(targets) + except: + pass + if type(targets) not in (ListType, TupleType): + targets = [targets] ret = [] for target_def in targets: if isinstance(target_def, basestring): @@ -145,8 +152,11 @@ # List of option tuples: long name, short name (None if no short # name), and help string. - user_options = [ + ("app=", None, + "???"), + ("plugin=", None, + "???"), ('optimize=', 'O', "optimization level: -O1 for \"python -O\", " "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), @@ -227,6 +237,8 @@ ] def initialize_options (self): + self.app = None + self.plugin = None self.bdist_base = None self.xref = False self.graph = False @@ -820,8 +832,8 @@ dist = self.distribution # Convert our args into target objects. - dist.app = FixupTargets(dist.app, "script") - dist.plugin = FixupTargets(dist.plugin, "script") + dist.app = FixupTargets(self.app, "script") + dist.plugin = FixupTargets(self.plugin, "script") if dist.app and dist.plugin: # XXX - support apps and plugins? raise DistutilsOptionError( What do you think about that? I'm pretty new to py2app. So maybe I missed something. Regards, Tobias From ronaldoussoren at mac.com Wed Aug 29 17:22:11 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 29 Aug 2007 08:22:11 -0700 Subject: [Pythonmac-SIG] py2app: options 'plugin'/'app' In-Reply-To: References: Message-ID: On Wednesday, August 29, 2007, at 01:40PM, "Tobias Rod?bel" wrote: >Hi Ronald, > >I was wondering why 'plugin' and 'app' are no py2app options? There >is no other setup command needing them, I guess. I patched py2app/ >build_app.py, to have 'plugin' and 'app' as real py2app-options. That >gives the opportunity to define them through setup.cfg as well, they >will be listed via --help etc. Good question, maybe Bob knows. My guess is that py2app tries to be compatible with py2exe. Ronald From bob at redivi.com Wed Aug 29 17:36:55 2007 From: bob at redivi.com (Bob Ippolito) Date: Wed, 29 Aug 2007 08:36:55 -0700 Subject: [Pythonmac-SIG] py2app: options 'plugin'/'app' In-Reply-To: References: Message-ID: <6a36e7290708290836o56d954e0u7e00cb6088d66372@mail.gmail.com> On 8/29/07, Ronald Oussoren wrote: > > On Wednesday, August 29, 2007, at 01:40PM, "Tobias Rod?bel" wrote: > >Hi Ronald, > > > >I was wondering why 'plugin' and 'app' are no py2app options? There > >is no other setup command needing them, I guess. I patched py2app/ > >build_app.py, to have 'plugin' and 'app' as real py2app-options. That > >gives the opportunity to define them through setup.cfg as well, they > >will be listed via --help etc. > > Good question, maybe Bob knows. My guess is that py2app tries to be compatible with py2exe. > That's right, it does things the way py2exe does. It looks like the patch might break the way it works now? If it was just an alternative method then it could be applied, but if it's not backwards compatible then it definitely will not be accepted. -bob From tobias.rodaebel at mac.com Wed Aug 29 18:35:30 2007 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Wed, 29 Aug 2007 18:35:30 +0200 Subject: [Pythonmac-SIG] py2app: options 'plugin'/'app' In-Reply-To: <6a36e7290708290836o56d954e0u7e00cb6088d66372@mail.gmail.com> References: <6a36e7290708290836o56d954e0u7e00cb6088d66372@mail.gmail.com> Message-ID: <85EBB21F-6D0A-4BBB-9F8A-45E39E33D5B0@mac.com> Hi Bob, On 08/29/2007 at 17:36, Bob Ippolito wrote: > That's right, it does things the way py2exe does. It looks like the > patch might break the way it works now? If it was just an alternative > method then it could be applied, but if it's not backwards compatible > then it definitely will not be accepted. > > -bob I changed a few lines of my patch. Now it should be fully backwards compatible and I would be glad if you accept it. Here it comes: --- build_app.py (revision 61) +++ build_app.py (working copy) @@ -12,6 +12,7 @@ import plistlib import shlex from cStringIO import StringIO +from types import ListType, TupleType from setuptools import Command from distutils.util import convert_path @@ -105,6 +106,12 @@ def FixupTargets(targets, default_attribute): if not targets: return targets + try: + targets = eval(targets) + except: + pass + if type(targets) not in (ListType, TupleType): + targets = [targets] ret = [] for target_def in targets: if isinstance(target_def, basestring): @@ -145,8 +152,11 @@ # List of option tuples: long name, short name (None if no short # name), and help string. - user_options = [ + ("app=", None, + "application bundle to be built"), + ("plugin=", None, + "plugin bundle to be built"), ('optimize=', 'O', "optimization level: -O1 for \"python -O\", " "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), @@ -227,6 +237,8 @@ ] def initialize_options (self): + self.app = None + self.plugin = None self.bdist_base = None self.xref = False self.graph = False @@ -819,9 +831,18 @@ def fixup_distribution(self): dist = self.distribution + # Trying to obtain app and plugin from dist for backward compatibility + # reasons. + app = dist.app + plugin = dist.plugin + # If we can get suitable values from self.app or self.plugin, we prefer + # them. + if self.app is not None or self.plugin is not None: + app = self.app + plugin = self.plugin # Convert our args into target objects. - dist.app = FixupTargets(dist.app, "script") - dist.plugin = FixupTargets(dist.plugin, "script") + dist.app = FixupTargets(app, "script") + dist.plugin = FixupTargets(plugin, "script") if dist.app and dist.plugin: # XXX - support apps and plugins? raise DistutilsOptionError( Regards, Tobias From bob at redivi.com Wed Aug 29 18:39:56 2007 From: bob at redivi.com (Bob Ippolito) Date: Wed, 29 Aug 2007 09:39:56 -0700 Subject: [Pythonmac-SIG] py2app: options 'plugin'/'app' In-Reply-To: <85EBB21F-6D0A-4BBB-9F8A-45E39E33D5B0@mac.com> References: <6a36e7290708290836o56d954e0u7e00cb6088d66372@mail.gmail.com> <85EBB21F-6D0A-4BBB-9F8A-45E39E33D5B0@mac.com> Message-ID: <6a36e7290708290939n99b95e1se6c842001f6ed553@mail.gmail.com> On 8/29/07, Tobias Rod?bel wrote: > Hi Bob, > > On 08/29/2007 at 17:36, Bob Ippolito wrote: > > > That's right, it does things the way py2exe does. It looks like the > > patch might break the way it works now? If it was just an alternative > > method then it could be applied, but if it's not backwards compatible > > then it definitely will not be accepted. > > > > -bob > > I changed a few lines of my patch. Now it should be fully backwards > compatible and I would be glad if you accept it. > That patch doesn't apply for me, I think it got line wrapped or something along the way. Can you send it as an attachment or post it somewhere and send a URL? -bob From tobias.rodaebel at mac.com Wed Aug 29 18:45:24 2007 From: tobias.rodaebel at mac.com (=?ISO-8859-1?Q?Tobias_Rod=E4bel?=) Date: Wed, 29 Aug 2007 18:45:24 +0200 Subject: [Pythonmac-SIG] py2app: options 'plugin'/'app' In-Reply-To: <6a36e7290708290939n99b95e1se6c842001f6ed553@mail.gmail.com> References: <6a36e7290708290836o56d954e0u7e00cb6088d66372@mail.gmail.com> <85EBB21F-6D0A-4BBB-9F8A-45E39E33D5B0@mac.com> <6a36e7290708290939n99b95e1se6c842001f6ed553@mail.gmail.com> Message-ID: <2EC7D4B8-940D-44AA-B4D8-44FCB8F29651@mac.com> Hi, On 08/29/2007 at 18:39, Bob Ippolito wrote: > > That patch doesn't apply for me, I think it got line wrapped or > something along the way. Can you send it as an attachment or post it > somewhere and send a URL? > > -bob Attached it as gzipped patch-file. -------------- next part -------------- A non-text attachment was scrubbed... Name: build_app.py.patch.gz Type: application/x-gzip Size: 927 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20070829/82bc0f5e/attachment.bin -------------- next part -------------- Cheers, Tobias From bob at redivi.com Wed Aug 29 18:53:02 2007 From: bob at redivi.com (Bob Ippolito) Date: Wed, 29 Aug 2007 09:53:02 -0700 Subject: [Pythonmac-SIG] py2app: options 'plugin'/'app' In-Reply-To: <2EC7D4B8-940D-44AA-B4D8-44FCB8F29651@mac.com> References: <6a36e7290708290836o56d954e0u7e00cb6088d66372@mail.gmail.com> <85EBB21F-6D0A-4BBB-9F8A-45E39E33D5B0@mac.com> <6a36e7290708290939n99b95e1se6c842001f6ed553@mail.gmail.com> <2EC7D4B8-940D-44AA-B4D8-44FCB8F29651@mac.com> Message-ID: <6a36e7290708290953i3b918cc0qe649edb158708663@mail.gmail.com> On 8/29/07, Tobias Rod?bel wrote: > Hi, > > On 08/29/2007 at 18:39, Bob Ippolito wrote: > > > > That patch doesn't apply for me, I think it got line wrapped or > > something along the way. Can you send it as an attachment or post it > > somewhere and send a URL? > > > > -bob > > Attached it as gzipped patch-file. > Applied in r62, thanks. -bob From reuben at swirl.net Wed Aug 29 21:33:52 2007 From: reuben at swirl.net (Reuben Avery) Date: Wed, 29 Aug 2007 12:33:52 -0700 Subject: [Pythonmac-SIG] Help with py2app-- not including PyQT? Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070829/a9dd3949/attachment.htm From vip at avatar.com.au Thu Aug 30 01:56:38 2007 From: vip at avatar.com.au (David Worrall) Date: Thu, 30 Aug 2007 09:56:38 +1000 Subject: [Pythonmac-SIG] seg fault in intelOSX+python2.4 Message-ID: <4CD68456-D2AF-4FC2-9B6A-FC6E2E4EAC42@avatar.com.au> Hi all, I've been using PyTables (www.pytables.org) with python2.4 on intel Mac OSX 10.4.10 and I'm running into a seg. fault when generating a large hdf5 file. Almost certainly something to do with relationship between OS and python. Has anyone had a similar (memory leak?) experience? _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au/vc-forum/scrg vip=Verbal Interactivity Project From ronaldoussoren at mac.com Thu Aug 30 07:48:07 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 30 Aug 2007 07:48:07 +0200 Subject: [Pythonmac-SIG] seg fault in intelOSX+python2.4 In-Reply-To: <4CD68456-D2AF-4FC2-9B6A-FC6E2E4EAC42@avatar.com.au> References: <4CD68456-D2AF-4FC2-9B6A-FC6E2E4EAC42@avatar.com.au> Message-ID: <56BAFD62-A699-4114-BADB-5FC10077103F@mac.com> On 30 Aug, 2007, at 1:56, David Worrall wrote: > Hi all, > > I've been using PyTables (www.pytables.org) with python2.4 on intel > Mac OSX 10.4.10 > and I'm running into a seg. fault when generating a large hdf5 file. > > Almost certainly something to do with relationship between OS and > python. > Has anyone had a similar (memory leak?) experience? How large a file? It might be a memory management bug in pytables as well. If you have the developer tools (Xcode & friends) installed you can find out where the crash occurs using gdb. That is, 'gdb python', then on the prompt for gdb: 'r myscript.py' (adding arguments if needed). When the crash occurs you can use 'where 20' to see the topmost 20 frames on the C stack, or just 'where' to see the entire stack. Ronald > > > > > _________________________________________________ > experimental polymedia: www.avatar.com.au > Sonic Communications Research Group, > University of Canberra: www.canberra.edu.au/vc-forum/scrg > vip=Verbal Interactivity Project > > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From cygnusxlist at mac.com Fri Aug 31 00:26:46 2007 From: cygnusxlist at mac.com (cygnusxlist at mac.com) Date: Thu, 30 Aug 2007 18:26:46 -0400 Subject: [Pythonmac-SIG] Strange failure on 'python setup.py build' after 10.4.10 update Message-ID: <7AD4ECCB-F694-40E4-BDBF-2FE9A9954D5C@mac.com> My G5 at work has started spitting out this message when I try to build a python package from source. The previous week I completed many builds with no problem. I did similar builds on my home system with no problem. The major change at work was I finally installed the 10.4.10 update (and suddenly had to change my $PATH to get python 2.4 back!) and my home system is still at 10.4.9. Is this a known issue & I'm behind the times or is this new? Thanks, Tom wise 9% python setup.py build Traceback (most recent call last): File ?setup.py?, line 693, in ? classifiers = [ File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/core.py?, line 123, in setup dist.parse_config_files() File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/dist.py?, line 339, in parse_config_files filenames = self.find_config_files() File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/dist.py?, line 302, in find_config_files check_environ() File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/util.py?, line 209, in check_environ os.environ['PLAT'] = get_platform() File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/util.py?, line 78, in get_platform cfgvars = get_config_vars() File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/sysconfig.py?, line 488, in get_config_vars func() File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ python2.4/distutils/sysconfig.py?, line 373, in _init_posix raise DistutilsPlatformError(my_msg) distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now ?10.4? but ?10.3? during configure -- W.T. Bridgman, Ph.D. Physics & Astronomy From ronaldoussoren at mac.com Fri Aug 31 08:27:13 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 31 Aug 2007 08:27:13 +0200 Subject: [Pythonmac-SIG] Strange failure on 'python setup.py build' after 10.4.10 update In-Reply-To: <7AD4ECCB-F694-40E4-BDBF-2FE9A9954D5C@mac.com> References: <7AD4ECCB-F694-40E4-BDBF-2FE9A9954D5C@mac.com> Message-ID: <0E72111E-C2D6-481B-AF5A-A43070B87630@mac.com> On 31 Aug, 2007, at 0:26, cygnusxlist at mac.com wrote: > My G5 at work has started spitting out this message when I try to > build a python package from source. The previous week I completed > many builds with no problem. I did similar builds on my home system > with no problem. > > The major change at work was I finally installed the 10.4.10 update > (and suddenly had to change my $PATH to get python 2.4 back!) and my > home system is still at 10.4.9. > > Is this a known issue & I'm behind the times or is this new? I haven't seen this before. Where did you have to change your path to to get python 2.4 back? AFAIK 10.4.x ships with Python 2.3, any other version was installed manually and hence requires changes to $PATH anyway. Is MACOSX_DEPLOYMENT_TARGET in your environment? If so, try unsetting it before building extensions. Ronald > > > Thanks, > Tom > > wise 9% python setup.py build > Traceback (most recent call last): > File ?setup.py?, line 693, in ? > classifiers = [ > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/core.py?, line 123, in setup > dist.parse_config_files() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/dist.py?, line 339, in parse_config_files > filenames = self.find_config_files() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/dist.py?, line 302, in find_config_files > check_environ() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/util.py?, line 209, in check_environ > os.environ['PLAT'] = get_platform() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/util.py?, line 78, in get_platform > cfgvars = get_config_vars() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/sysconfig.py?, line 488, in get_config_vars > func() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/sysconfig.py?, line 373, in _init_posix > raise DistutilsPlatformError(my_msg) > distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET > mismatch: now ?10.4? but ?10.3? during configure > > -- > W.T. Bridgman, Ph.D. > Physics & Astronomy > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From vip at avatar.com.au Fri Aug 31 11:18:34 2007 From: vip at avatar.com.au (David Worrall) Date: Fri, 31 Aug 2007 19:18:34 +1000 Subject: [Pythonmac-SIG] seg fault in intelOSX+python2.4 In-Reply-To: <56BAFD62-A699-4114-BADB-5FC10077103F@mac.com> References: <4CD68456-D2AF-4FC2-9B6A-FC6E2E4EAC42@avatar.com.au> <56BAFD62-A699-4114-BADB-5FC10077103F@mac.com> Message-ID: <4CACAE25-12D0-4787-9312-5D9B48AF4E7E@avatar.com.au> Thanks for your feedback Ronald. The file is quite large: 4-5 GB pytables buffers the data and controlling the buffer size occasionally stops or slows the rot. The code has been tested under Linux without incident. faltet at carabos.com, one of the developers of pytables wrote: > A Tuesday 21 August 2007, David Worrall escrigu?: > >> I lowered NODE_MAX_SLOTS from 256 to128 and that slowed the leak - >> enough to get some sort of DB happening. >> It eventually seg faulted, however. >> I've noticed that sometimes the seg fault causes the (non-python) >> heap to become corrupted, requiring a HW reboot before pytables >> becomes useful again. >> Who knows what memory it may be writing over! >> > > I don't think there is a leak in PyTables itself; it is just that it > takes a lot of memory to work with many nodes simultaneously. Perhaps > reducing the NODE_MAX_SLOTS (to 64, for example) could help a bit > more. > Perhaps it would be a good idea to reduce the memory requirements of > PyTables nodes (for example, avoid the creation of buffers when they > are not needed), but this should take quite a few of thought. > > Indeed it seems that there is a problem with the MacOSX platform, but > the fact that this is not reproducible on Linux is unfortunate. ... > I'm thinking that perhaps you can try with newer versions of Python > (2.5.1) and HDF5 (the 1.8.0 beta3 is out, and I know that it wears a > completely revamped cache system, so maybe it is worth a try). > Anyway I'll try with gdb as you suggest and report back. I need to put it on my task stack so it'll take some time. thanks again, David On 30/08/2007, at 3:48 PM, Ronald Oussoren wrote: > > On 30 Aug, 2007, at 1:56, David Worrall wrote: > >> Hi all, >> >> I've been using PyTables (www.pytables.org) with python2.4 on intel >> Mac OSX 10.4.10 >> and I'm running into a seg. fault when generating a large hdf5 file. >> >> Almost certainly something to do with relationship between OS and >> python. >> Has anyone had a similar (memory leak?) experience? > > How large a file? It might be a memory management bug in pytables > as well. > > If you have the developer tools (Xcode & friends) installed you can > find out where the crash occurs using gdb. > > That is, 'gdb python', then on the prompt for gdb: 'r > myscript.py' (adding arguments if needed). When the crash occurs > you can use 'where 20' to see the topmost 20 frames on the C stack, > or just 'where' to see the entire stack. > > Ronald >> >> >> >> >> _________________________________________________ >> experimental polymedia: www.avatar.com.au >> Sonic Communications Research Group, >> University of Canberra: www.canberra.edu.au/vc-forum/scrg >> vip=Verbal Interactivity Project >> >> >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > _________________________________________________ experimental polymedia: www.avatar.com.au Sonic Communications Research Group, University of Canberra: www.canberra.edu.au/vc-forum/scrg vip=Verbal Interactivity Project From ronaldoussoren at mac.com Fri Aug 31 11:31:38 2007 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 31 Aug 2007 02:31:38 -0700 Subject: [Pythonmac-SIG] seg fault in intelOSX+python2.4 In-Reply-To: <4CACAE25-12D0-4787-9312-5D9B48AF4E7E@avatar.com.au> References: <4CD68456-D2AF-4FC2-9B6A-FC6E2E4EAC42@avatar.com.au> <56BAFD62-A699-4114-BADB-5FC10077103F@mac.com> <4CACAE25-12D0-4787-9312-5D9B48AF4E7E@avatar.com.au> Message-ID: David, It might be stacksize related, you could try to to increase that to see if that helps. If you use bash you can use the following procedure to increase the stack size: $ ulimit -Hs $ ulimit -s This increases the stacksize limit to the hard limit for the stack size. This wouldn't be real solution for the problem, but would help pinpoint the problem. Ronald On Friday, August 31, 2007, at 11:20AM, "David Worrall" wrote: >Thanks for your feedback Ronald. >The file is quite large: 4-5 GB >pytables buffers the data and controlling the buffer size >occasionally stops or slows the rot. >The code has been tested under Linux without incident. >faltet at carabos.com, one of the developers of pytables wrote: > >> A Tuesday 21 August 2007, David Worrall escrigu?: >> >>> I lowered NODE_MAX_SLOTS from 256 to128 and that slowed the leak - >>> enough to get some sort of DB happening. >>> It eventually seg faulted, however. >>> I've noticed that sometimes the seg fault causes the (non-python) >>> heap to become corrupted, requiring a HW reboot before pytables >>> becomes useful again. >>> Who knows what memory it may be writing over! >>> >> >> I don't think there is a leak in PyTables itself; it is just that it >> takes a lot of memory to work with many nodes simultaneously. Perhaps >> reducing the NODE_MAX_SLOTS (to 64, for example) could help a bit >> more. >> Perhaps it would be a good idea to reduce the memory requirements of >> PyTables nodes (for example, avoid the creation of buffers when they >> are not needed), but this should take quite a few of thought. >> >> Indeed it seems that there is a problem with the MacOSX platform, but >> the fact that this is not reproducible on Linux is unfortunate. >... >> I'm thinking that perhaps you can try with newer versions of Python >> (2.5.1) and HDF5 (the 1.8.0 beta3 is out, and I know that it wears a >> completely revamped cache system, so maybe it is worth a try). >> > >Anyway I'll try with gdb as you suggest and report back. I need to >put it on my task stack so it'll take some time. > >thanks again, > >David >On 30/08/2007, at 3:48 PM, Ronald Oussoren wrote: > >> >> On 30 Aug, 2007, at 1:56, David Worrall wrote: >> >>> Hi all, >>> >>> I've been using PyTables (www.pytables.org) with python2.4 on intel >>> Mac OSX 10.4.10 >>> and I'm running into a seg. fault when generating a large hdf5 file. >>> >>> Almost certainly something to do with relationship between OS and >>> python. >>> Has anyone had a similar (memory leak?) experience? >> >> How large a file? It might be a memory management bug in pytables >> as well. >> >> If you have the developer tools (Xcode & friends) installed you can >> find out where the crash occurs using gdb. >> >> That is, 'gdb python', then on the prompt for gdb: 'r >> myscript.py' (adding arguments if needed). When the crash occurs >> you can use 'where 20' to see the topmost 20 frames on the C stack, >> or just 'where' to see the entire stack. >> >> Ronald >>> >>> >>> >>> >>> _________________________________________________ >>> experimental polymedia: www.avatar.com.au >>> Sonic Communications Research Group, >>> University of Canberra: www.canberra.edu.au/vc-forum/scrg >>> vip=Verbal Interactivity Project >>> >>> >>> >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >>> http://mail.python.org/mailman/listinfo/pythonmac-sig >> > >_________________________________________________ >experimental polymedia: www.avatar.com.au >Sonic Communications Research Group, >University of Canberra: www.canberra.edu.au/vc-forum/scrg >vip=Verbal Interactivity Project > > > >_______________________________________________ >Pythonmac-SIG maillist - Pythonmac-SIG at python.org >http://mail.python.org/mailman/listinfo/pythonmac-sig > > From ed_hartley at mac.com Fri Aug 31 14:17:23 2007 From: ed_hartley at mac.com (Edward Hartley) Date: Fri, 31 Aug 2007 13:17:23 +0100 Subject: [Pythonmac-SIG] Strange failure on 'python setup.py build' after 10.4.10 update In-Reply-To: References: Message-ID: <6BCF182C-C398-49DB-8420-3371CDCCC9AA@mac.com> > > From: cygnusxlist at mac.com > Date: 30 August 2007 23:26:46 BDT > To: pythonmac-sig at python.org > Subject: [Pythonmac-SIG] Strange failure on 'python setup.py build' > after 10.4.10 update > > > My G5 at work has started spitting out this message when I try to > build a python package from source. The previous week I completed > many builds with no problem. I did similar builds on my home > system with no problem. > > The major change at work was I finally installed the 10.4.10 update > (and suddenly had to change my $PATH to get python 2.4 back!) and > my home system is still at 10.4.9. > I would check that the default python is in fact 2.4 or whatever version you think it should be and not an earlier version. You may have had an Apple build of python included in this update. This would overwrite any symbolic links to the 2.4 install you made after the original OS install. Which would explain why you had to change the $PATH Certainly doing a full install of XCode will cause the default python to revert to 2.3 Best Ed > Is this a known issue & I'm behind the times or is this new? > > Thanks, > Tom > > wise 9% python setup.py build > Traceback (most recent call last): > File ?setup.py?, line 693, in ? > classifiers = [ > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/core.py?, line 123, in setup > dist.parse_config_files() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/dist.py?, line 339, in parse_config_files > filenames = self.find_config_files() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/dist.py?, line 302, in find_config_files > check_environ() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/util.py?, line 209, in check_environ > os.environ['PLAT'] = get_platform() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/util.py?, line 78, in get_platform > cfgvars = get_config_vars() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/sysconfig.py?, line 488, in get_config_vars > func() > File ?/Library/Frameworks/Python.framework/Versions/2.4//lib/ > python2.4/distutils/sysconfig.py?, line 373, in _init_posix > raise DistutilsPlatformError(my_msg) > distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET > mismatch: now ?10.4? but ?10.3? during configure > > -- > W.T. Bridgman, Ph.D. > Physics & Astronomy > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20070831/74c9fc1e/attachment.htm