From lorenzo.guerrasio at email.it Thu Sep 2 12:37:45 2010 From: lorenzo.guerrasio at email.it (Lorenzo.guerrasio) Date: Thu, 2 Sep 2010 12:37:45 +0200 Subject: [Pythonmac-SIG] PyOpenGL on mac Message-ID: Dear mac user, I've been programming with python for some months, and I recently moved to macos. In had some problem using openGL. I wrote a simple example where I make a frame with 2 openGL canvas that should be reparented to a fullscreen frame on right mouse click. While on winOS I have no problem, on macOS, after reparenting, openGL does not draw on the new frame. I have no clue how to solve this problem, and maybe you can give me some hint. The code atteached is the simple example I wrote to test this functionality. Thanks in advance. Lorenzo -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it: http://www.email.it/f Sponsor: HOTEL MOCAMBO Riccione: A due passi dal mare, in zona pedonale. Pacchetti hotel + spiaggia Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=10899&d=20100902 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: deleteme Type: application/octet-stream Size: 8182 bytes Desc: not available URL: From lorenzo.guerrasio at email.it Thu Sep 2 11:45:31 2010 From: lorenzo.guerrasio at email.it (Lorenzo.guerrasio) Date: Thu, 2 Sep 2010 11:45:31 +0200 Subject: [Pythonmac-SIG] PyOpenGL on mac Message-ID: Dear mac user, I've been programming with python for some months, and I recently moved to macos. In had some problem using openGL. I wrote a simple example where I make a frame with 2 openGL canvas that should be reparented to a fullscreen frame on right mouse click. While on winOS I have no problem, on macOS, after reparenting, openGL does not draw on the new frame. I have no clue how to solve this problem, and maybe you can give me some hint. The code atteached is the simple example I wrote to test this functionality. Thanks in advance. Lorenzo -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it: http://www.email.it/f Sponsor: Cattolica - Pesaro TombariHotels: ottimi alberghi e residence dotati dei migliori comfort, servizi e cortesia per le tue vacanze di fine Agosto/Settembre Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=10824&d=20100902 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: deleteme Type: application/octet-stream Size: 8182 bytes Desc: not available URL: From mhwang4 at gmail.com Fri Sep 3 02:36:12 2010 From: mhwang4 at gmail.com (Myunghwa Hwang) Date: Thu, 2 Sep 2010 17:36:12 -0700 Subject: [Pythonmac-SIG] Error with backend_wx.py after packaging with py2app In-Reply-To: References: Message-ID: Hello, list! I am trying to create a Mac application package from python modules using matplotlib and wxpython. Before packaging, my code generated only a user warning of multiple calls on matplotlib.use method. When I tried to run the application after packaging with py2app, the application crashed with the following error message: .... app/Contents/Resources/lib/python2.6/matplotlib/backends/backend_wx.py line 1769 in _init_toolbar .. app/Contents/Resources/lib/python2.6/matplotlib/backends/backend_wx.py line 1609 in _load_bitmap .. app/Contents/Resources/lib/python2.6/wx/_gdi.py line 555 in __init__ .. PyAssertionError: C++ assertion "IsOpened()" failed at /BUILD/wxPython-src-2.8.11.0/src/common/ffile.cpp(175) in Seek(): can't seek on closed file Please let me know how I can solve this problem. Thanks in advance! from Myunghwa Hwang -- Myunghwa Hwang GeoDa Center School of Geographical Sciences and Urban Planning Arizona State University mhwang4 at gmail.com or Myunghwa.Hwang at asu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjohnson3273 at yahoo.com Fri Sep 10 00:21:35 2010 From: rjohnson3273 at yahoo.com (Ron Johnson) Date: Thu, 9 Sep 2010 15:21:35 -0700 (PDT) Subject: [Pythonmac-SIG] Help: py2applet can not find py2app.scripts.script_py2applet Message-ID: <698490.340.qm@web120417.mail.ne1.yahoo.com> Me and my companions have tried to learn how to package programs through internet tutorials but all of the tutorials seem to require prior knowledge of how to package (or we are simple too dumb). We have gleaned how to manually make a setup.py and that commands should be given through the terminal. We were not sure where the manually created setup.py is suppose to go so we tried running the py2applet.py and it gave us the error py2applet can not find py2app.scripts.script_py2applet, which is the module it wants to import. We thought that the problem may be because the py2app package should go in your python installation but we were unable to do so. Do we need to be administrators for the files to go to the right places? How do we give modules to py2applet? Ron Johnson -------------- next part -------------- An HTML attachment was scrubbed... URL: From grubert at users.sourceforge.net Fri Sep 10 08:31:53 2010 From: grubert at users.sourceforge.net (engelbert gruber) Date: Fri, 10 Sep 2010 08:31:53 +0200 Subject: [Pythonmac-SIG] Help: py2applet can not find py2app.scripts.script_py2applet In-Reply-To: <698490.340.qm@web120417.mail.ne1.yahoo.com> References: <698490.340.qm@web120417.mail.ne1.yahoo.com> Message-ID: On Fri, Sep 10, 2010 at 12:21 AM, Ron Johnson wrote: > Me and my companions have tried to learn how to package programs through > internet tutorials but all of the tutorials seem to require prior knowledge > of how to package (or we are simple too dumb).? We have gleaned how to > manually make a setup.py and that commands should be given through the > terminal.? We were not sure where the manually created setup.py is suppose > to go so we tried running the py2applet.py and it gave us the error > py2applet can not find py2app.scripts.script_py2applet, which is the module > it wants to import.? We thought that the problem may be because the py2app > package should go in your python installation but we were unable to do so. > Do we need to be administrators for the files to go to the right places? use one of :: --prefix installation prefix --exec-prefix (Unix only) prefix for platform- specific files --home (Unix only) home directory to install under --user install in user site-package '/Users/engelbert/.local/lib/python2.6/ site-packages' --install-base base installation directory (instead of --prefix or --home) --install-platbase base installation directory for platform-specific files (instead of -- exec-prefix or --home) --root install everything relative to this alternate root directory > How do we give modules to py2applet? > > Ron Johnson > > > _______________________________________________ > Pythonmac-SIG maillist ?- ?Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > > From cweisiger at msg.ucsf.edu Fri Sep 10 20:25:29 2010 From: cweisiger at msg.ucsf.edu (Chris Weisiger) Date: Fri, 10 Sep 2010 11:25:29 -0700 Subject: [Pythonmac-SIG] py2app program unable to find files in lib-dynload Message-ID: I have a program that depends on wx, Paramiko (remote server access via SSH) and Crypto (same). Running py2app for this program generates an app (creatively named "processor.app") that errors out on running with this error: ImportError: '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/Crypto/Hash/SHA256.so' not found SHA256.so does exist, in ./dist/processor.app/Contents/Resources/lib/python2.5/lib-dynload/Crypto/Hash/SHA256.so This error message is generated by SHA256.py, which I can only find here: build/bdist.macosx-10.5-i386/python2.5-semi_standalone/app/temp/Crypto/Hash The code in SHA256.py appears to be intended to find the first match in sys.path that has 'Crypto/Hash/SHA256.so'. However, it raises an ImportError if the first entry in sys.path that ends with 'lib-dynload' doesn't have that file, and there's a bogus else statement after the for loop. I'm amazed it's even passing syntax checks. I've pasted the file online here: http://paste.ubuntu.com/491717/ This file is (I think) run after the build directory is created as part of creating the dist directory, which doesn't leave me a window to insert debugging code to figure out what it's doing wrong -- at least, I don't see an option for py2app to make the build directory but not the dist directory, and then as a second step to make the dist directory based on the build directory. I can fix it to make a launchable application by hacking __boot__.py to add this line to _run(): sys.path.insert(0, os.path.join(os.getcwd(), 'lib', 'python2.5', 'lib-dynload')) Appending the path to the end of sys.path doesn't work because SHA256.py only checks the first path entry that ends with 'lib-dynload', which is a /System directory. The path I am inserting here is not otherwise included in sys.path either, so without this hack it's physically impossible for py2app apps to find anything put into their lib-dynload directories. I've uploaded a tarball of the app here: http://derakon.dynydns.org/~chriswei/temp2/processor.tgz Here's a paste of the entire output of 'python setup.py py2app': http://paste.ubuntu.com/491723/ And here's a paste of the complete error message when I try to run the unmodified program: http://paste.ubuntu.com/491724/ -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From cweisiger at msg.ucsf.edu Sat Sep 11 00:06:21 2010 From: cweisiger at msg.ucsf.edu (Chris Weisiger) Date: Fri, 10 Sep 2010 15:06:21 -0700 Subject: [Pythonmac-SIG] [py2app] No module named os In-Reply-To: <0b54659f2d8ad56ba20b6c011fcee9ad@rosspixelworks.com> References: <4C6FD0BA.8080702@rosspixelworks.com> <4C72F5A4.3040708@rosspixelworks.com> <0b54659f2d8ad56ba20b6c011fcee9ad@rosspixelworks.com> Message-ID: Whelp, this problem is back, with a different program this time. All the fixes I have written down from last time don't work. Fortunately this time I don't have any dependencies on weird homegrown libraries that require hours of fiddling -- just on wx, paramiko, and Crypto. To recap: py2app generates an application successfully. Per my post earlier today ( http://old.nabble.com/py2app-program-unable-to-find-files-in-lib-dynload-td29679814.html), I then hack __boot__.py to modify sys.path so it can find SHA256.so. The program runs just fine on my development computer. I take it over to a client computer and try to run it. It tries 'import os' and fails. Last time I speculated that this was due to stale pyc files hanging around. I've removed all pyc files from the app and it still fails, so that's not what's going wrong here. Without access to os, I can't check environment variables, let alone change them. Frankly I don't have a clue how to debug this short of random flailings -- and I spent three days or so on that last time before stumbling across something that worked. Comparing that working program to this nonworking program hasn't turned up any obvious discrepancies, though. Anyway, my source code is online here: http://derakon.dyndns.org/~chriswei/temp2/processor.tgz If you have any insight into this problem, I'd love to hear it. -Chris On Mon, Aug 23, 2010 at 4:55 PM, Dan Ross wrote: > Happy to try. > > Glad you got it sorted out. > > > > On Mon, 23 Aug 2010 15:39:17 -0700, Chris Weisiger > wrote: > > That's odd. I get the "couldn't load module(s): P" but Y loads fine. These > are legacy modules from a previous developer, and I generally try to avoid > dealing with them. "Y" refers to either "usefulX.py" or "usefulX2.py", I'm > not certain which. Both are in the Priithon directory. (Note that they > aren't imported as "X" because that's the letter used for one of the modules > the original developer named after himself...fortunately not in this > particular program) > > However, I was able to get a standalone version working. I started poking > at the __boot__.py and site.py files in the generated app, and somehow that > made the failures to import fundamental libraries like os and traceback go > away. My only guess is that maybe py2app was including the .pyc files that > had been generated on my local computer? Anyway, after that I got failures > to import numpy.Tester, which are I think due to a version mismatch on my > end. Easily fixed, though, as that module's not actually needed; I just > commented out the imports. > > Thanks for being willing to take a look! I think maybe I just needed a > weekend of not thinking about it so I could come back to the problem fresh. > :) > > -Chris > > On Mon, Aug 23, 2010 at 3:26 PM, Dan Ross wrote: > >> Hmmm..... >> >> I'm getting this when I try to run it from Terminal: >> >> dan-rosss-macbook-pro:editor dan$ python editor.py >> * couldn't load module(s): Y P >> >> Traceback (most recent call last): >> File "editor.py", line 7, in >> import mainapp >> File "/Users/dan/Desktop/editor/mainapp.py", line 2, in >> import demoframe >> File "/Users/dan/Desktop/editor/demoframe.py", line 6, in >> import imeditpanel >> File "/Users/dan/Desktop/editor/imeditpanel.py", line 12, in >> import realign >> File "/Users/dan/Desktop/editor/realign.py", line 8, in >> from Priithon.all import F, Y >> ImportError: cannot import name Y >> >> >> Can you tell me what's supposed to be happening? >> >> On 8/23/10 10:18 AM, Chris Weisiger wrote: >> >> I've put the program online here: >> >> http://derakon.dyndns.org/~chriswei/temp2/editor.tgz >> >> When run, it should show a large blank window with four icons in the >> upper-left corner. >> >> Thanks for being willing to take a look. >> >> -Chris >> >> On Sat, Aug 21, 2010 at 6:12 AM, Dan Ross wrote: >> >>> Hey Chris- >>> >>> Is the source available anywhere? I've made a few wx apps and that sounds >>> familiar. >>> >>> Dan >>> >>> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From skyle at cascadecaverns.com Sun Sep 12 19:25:45 2010 From: skyle at cascadecaverns.com (Scott Kyle) Date: Sun, 12 Sep 2010 12:25:45 -0500 Subject: [Pythonmac-SIG] Checkout App Message-ID: <700ABF48-B0D1-4AAC-A754-C94FB490BA47@cascadecaverns.com> New to Python. I have a simple (I think) problem using the Mac OS retail POS program Checkout (http://checkoutapp.com/) of wanting to change one variable to another for reports from the database. One ("terminal" - cash register) to another ("brand" - as in "product brand"). One is a number and the other a name. So here it is. I want to change the terminal function in report included with the program called "End of Day" (http://checkoutapp.com/documentation/15_managing_your_reports ), which is basically a summary of the days receipts. SInce we only have one terminal or "till" we don't need that but we do want the report to report by brand in the same way it reports by terminal. Here is a report (sales by Brand) (or follow link on this page http://checkoutapp.tumblr.com/) that summarizes sales by brand but I like the format of the "End of Day" report and the info it includes about taxes, etc. at the top of the html document. Does this make sense? Thanks for any help. Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.rasinmaki at simosol.fi Mon Sep 13 08:11:01 2010 From: jussi.rasinmaki at simosol.fi (=?ISO-8859-1?Q?Jussi_Rasinm=E4ki?=) Date: Mon, 13 Sep 2010 09:11:01 +0300 Subject: [Pythonmac-SIG] py2app & 32 bit EPD Python distribution Message-ID: Hi, I have a virtualenv set up for a 32 bit (due to wx frontend) Enthought Python Distribution (http://bit.ly/57N9). When building in it with py2app: python setup.py py2app -A I get Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/py2app-0.5.2-py2.6.egg/py2app/build_app.py", line 602, in _run self.run_alias() File "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/py2app-0.5.2-py2.6.egg/py2app/build_app.py", line 548, in run_alias dst = self.build_alias_executable(target, target.script) ... IOError: [Errno 2] No such file or directory: '/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/py2app-0.5.2-py2.6.egg/py2app/apptemplate/prebuilt/main-x86_64' Any pointers as to how to fix this? Cheers, Jussi From cweisiger at msg.ucsf.edu Mon Sep 13 23:20:59 2010 From: cweisiger at msg.ucsf.edu (Chris Weisiger) Date: Mon, 13 Sep 2010 14:20:59 -0700 Subject: [Pythonmac-SIG] Trials with building app Message-ID: Just another update on my travails with making an app build with py2app. Since my previous posts haven't attracted much attention, I'm primarily posting this on the off-chance that someone else is having similar issues and might be helped. However, please do speak up if you have something to contribute! I'm starting to get a wee bit frustrated. Things I have discovered (some of this is a recap): To build with a nonstandard Python install (necessary to get py2app to include the Python interpreter in the build), I have to "create" a main-i386 app template. This is done by going into py2app-0.5.2-py2.5.egg/py2app/apptemplate/prebuilt and doing "ln -sf main-fat3 main-i386" This will allow py2app to build the app. However, it won't run, because I have a dependency on a .so file which isn't in the default search paths that py2app sets up. So I have to modify __boot__.py by adding this line to the run() function right after it imports sys: sys.path.insert(0, os.path.join(os.getcwd(), 'lib', 'python2.5', 'lib-dynload')) That code actually isn't reachable yet, though (I know I have to fix it because my previous nominally-successful builds weren't standalone and thus made it further). Instead, I get this error when __boot__.py's _chdir_resource() function tries to import the os module: zipimport.ZipImportError: can't decompress data; zlib not available zlib is present: % find dist -name "zlib*" dist/processor.app/Contents/Resources/lib/python2.5/lib-dynload/zlib.so However, it's clearly not in the search path at this point -- and the program can't import os to change its search path! I can find a copy of os.py from my /Library/Frameworks and insert it at the same level as __boot__.py, and it will find that -- then fail to load posixpath with the same zlib error (and then stat when I add posixpath, etc.). If I manually uncompress lib/python2.5/site-packages.zip and copy eveyrthing in it (including directories) down two levels to the Resources directory, then everything seems to go fine until my app tries to import wx, at which point this happens: ImportError: dlopen(/Users/chriswei/proj/ucsf/bitbucket-repo/processor/dist/processor.app/Contents/Resources/lib/python2.5/lib-dynload/wx/_core_.so, 2): no suitable image found. Did find: /Users/chriswei/proj/ucsf/bitbucket-repo/processor/dist/processor.app/Contents/Resources/lib/python2.5/lib-dynload/wx/_core_.so: no matching architecture in universal wrapper And that's where I'm stuck now. I've found shreds and snippets of similar-sounding problems from other users, but no indication of what fixed things for them. The py2app trac site is down -- is it even supported any more? If not, what's the plan for standalone Python programs on OSX going forward? -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Tue Sep 14 00:00:17 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 13 Sep 2010 15:00:17 -0700 Subject: [Pythonmac-SIG] Trials with building app In-Reply-To: References: Message-ID: <4C8E9EF1.8000306@noaa.gov> Chris Weisiger wrote: > Just another update on my travails with making an app build with py2app. > Since my previous posts haven't attracted much attention, I'm primarily > posting this on the off-chance that someone else is having similar > issues and might be helped. However, please do speak up if you have > something to contribute! I'm starting to get a wee bit frustrated. This can be frustrating -- it's tricky stuff, and there are apparently only a few of us trying to do it. However, Ronald Oussoren has recently been giving py2app some much-needed love. He hasn't responded yet, so he may be busy or on vacton, or?? but he did specifically ask us all to let this list know when bugs were found. > To build with a nonstandard Python install (necessary to get py2app to > include the Python interpreter in the build), What is a "non-standard" install? you are right that it's won't include python if you use the Apple-supplied Python, but it should work with the build from python.org -- are you using something else? If so, why? > I have to "create" a > main-i386 app template. This is done by going into > py2app-0.5.2-py2.5.egg/py2app/apptemplate/prebuilt and doing "ln -sf > main-fat3 main-i386" This shouldn't be necessary, so something is up. py2app should "just work" with the exception of having to explicitly specify modules and packages sometimes (and data files...). First, key any any ability to help: What version of OS-X? what processor, exactly what version/build of Python, and what version of py2app? Second -- have you tried to do the very simplest thing first, with your set-up -- a simple hello world app? then you can add in modules that you may have problems with one at a time. > This will allow py2app to build the app. However, it won't run, because > I have a dependency on a .so file which isn't in the default search > paths that py2app sets up. Chris Weisiger wrote: > (creatively named "processor.app") that errors out on running with this > error: > > ImportError: > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/Crypto/Hash/SHA256.so' > not found > > SHA256.so does exist, in > ./dist/processor.app/Contents/Resources/lib/python2.5/lib-dynload/Crypto/Hash/SHA256.so However, that is a *.so that is part of Apple's Python ('cause it's in "System") -- so you don't seem to be completely clean of the Apple python. That file does exist in my python.org install, so py2app should be able to do the right thing with it. If you post a simple-as-possilbe-but-still-shos-the-problem example if an ap pthat uses SHA, maybe on of us can test it for you. For example, I've enclosed the simplest test of sha256 I could think of, along with a setup.py to build it. It works fine on my 10.5 PPC system with the python.org python2.6 (you need to open up the console to see the output when it runs) Does this work for you? Note that is puts _sha265.so in: hashlib_test.app/Contents/Resources/lib/python2.6/lib-dynload Maybe not much help, but you know you aren't alone... -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov -------------- next part -------------- A non-text attachment was scrubbed... Name: hashlib_test.py Type: application/x-python Size: 202 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.py Type: application/x-python Size: 314 bytes Desc: not available URL: From cweisiger at msg.ucsf.edu Tue Sep 14 00:49:42 2010 From: cweisiger at msg.ucsf.edu (Chris Weisiger) Date: Mon, 13 Sep 2010 15:49:42 -0700 Subject: [Pythonmac-SIG] Trials with building app In-Reply-To: <4C8E9EF1.8000306@noaa.gov> References: <4C8E9EF1.8000306@noaa.gov> Message-ID: On Mon, Sep 13, 2010 at 3:00 PM, Christopher Barker wrote: > Chris Weisiger wrote: > >> Just another update on my travails with making an app build with py2app. >> Since my previous posts haven't attracted much attention, I'm primarily >> posting this on the off-chance that someone else is having similar issues >> and might be helped. However, please do speak up if you have something to >> contribute! I'm starting to get a wee bit frustrated. >> > > This can be frustrating -- it's tricky stuff, and there are apparently only > a few of us trying to do it. > > However, Ronald Oussoren has recently been giving py2app some much-needed > love. He hasn't responded yet, so he may be busy or on vacton, or?? but he > did specifically ask us all to let this list know when bugs were found. Excellent news. I'm glad to hear that someone is taking charge of the project -- it gives much more incentive to others to help out when they discover fixable problems. It's a bit hard to report a bug, even if you have the fix, if you have no ability to get that fix into the standard distribution. > > > To build with a nonstandard Python install (necessary to get py2app to >> include the Python interpreter in the build), >> > > What is a "non-standard" install? you are right that it's won't include > python if you use the Apple-supplied Python, but it should work with the > build from python.org -- are you using something else? If so, why? > > Sorry, I should have clarified here. By "non-standard" I mean "not the distribution that comes with the OS". The standard distribution, IIRC, is /usr/bin/python (which points to an install in /System/Frameworks); I'm using /usr/local/bin/python (which points to an install in /Library/Frameworks). > > I have to "create" a main-i386 app template. This is done by going into >> py2app-0.5.2-py2.5.egg/py2app/apptemplate/prebuilt and doing "ln -sf >> main-fat3 main-i386" >> > > This shouldn't be necessary, so something is up. py2app should "just work" > with the exception of having to explicitly specify modules and packages > sometimes (and data files...). > This thread suggests that Python is "lying about its architecture"; might be a holdover from using Python2.5 instead of 2.6: http://old.nabble.com/py2app-architecture-problem-and-System-Python-question-td29262714.html > > First, key any any ability to help: > > What version of OS-X? what processor, exactly what version/build of Python, > and what version of py2app? > > OSX: 10.5.4 Processor: Intel Core 2 Duo 2GHz (Macbook) Python: Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27) * I'd be on a newer version, but I have to deal with legacy cruft on a regular basis, which doesn't work in 2.6. py2app: 0.5.2. > Second -- have you tried to do the very simplest thing first, with your > set-up -- a simple hello world app? then you can add in modules that you may > have problems with one at a time. > > I really should have thought of this myself. Aside from the architecture issue, hello.app fails with the same zlib error I mentioned earlier (when it tries to import traceback in __boot__.py's _get_argvemulator()). I've put the entirety of the test directory (including the source code, py2app's egg directory with the symlink, and the build and dist directories) here: http://derakon.dyndns.org/~chriswei/temp/hello.tgz On a hunch, I tried using /usr/local/bin/python2.6. This doesn't give me the architecture error, and the app successfully builds and runs with no interference. So it looks like it's the architecture that's the problem, and my symlink isn't helping as much as I thought it was. Using main-fat as main-i386 will generate a working app, though. I tried using that for the real program -- and it worked! Oddly enough, it doesn't need the __boot__.py hack to find lib-dynload either. > > This will allow py2app to build the app. However, it won't run, because I >> have a dependency on a .so file which isn't in the default search paths that >> py2app sets up. >> > > Chris Weisiger wrote: > >> (creatively named "processor.app") that errors out on running with this >> error: >> >> ImportError: >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/Crypto/Hash/SHA256.so' >> not found >> >> SHA256.so does exist, in >> ./dist/processor.app/Contents/Resources/lib/python2.5/lib-dynload/Crypto/Hash/SHA256.so >> > > However, that is a *.so that is part of Apple's Python ('cause it's in > "System") -- so you don't seem to be completely clean of the Apple python. > That file does exist in my python.org install, so py2app should be able to > do the right thing with it. > > Per the above, this was, I suppose, an offshoot of claiming to be the wrong architecture. > If you post a simple-as-possilbe-but-still-shos-the-problem example if an > ap pthat uses SHA, maybe on of us can test it for you. > > For example, I've enclosed the simplest test of sha256 I could think of, > along with a setup.py to build it. It works fine on my 10.5 PPC system with > the python.org python2.6 (you need to open up the console to see the > output when it runs) > > Does this work for you? > > Having applied the hack to claim that main-i386 is main-fat, yes. Alternately, using python2.6 instead of python2.5 also works sans hacks. > Note that is puts _sha265.so in: > > hashlib_test.app/Contents/Resources/lib/python2.6/lib-dynload > > > Maybe not much help, but you know you aren't alone... > > Much more help than you might think. :) It's amazing how often I forget to break problems down to their simplest possible level. Thank you so much! > -Chris > > > -Chris > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Tue Sep 14 01:05:35 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 13 Sep 2010 16:05:35 -0700 Subject: [Pythonmac-SIG] Trials with building app In-Reply-To: References: <4C8E9EF1.8000306@noaa.gov> Message-ID: <4C8EAE3F.1050409@noaa.gov> Chris Weisiger wrote: > This thread suggests that Python is "lying about its architecture"; > might be a holdover from using Python2.5 instead of 2.6: > http://old.nabble.com/py2app-architecture-problem-and-System-Python-question-td29262714.html hmmm -- I'm not sure if Ronald is trying to keep it working with 2.5 anymore -- there's a lot of versions to keep track of and test on. I recall a discussion of what versions to support on the list, but can't find it right now. You might find this note relevant: Ronald Oussoren wrote: > Hi, > > I've converted the repositories for py2app and related packages to mercurial and posted them on bitbucket. The new home pages are: > > py2app: http://bitbucket.org/ronaldoussoren/py2app > macholib: http://bitbucket.org/ronaldoussoren/macholib > modulegraph: http://bitbucket.org/ronaldoussoren/modulegraph > altgraph: http://bitbucket.org/ronaldoussoren/altgraph > > I have disabled the wiki for now, but did enable the issue tracker. > and my symlink isn't helping as much as I thought it was. Using main-fat > as main-i386 will generate a working app, though. glad to hear it! -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From rowen at uw.edu Tue Sep 14 21:56:54 2010 From: rowen at uw.edu (Russell E. Owen) Date: Tue, 14 Sep 2010 12:56:54 -0700 Subject: [Pythonmac-SIG] bdist_mpkg issues Message-ID: I'm having some surprising issues with bdist_mpkg and I wondered if anyone had advice. Problem building a PIL 1.1.7 binary installer for Mac OS X 10.3.9 and later: * The PIL binary for Python 2.6 does not work on 10.3.9 or 10.4: the _imaging C library cannot be loaded. * The Python 2.5 PIL does not have this problem - it works fine on 10.3.9. * There are no problems on 10.5 and 10.6. Problem building a matplotlib 1.0.0 installer for Mac OS X 10.3.9 and later: * The resulting matplotlib segfaults on Mac OS X 10.3.9 for both Python 2.5 and 2.6. * The Python 2.6 version has incorrect permissions for some data files. I know how to work around this but am puzzled why it is necessary. * The Python 2.5 version has no permission problems. My setup: - Mac OS X 10.5.8 Intel system - Python 2.5.2 and Python 2.6.6 both from python.org - bdist_mpkg 0.4.4 (installed using pip) - Build instructions for matplotlib: (the procedure for PIL is similar). I tried building on 10.3.9, but the gcc is so old that I get buffer overflow vulnerability warnings so I'm not keen to go this route. I'll have a 10.4 machine in a few weeks and I'll try that. -- Russell From rowen at uw.edu Tue Sep 14 22:51:05 2010 From: rowen at uw.edu (Russell E. Owen) Date: Tue, 14 Sep 2010 13:51:05 -0700 Subject: [Pythonmac-SIG] bdist_mpkg issues References: Message-ID: In article , "Russell E. Owen" wrote: > I'm having some surprising issues with bdist_mpkg and I wondered if > anyone had advice. > >... > Problem building a matplotlib 1.0.0 installer for Mac OS X 10.3.9 and > later: >... > * The Python 2.6 version has incorrect permissions for some data files. > I know how to work around this but am puzzled why it is necessary. > * The Python 2.5 version has no permission problems. I tracked this down to having an older version of some dependencies of bdist_mpkg in my Python 2.5. I upgraded to the latest py2app and now both Python 2.5 and Python 2.6 show the problem with files that users can't read: build/lib.macosx-10.4-fat-2.5/matplotlib/mpl-data//images: total 520 -rw------- 1 rowen staff 1465 Jul 6 07:43 back.png -rw------- 1 rowen staff 1741 Jul 6 07:43 back.ppm -rwx------ 1 rowen staff 3064 Jul 6 07:43 back.svg -rw------- 1 rowen staff 3434 Jul 6 07:43 back.xpm -rw------- 1 rowen staff 1121 Jul 6 07:43 filesave.png -rw------- 1 rowen staff 1741 Jul 6 07:43 filesave.ppm -- Russell From nad at acm.org Wed Sep 15 02:40:20 2010 From: nad at acm.org (Ned Deily) Date: Tue, 14 Sep 2010 17:40:20 -0700 Subject: [Pythonmac-SIG] bdist_mpkg issues References: Message-ID: In article , "Russell E. Owen" wrote: > I'm having some surprising issues with bdist_mpkg and I wondered if > anyone had advice. > > Problem building a PIL 1.1.7 binary installer for Mac OS X 10.3.9 and > later: > * The PIL binary for Python 2.6 does not work on 10.3.9 or 10.4: the > _imaging C library cannot be loaded. > * The Python 2.5 PIL does not have this problem - it works fine on > 10.3.9. > * There are no problems on 10.5 and 10.6. > > > Problem building a matplotlib 1.0.0 installer for Mac OS X 10.3.9 and > later: > * The resulting matplotlib segfaults on Mac OS X 10.3.9 for both Python > 2.5 and 2.6. > * The Python 2.6 version has incorrect permissions for some data files. > I know how to work around this but am puzzled why it is necessary. > * The Python 2.5 version has no permission problems. > > > My setup: > - Mac OS X 10.5.8 Intel system > - Python 2.5.2 and Python 2.6.6 both from python.org > - bdist_mpkg 0.4.4 (installed using pip) > - Build instructions for matplotlib: > l> (the procedure for PIL is similar). > > I tried building on 10.3.9, but the gcc is so old that I get buffer > overflow vulnerability warnings so I'm not keen to go this route. I'll > have a 10.4 machine in a few weeks and I'll try that. Quick thoughts without any testing: the python.org 2.6.6 uses a MACOSX_DEPLOYMENT_TARGET=10.3. Make sure you set it when building all your dependent libraries, too. Make sure you use CC=gcc-4.0 (default on 10.5 but not 10.6) for all building. Don't bother trying to build on 10.3.9. In theory, you should be able to make this work. A standard python installer can be built these days on any of 10.4, 10.5, and 10.6 that will work on 10.3.9 through 10.6 so there's a good chance that PIL should be able to be built similarly. No experience with matplotlib or bdist_mpkg. -- Ned Deily, nad at acm.org From rowen at uw.edu Thu Sep 16 22:43:46 2010 From: rowen at uw.edu (Russell E. Owen) Date: Thu, 16 Sep 2010 13:43:46 -0700 Subject: [Pythonmac-SIG] bdist_mpkg issues References: Message-ID: In article , Ned Deily wrote: > In article , > "Russell E. Owen" wrote: > > I'm having some surprising issues with bdist_mpkg and I wondered if > > anyone had advice. > > > > Problem building a PIL 1.1.7 binary installer for Mac OS X 10.3.9 and > > later: > > * The PIL binary for Python 2.6 does not work on 10.3.9 or 10.4: the > > _imaging C library cannot be loaded. > > * The Python 2.5 PIL does not have this problem - it works fine on > > 10.3.9. > > * There are no problems on 10.5 and 10.6. > > > > > > Problem building a matplotlib 1.0.0 installer for Mac OS X 10.3.9 and > > later: > > * The resulting matplotlib segfaults on Mac OS X 10.3.9 for both Python > > 2.5 and 2.6. > > * The Python 2.6 version has incorrect permissions for some data files. > > I know how to work around this but am puzzled why it is necessary. > > * The Python 2.5 version has no permission problems. > > > > > > My setup: > > - Mac OS X 10.5.8 Intel system > > - Python 2.5.2 and Python 2.6.6 both from python.org > > - bdist_mpkg 0.4.4 (installed using pip) > > - Build instructions for matplotlib: > > > l> (the procedure for PIL is similar). > > > > I tried building on 10.3.9, but the gcc is so old that I get buffer > > overflow vulnerability warnings so I'm not keen to go this route. I'll > > have a 10.4 machine in a few weeks and I'll try that. > > Quick thoughts without any testing: the python.org 2.6.6 uses a > MACOSX_DEPLOYMENT_TARGET=10.3. Make sure you set it when building all > your dependent libraries, too. Make sure you use CC=gcc-4.0 (default > on 10.5 but not 10.6) for all building. Don't bother trying to build on > 10.3.9. In theory, you should be able to make this work. A standard > python installer can be built these days on any of 10.4, 10.5, and 10.6 > that will work on 10.3.9 through 10.6 so there's a good chance that PIL > should be able to be built similarly. No experience with matplotlib or > bdist_mpkg. It is nice to think that a binary installer could be built on 10.5 or 10.6 but I sure don't know how to do it. I built the original installers using MACOSX_DEPLOYMENT_TARGET=10.4 and gcc 4.0.1. At your suggestion I built new universal unix libraries using MACOSX_DEPLOYMENT_TARGET=10.3. As always, I deleted the dylibs so only the static libraries remained (so they would be included in the final binary) and I verified that the libraries contained both ppc and intel code. I then used bdist_mpkg to build a matplotlib installer. Unfortunately I see the same problem as before: when I try to import pylab on a 10.3.9 PPC computer I get a segfault. -- Russell From Chris.Barker at noaa.gov Thu Sep 16 23:06:17 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 16 Sep 2010 14:06:17 -0700 Subject: [Pythonmac-SIG] bdist_mpkg issues In-Reply-To: References: Message-ID: <4C9286C9.5010600@noaa.gov> Russell E. Owen wrote: > At your suggestion I built new universal unix libraries using > MACOSX_DEPLOYMENT_TARGET=10.3. As always, I deleted the dylibs so only > the static libraries remained (so they would be included in the final > binary) and I verified that the libraries contained both ppc and intel > code. I then used bdist_mpkg to build a matplotlib installer. > Unfortunately I see the same problem as before: when I try to import > pylab on a 10.3.9 PPC computer I get a segfault. Darn. Is there any simple test code we could use to test the libraries them selves? It would be nice to maybe build a really simple executable that uses each of the dependencies, so they could be individually tested. At least that would narrow down the issue. It also should be possible to run it under a debugger or something, so that we could see where the segfault occurred -- anyone know how to do that? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Fri Sep 17 01:31:21 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 16 Sep 2010 16:31:21 -0700 Subject: [Pythonmac-SIG] bdist_mpkg issues In-Reply-To: References: <4C9286C9.5010600@noaa.gov> Message-ID: <4C92A8C9.1000503@noaa.gov> Russell Owen wrote: > I'll expect our observatory to send me a 10.4 Mac in a few weeks. I plan > to build the packages on that -- both to assure that the packages will > run on 10.4 and as a way of testing my released application. > > I'm sure the gcc will be rather outdated, but I hope it will be tolerable. I was having pretty good luck with my 10.4 system when I still had a a couple months ago. > All that said, I sure wish I knew what was wrong. bdist_mpkg is not > getting any attention and at some point it may just break, leaving us > with no obvious way to build binary installers. well -- I don't think it does all that much, and the only tricky part should be what's also used in py2app, so it may not be that bad. I suspect the problem is with binary libs, not with bdist_mpkg. -Chris > Regards, > > -- Russell > > On Sep 16, 2010, at 2:06 PM, Christopher Barker wrote: > >> Russell E. Owen wrote: >>> At your suggestion I built new universal unix libraries using >>> MACOSX_DEPLOYMENT_TARGET=10.3. As always, I deleted the dylibs so >>> only the static libraries remained (so they would be included in the >>> final binary) and I verified that the libraries contained both ppc >>> and intel code. I then used bdist_mpkg to build a matplotlib >>> installer. Unfortunately I see the same problem as before: when I try >>> to import pylab on a 10.3.9 PPC computer I get a segfault. >> >> Darn. >> >> Is there any simple test code we could use to test the libraries them >> selves? It would be nice to maybe build a really simple executable >> that uses each of the dependencies, so they could be individually >> tested. At least that would narrow down the issue. >> >> It also should be possible to run it under a debugger or something, so >> that we could see where the segfault occurred -- anyone know how to do >> that? >> >> -Chris >> >> >> >> >> -- >> Christopher Barker, Ph.D. >> Oceanographer >> >> Emergency Response Division >> NOAA/NOS/OR&R (206) 526-6959 voice >> 7600 Sand Point Way NE (206) 526-6329 fax >> Seattle, WA 98115 (206) 526-6317 main reception >> >> Chris.Barker at noaa.gov > -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From massimodisasha at yahoo.it Fri Sep 17 12:24:40 2010 From: massimodisasha at yahoo.it (Massimo Di Stefano) Date: Fri, 17 Sep 2010 12:24:40 +0200 Subject: [Pythonmac-SIG] swig example on mac osx 10.6.4 Message-ID: <504598E1-D390-4D25-BA24-11D8C4F911A9@yahoo.it> Hello All, i'm tring to run the swig - python example, from the page : http://www.swig.org/tutorial.html but running it i have a "wrong architecture" problem. i tried using swig built from source version 2.0. this the log, thanks for any help! : MacBook-Pro-15-di-sasha:~ sasha$ /usr/local/bin/swig -python example.i MacBook-Pro-15-di-sasha:~ sasha$ gcc -c example.c example_wrap.c -I /usr/include/python2. python2.5/ python2.6/ MacBook-Pro-15-di-sasha:~ sasha$ gcc -c example.c example_wrap.c -I /usr/include/python2.6 MacBook-Pro-15-di-sasha:~ sasha$ ld -dylib example.o example_wrap.o -o _example.so Undefined symbols: "_PyLong_AsLong", referenced from: _SWIG_AsVal_long in example_wrap.o "_PyDict_New", referenced from: _SWIG_Python_NewShadowInstance in example_wrap.o _SWIG_Python_NewShadowInstance in example_wrap.o _SWIG_Python_SetSwigThis in example_wrap.o _SWIG_Python_TypeCache in example_wrap.o "_PyDict_SetItem", referenced from: _SWIG_Python_NewShadowInstance in example_wrap.o _SWIG_Python_NewShadowInstance in example_wrap.o _SWIG_Python_SetSwigThis in example_wrap.o _SWIG_Python_SetSwigThis in example_wrap.o _SWIG_Python_TypeQuery in example_wrap.o "_PyExc_ValueError", referenced from: _SWIG_Python_ErrorType in example_wrap.o "_PyDict_SetItemString", referenced from: _SWIG_Python_SetConstant in example_wrap.o _SWIG_Python_InstallConstants in example_wrap.o _init_example in example_wrap.o "_strstr", referenced from: _SWIG_Python_ConvertFunctionPtr in example_wrap.o _SWIG_Python_FixMethods in example_wrap.o "_PyCFunction_Type", referenced from: _SWIG_Python_ConvertFunctionPtr in example_wrap.o "_PyErr_Occurred", referenced from: _SWIG_Python_AddErrorMsg in example_wrap.o _SwigPyClientData_New in example_wrap.o _SWIG_Python_GetSwigThis in example_wrap.o _SWIG_Python_ConvertPtrAndOwn in example_wrap.o _SWIG_Python_GetModule in example_wrap.o _SWIG_Python_AddErrMesg in example_wrap.o _SWIG_Python_ArgFail in example_wrap.o _SWIG_AsVal_double in example_wrap.o _SWIG_AsVal_long in example_wrap.o _swig_varlink_getattr in example_wrap.o _swig_varlink_setattr in example_wrap.o "_PyInt_FromLong", referenced from: _SWIG_From_int in example_wrap.o "_Py_InitModule4_64", referenced from: _SWIG_Python_SetModule in example_wrap.o _init_example in example_wrap.o "__PyWeakref_CallableProxyType", referenced from: _SWIG_Python_GetSwigThis in example_wrap.o "_PyString_FromString", referenced from: _SWIG_Python_str_FromChar in example_wrap.o _swig_varlink_repr in example_wrap.o _swig_varlink_str in example_wrap.o _swig_varlink_str in example_wrap.o _swig_varlink_str in example_wrap.o _swig_varlink_str in example_wrap.o "_PyType_IsSubtype", referenced from: _SWIG_AsVal_double in example_wrap.o "_PyFloat_FromDouble", referenced from: _Swig_var_My_variable_get in example_wrap.o "_PyModule_GetDict", referenced from: _init_example in example_wrap.o "__PyInstance_Lookup", referenced from: _SWIG_Python_GetSwigThis in example_wrap.o "___assert_rtn", referenced from: _SWIG_Python_ConvertPtrAndOwn in example_wrap.o _SWIG_Python_ConvertFunctionPtr in example_wrap.o "_PyLong_FromVoidPtr", referenced from: _SwigPyObject_long in example_wrap.o "_PyErr_Clear", referenced from: _SWIG_Python_AddErrorMsg in example_wrap.o _SwigPyClientData_New in example_wrap.o _SWIG_Python_GetSwigThis in example_wrap.o _SWIG_Python_ConvertPtrAndOwn in example_wrap.o _SWIG_Python_GetModule in example_wrap.o _SWIG_Python_AddErrMesg in example_wrap.o _SWIG_Python_MustGetPtr in example_wrap.o _SWIG_AsVal_double in example_wrap.o _SWIG_AsVal_long in example_wrap.o "_PyObject_Free", referenced from: _SwigPyObject_dealloc in example_wrap.o _SwigPyPacked_dealloc in example_wrap.o _SwigPyPacked_New in example_wrap.o "___stack_chk_guard", referenced from: _SwigPyObject_str in example_wrap.o _SwigPyObject_str in example_wrap.o _SwigPyPacked_print in example_wrap.o _SwigPyPacked_print in example_wrap.o _SwigPyPacked_repr in example_wrap.o _SwigPyPacked_repr in example_wrap.o _SwigPyPacked_str in example_wrap.o _SwigPyPacked_str in example_wrap.o _SWIG_Python_ArgFail in example_wrap.o _SWIG_Python_ArgFail in example_wrap.o "_PyArg_ParseTuple", referenced from: __wrap_fact in example_wrap.o __wrap_my_mod in example_wrap.o __wrap_get_time in example_wrap.o "__PyWeakref_ProxyType", referenced from: _SWIG_Python_GetSwigThis in example_wrap.o "_PyClass_Type", referenced from: _SwigPyClientData_New in example_wrap.o "_PyOS_snprintf", referenced from: _SWIG_Python_ArgFail in example_wrap.o "_PyExc_SystemError", referenced from: _SWIG_Python_ErrorType in example_wrap.o _SWIG_Python_UnpackTuple in example_wrap.o "_PyObject_Call", referenced from: _SWIG_Python_NewShadowInstance in example_wrap.o "__Py_ZeroStruct", referenced from: _SwigPyObject_richcompare in example_wrap.o "__PyObject_GetDictPtr", referenced from: _SWIG_Python_GetSwigThis in example_wrap.o _SWIG_Python_NewShadowInstance in example_wrap.o _SWIG_Python_SetSwigThis in example_wrap.o "_malloc", referenced from: _SwigPyClientData_New in example_wrap.o _SwigPyPacked_New in example_wrap.o _SWIG_Python_addvarlink in example_wrap.o _SWIG_Python_addvarlink in example_wrap.o _SWIG_Python_FixMethods in example_wrap.o "_PyErr_Fetch", referenced from: _SWIG_Python_AddErrorMsg in example_wrap.o _SWIG_Python_AddErrMesg in example_wrap.o "_PyExc_RuntimeError", referenced from: _SWIG_Python_ErrorType in example_wrap.o _SWIG_Python_ErrorType in example_wrap.o _SWIG_Python_AddErrorMsg in example_wrap.o "_PyList_New", referenced from: _SWIG_Python_AppendOutput in example_wrap.o "_strncmp", referenced from: _SwigPyPacked_compare in example_wrap.o _SWIG_Python_FixMethods in example_wrap.o "_PyObject_CallFunctionObjArgs", referenced from: _SwigPyObject_dealloc in example_wrap.o _SWIG_Python_ConvertPtrAndOwn in example_wrap.o "___memcpy_chk", referenced from: _SwigPyPacked_New in example_wrap.o ___inline_memcpy_chk in example_wrap.o _SwigPyPacked_UnpackData in example_wrap.o "__Py_NoneStruct", referenced from: _SWIG_Python_AppendOutput in example_wrap.o _SWIG_Py_Void in example_wrap.o _SWIG_Python_ConvertPtrAndOwn in example_wrap.o "_PyExc_MemoryError", referenced from: _SWIG_Python_ErrorType in example_wrap.o "_PyString_FromStringAndSize", referenced from: _SWIG_FromCharPtrAndSize in example_wrap.o "___memset_chk", referenced from: _SWIG_UnpackDataName in example_wrap.o ___inline_memset_chk in example_wrap.o "_printf", referenced from: _SwigPyObject_dealloc in example_wrap.o "_PyExc_IOError", referenced from: _SWIG_Python_ErrorType in example_wrap.o "___stack_chk_fail", referenced from: _SwigPyObject_str in example_wrap.o _SwigPyPacked_print in example_wrap.o _SwigPyPacked_repr in example_wrap.o _SwigPyPacked_str in example_wrap.o _SWIG_Python_ArgFail in example_wrap.o "_PyModule_AddObject", referenced from: _SWIG_Python_SetModule in example_wrap.o "_PyList_Append", referenced from: _SWIG_Python_AppendOutput in example_wrap.o "_fprintf", referenced from: _swig_varlink_print in example_wrap.o "_PyTuple_New", referenced from: _SwigPyClientData_New in example_wrap.o _SwigPyObject_format in example_wrap.o "_PyExc_ZeroDivisionError", referenced from: _SWIG_Python_ErrorType in example_wrap.o "_PyString_Format", referenced from: _SwigPyObject_format in example_wrap.o "_PyFloat_AsDouble", referenced from: _SWIG_AsVal_double in example_wrap.o "_PyDict_GetItem", referenced from: _SWIG_Python_GetSwigThis in example_wrap.o _SWIG_Python_TypeQuery in example_wrap.o "_PyObject_GetAttr", referenced from: _SWIG_Python_GetSwigThis in example_wrap.o "_PyType_Type", referenced from: __PySwigObject_type in example_wrap.o __PySwigPacked_type in example_wrap.o _swig_varlink_type in example_wrap.o "_PyObject_Str", referenced from: _SWIG_Python_AddErrorMsg in example_wrap.o _SWIG_Python_AddErrMesg in example_wrap.o _SWIG_Python_TypeError in example_wrap.o "_PyCObject_AsVoidPtr", referenced from: _SWIG_Python_TypeQuery in example_wrap.o "_free", referenced from: _SwigPyPacked_dealloc in example_wrap.o _swig_varlink_dealloc in example_wrap.o _swig_varlink_dealloc in example_wrap.o "_PyExc_TypeError", referenced from: _SWIG_Python_ErrorType in example_wrap.o _SWIG_Python_UnpackTuple in example_wrap.o _SWIG_Python_UnpackTuple in example_wrap.o _SWIG_Python_UnpackTuple in example_wrap.o _SWIG_Python_TypeError in example_wrap.o _SWIG_Python_TypeError in example_wrap.o _SWIG_Python_TypeError in example_wrap.o _SWIG_Python_TypeError in example_wrap.o "_PyArg_UnpackTuple", referenced from: _SwigPyObject_own in example_wrap.o "_PyBool_FromLong", referenced from: _SwigPyObject_own in example_wrap.o "_PyTuple_SetItem", referenced from: _SwigPyClientData_New in example_wrap.o _SwigPyObject_format in example_wrap.o "__Py_NotImplementedStruct", referenced from: _SwigPyObject_richcompare in example_wrap.o _SwigPyObject_richcompare in example_wrap.o _SwigPyObject_richcompare in example_wrap.o "_PyObject_IsTrue", referenced from: _SwigPyObject_own in example_wrap.o "_PyCObject_Import", referenced from: _SWIG_Python_GetModule in example_wrap.o "_time", referenced from: _get_time in example.o (maybe you meant: cstring=:get_time, cstring=get_time , _get_time ) "_PyInstance_NewRaw", referenced from: _SWIG_Python_NewShadowInstance in example_wrap.o "_PyErr_SetString", referenced from: _SWIG_Python_AddErrorMsg in example_wrap.o _SWIG_Python_SetErrorMsg in example_wrap.o _SWIG_Python_UnpackTuple in example_wrap.o _swig_varlink_getattr in example_wrap.o _swig_varlink_setattr in example_wrap.o "_PyExc_OverflowError", referenced from: _SWIG_Python_ErrorType in example_wrap.o "_fputc", referenced from: _SwigPyPacked_print in example_wrap.o "_PyInt_AsLong", referenced from: _SWIG_AsVal_double in example_wrap.o _SWIG_AsVal_long in example_wrap.o "_PyErr_SetObject", referenced from: _SWIG_Python_SetErrorObj in example_wrap.o "_PyObject_Malloc", referenced from: _SwigPyObject_New in example_wrap.o _SwigPyPacked_New in example_wrap.o _SWIG_Python_newvarlink in example_wrap.o "_PyString_FromFormat", referenced from: _SwigPyObject_repr in example_wrap.o _SwigPyPacked_repr in example_wrap.o _SwigPyPacked_repr in example_wrap.o _SwigPyPacked_str in example_wrap.o "_strlen", referenced from: _SWIG_TypeEquiv in example_wrap.o _SWIG_TypeCompare in example_wrap.o _SWIG_PackVoidPtr in example_wrap.o _SWIG_PackDataName in example_wrap.o _SWIG_FromCharPtr in example_wrap.o _SWIG_Python_addvarlink in example_wrap.o _SWIG_Python_FixMethods in example_wrap.o _SWIG_Python_FixMethods in example_wrap.o "_PyExc_AttributeError", referenced from: _SWIG_Python_ErrorType in example_wrap.o "___strcpy_chk", referenced from: _SWIG_PackVoidPtr in example_wrap.o ___inline_strcpy_chk in example_wrap.o "_PyLong_AsDouble", referenced from: _SWIG_AsVal_double in example_wrap.o "__Py_TrueStruct", referenced from: _SwigPyObject_richcompare in example_wrap.o "_fputs", referenced from: _SwigPyObject_print in example_wrap.o _SwigPyPacked_print in example_wrap.o _SwigPyPacked_print in example_wrap.o "_strcmp", referenced from: _SWIG_TypeCheck in example_wrap.o _SWIG_MangledTypeQueryModule in example_wrap.o _SWIG_UnpackVoidPtr in example_wrap.o _SWIG_UnpackDataName in example_wrap.o _SwigPyObject_Check in example_wrap.o _SwigPyPacked_Check in example_wrap.o _swig_varlink_getattr in example_wrap.o _swig_varlink_setattr in example_wrap.o "_PyErr_Format", referenced from: _SWIG_Python_AddErrorMsg in example_wrap.o _SWIG_Python_UnpackTuple in example_wrap.o _SWIG_Python_UnpackTuple in example_wrap.o _SWIG_Python_UnpackTuple in example_wrap.o _SWIG_Python_AddErrMesg in example_wrap.o _SWIG_Python_AddErrMesg in example_wrap.o _SWIG_Python_TypeError in example_wrap.o _SWIG_Python_TypeError in example_wrap.o _SWIG_Python_TypeError in example_wrap.o _SWIG_Python_TypeError in example_wrap.o "_PyExc_SyntaxError", referenced from: _SWIG_Python_ErrorType in example_wrap.o "_PyObject_GenericGetAttr", referenced from: _tmp.9623 in example_wrap.o _tmp.9773 in example_wrap.o "_PyFloat_Type", referenced from: _SWIG_AsVal_double in example_wrap.o _SWIG_AsVal_double in example_wrap.o "_PyString_ConcatAndDel", referenced from: _SwigPyObject_repr in example_wrap.o _swig_varlink_str in example_wrap.o _swig_varlink_str in example_wrap.o _swig_varlink_str in example_wrap.o "_PyCObject_FromVoidPtr", referenced from: _SWIG_Python_SetModule in example_wrap.o _SWIG_Python_TypeQuery in example_wrap.o "_PyList_SetItem", referenced from: _SWIG_Python_AppendOutput in example_wrap.o "___strncpy_chk", referenced from: _SWIG_PackDataName in example_wrap.o ___inline_strncpy_chk in example_wrap.o _SWIG_Python_addvarlink in example_wrap.o _SWIG_Python_FixMethods in example_wrap.o _SWIG_Python_FixMethods in example_wrap.o "_ctime", referenced from: _get_time in example.o "_PyExc_IndexError", referenced from: _SWIG_Python_ErrorType in example_wrap.o "_PyObject_GetAttrString", referenced from: _SwigPyClientData_New in example_wrap.o _SwigPyClientData_New in example_wrap.o _SWIG_Python_SetSwigThis in example_wrap.o "_PyString_AsString", referenced from: _SWIG_Python_str_AsChar in example_wrap.o "_PyObject_Init", referenced from: _SwigPyObject_New in example_wrap.o _SwigPyPacked_New in example_wrap.o _SWIG_Python_newvarlink in example_wrap.o "_PyExc_NameError", referenced from: _swig_varlink_getattr in example_wrap.o _swig_varlink_setattr in example_wrap.o "_PyInstance_Type", referenced from: _SWIG_Python_GetSwigThis in example_wrap.o "_fwrite", referenced from: _SwigPyPacked_print in example_wrap.o _SwigPyPacked_print in example_wrap.o _swig_varlink_print in example_wrap.o "_memcpy", referenced from: __PySwigObject_type in example_wrap.o __PySwigPacked_type in example_wrap.o _swig_varlink_type in example_wrap.o ld: symbol(s) not found for inferred architecture x86_64 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Fri Sep 17 19:52:43 2010 From: nad at acm.org (Ned Deily) Date: Fri, 17 Sep 2010 10:52:43 -0700 Subject: [Pythonmac-SIG] swig example on mac osx 10.6.4 References: <504598E1-D390-4D25-BA24-11D8C4F911A9@yahoo.it> Message-ID: In article <504598E1-D390-4D25-BA24-11D8C4F911A9 at yahoo.it>, Massimo Di Stefano wrote: > Hello All, > > i'm tring to run the swig - python example, from the page : > > http://www.swig.org/tutorial.html > > but running it i have a "wrong architecture" problem. Did you try using the instructions for building on OS X pointed to in the FAQ? http://www.dabeaz.com/cgi-bin/wiki.pl?SwigFaqMaxOSXSharedLibraries -- Ned Deily, nad at acm.org From Chris.Barker at noaa.gov Fri Sep 17 20:37:37 2010 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 17 Sep 2010 11:37:37 -0700 Subject: [Pythonmac-SIG] swig example on mac osx 10.6.4 In-Reply-To: <504598E1-D390-4D25-BA24-11D8C4F911A9@yahoo.it> References: <504598E1-D390-4D25-BA24-11D8C4F911A9@yahoo.it> Message-ID: <4C93B571.6080700@noaa.gov> Massimo Di Stefano wrote: > Hello All, > > i'm tring to run the swig - python example, from the page : > > http://www.swig.org/tutorial.html AARRGG! I can't believe they haven't upgraded that page yet. (I'm pretty sure I submitted a doc patch a couple years ago!) > but running it i have a "wrong architecture" problem. > MacBook-Pro-15-di-sasha:~ sasha$ gcc -c example.c example_wrap.c -I When building python extensions, you REALLY want to use distutils. See here for an example: http://www.swig.org/Doc2.0/Python.html#Python_nn6 at least that doc patch got in there. Let us know if that still doesn't work. -Chris > /usr/include/python2. > python2.5/ python2.6/ > MacBook-Pro-15-di-sasha:~ sasha$ gcc -c example.c example_wrap.c -I > /usr/include/python2.6 > MacBook-Pro-15-di-sasha:~ sasha$ ld -dylib example.o example_wrap.o -o > _example.so > Undefined symbols: > "_PyLong_AsLong", referenced from: > _SWIG_AsVal_long in example_wrap.o > "_PyDict_New", referenced from: > _SWIG_Python_NewShadowInstance in example_wrap.o > _SWIG_Python_NewShadowInstance in example_wrap.o > _SWIG_Python_SetSwigThis in example_wrap.o > _SWIG_Python_TypeCache in example_wrap.o > "_PyDict_SetItem", referenced from: > _SWIG_Python_NewShadowInstance in example_wrap.o > _SWIG_Python_NewShadowInstance in example_wrap.o > _SWIG_Python_SetSwigThis in example_wrap.o > _SWIG_Python_SetSwigThis in example_wrap.o > _SWIG_Python_TypeQuery in example_wrap.o > "_PyExc_ValueError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > "_PyDict_SetItemString", referenced from: > _SWIG_Python_SetConstant in example_wrap.o > _SWIG_Python_InstallConstants in example_wrap.o > _init_example in example_wrap.o > "_strstr", referenced from: > _SWIG_Python_ConvertFunctionPtr in example_wrap.o > _SWIG_Python_FixMethods in example_wrap.o > "_PyCFunction_Type", referenced from: > _SWIG_Python_ConvertFunctionPtr in example_wrap.o > "_PyErr_Occurred", referenced from: > _SWIG_Python_AddErrorMsg in example_wrap.o > _SwigPyClientData_New in example_wrap.o > _SWIG_Python_GetSwigThis in example_wrap.o > _SWIG_Python_ConvertPtrAndOwn in example_wrap.o > _SWIG_Python_GetModule in example_wrap.o > _SWIG_Python_AddErrMesg in example_wrap.o > _SWIG_Python_ArgFail in example_wrap.o > _SWIG_AsVal_double in example_wrap.o > _SWIG_AsVal_long in example_wrap.o > _swig_varlink_getattr in example_wrap.o > _swig_varlink_setattr in example_wrap.o > "_PyInt_FromLong", referenced from: > _SWIG_From_int in example_wrap.o > "_Py_InitModule4_64", referenced from: > _SWIG_Python_SetModule in example_wrap.o > _init_example in example_wrap.o > "__PyWeakref_CallableProxyType", referenced from: > _SWIG_Python_GetSwigThis in example_wrap.o > "_PyString_FromString", referenced from: > _SWIG_Python_str_FromChar in example_wrap.o > _swig_varlink_repr in example_wrap.o > _swig_varlink_str in example_wrap.o > _swig_varlink_str in example_wrap.o > _swig_varlink_str in example_wrap.o > _swig_varlink_str in example_wrap.o > "_PyType_IsSubtype", referenced from: > _SWIG_AsVal_double in example_wrap.o > "_PyFloat_FromDouble", referenced from: > _Swig_var_My_variable_get in example_wrap.o > "_PyModule_GetDict", referenced from: > _init_example in example_wrap.o > "__PyInstance_Lookup", referenced from: > _SWIG_Python_GetSwigThis in example_wrap.o > "___assert_rtn", referenced from: > _SWIG_Python_ConvertPtrAndOwn in example_wrap.o > _SWIG_Python_ConvertFunctionPtr in example_wrap.o > "_PyLong_FromVoidPtr", referenced from: > _SwigPyObject_long in example_wrap.o > "_PyErr_Clear", referenced from: > _SWIG_Python_AddErrorMsg in example_wrap.o > _SwigPyClientData_New in example_wrap.o > _SWIG_Python_GetSwigThis in example_wrap.o > _SWIG_Python_ConvertPtrAndOwn in example_wrap.o > _SWIG_Python_GetModule in example_wrap.o > _SWIG_Python_AddErrMesg in example_wrap.o > _SWIG_Python_MustGetPtr in example_wrap.o > _SWIG_AsVal_double in example_wrap.o > _SWIG_AsVal_long in example_wrap.o > "_PyObject_Free", referenced from: > _SwigPyObject_dealloc in example_wrap.o > _SwigPyPacked_dealloc in example_wrap.o > _SwigPyPacked_New in example_wrap.o > "___stack_chk_guard", referenced from: > _SwigPyObject_str in example_wrap.o > _SwigPyObject_str in example_wrap.o > _SwigPyPacked_print in example_wrap.o > _SwigPyPacked_print in example_wrap.o > _SwigPyPacked_repr in example_wrap.o > _SwigPyPacked_repr in example_wrap.o > _SwigPyPacked_str in example_wrap.o > _SwigPyPacked_str in example_wrap.o > _SWIG_Python_ArgFail in example_wrap.o > _SWIG_Python_ArgFail in example_wrap.o > "_PyArg_ParseTuple", referenced from: > __wrap_fact in example_wrap.o > __wrap_my_mod in example_wrap.o > __wrap_get_time in example_wrap.o > "__PyWeakref_ProxyType", referenced from: > _SWIG_Python_GetSwigThis in example_wrap.o > "_PyClass_Type", referenced from: > _SwigPyClientData_New in example_wrap.o > "_PyOS_snprintf", referenced from: > _SWIG_Python_ArgFail in example_wrap.o > "_PyExc_SystemError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > _SWIG_Python_UnpackTuple in example_wrap.o > "_PyObject_Call", referenced from: > _SWIG_Python_NewShadowInstance in example_wrap.o > "__Py_ZeroStruct", referenced from: > _SwigPyObject_richcompare in example_wrap.o > "__PyObject_GetDictPtr", referenced from: > _SWIG_Python_GetSwigThis in example_wrap.o > _SWIG_Python_NewShadowInstance in example_wrap.o > _SWIG_Python_SetSwigThis in example_wrap.o > "_malloc", referenced from: > _SwigPyClientData_New in example_wrap.o > _SwigPyPacked_New in example_wrap.o > _SWIG_Python_addvarlink in example_wrap.o > _SWIG_Python_addvarlink in example_wrap.o > _SWIG_Python_FixMethods in example_wrap.o > "_PyErr_Fetch", referenced from: > _SWIG_Python_AddErrorMsg in example_wrap.o > _SWIG_Python_AddErrMesg in example_wrap.o > "_PyExc_RuntimeError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > _SWIG_Python_ErrorType in example_wrap.o > _SWIG_Python_AddErrorMsg in example_wrap.o > "_PyList_New", referenced from: > _SWIG_Python_AppendOutput in example_wrap.o > "_strncmp", referenced from: > _SwigPyPacked_compare in example_wrap.o > _SWIG_Python_FixMethods in example_wrap.o > "_PyObject_CallFunctionObjArgs", referenced from: > _SwigPyObject_dealloc in example_wrap.o > _SWIG_Python_ConvertPtrAndOwn in example_wrap.o > "___memcpy_chk", referenced from: > _SwigPyPacked_New in example_wrap.o > ___inline_memcpy_chk in example_wrap.o > _SwigPyPacked_UnpackData in example_wrap.o > "__Py_NoneStruct", referenced from: > _SWIG_Python_AppendOutput in example_wrap.o > _SWIG_Py_Void in example_wrap.o > _SWIG_Python_ConvertPtrAndOwn in example_wrap.o > "_PyExc_MemoryError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > "_PyString_FromStringAndSize", referenced from: > _SWIG_FromCharPtrAndSize in example_wrap.o > "___memset_chk", referenced from: > _SWIG_UnpackDataName in example_wrap.o > ___inline_memset_chk in example_wrap.o > "_printf", referenced from: > _SwigPyObject_dealloc in example_wrap.o > "_PyExc_IOError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > "___stack_chk_fail", referenced from: > _SwigPyObject_str in example_wrap.o > _SwigPyPacked_print in example_wrap.o > _SwigPyPacked_repr in example_wrap.o > _SwigPyPacked_str in example_wrap.o > _SWIG_Python_ArgFail in example_wrap.o > "_PyModule_AddObject", referenced from: > _SWIG_Python_SetModule in example_wrap.o > "_PyList_Append", referenced from: > _SWIG_Python_AppendOutput in example_wrap.o > "_fprintf", referenced from: > _swig_varlink_print in example_wrap.o > "_PyTuple_New", referenced from: > _SwigPyClientData_New in example_wrap.o > _SwigPyObject_format in example_wrap.o > "_PyExc_ZeroDivisionError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > "_PyString_Format", referenced from: > _SwigPyObject_format in example_wrap.o > "_PyFloat_AsDouble", referenced from: > _SWIG_AsVal_double in example_wrap.o > "_PyDict_GetItem", referenced from: > _SWIG_Python_GetSwigThis in example_wrap.o > _SWIG_Python_TypeQuery in example_wrap.o > "_PyObject_GetAttr", referenced from: > _SWIG_Python_GetSwigThis in example_wrap.o > "_PyType_Type", referenced from: > __PySwigObject_type in example_wrap.o > __PySwigPacked_type in example_wrap.o > _swig_varlink_type in example_wrap.o > "_PyObject_Str", referenced from: > _SWIG_Python_AddErrorMsg in example_wrap.o > _SWIG_Python_AddErrMesg in example_wrap.o > _SWIG_Python_TypeError in example_wrap.o > "_PyCObject_AsVoidPtr", referenced from: > _SWIG_Python_TypeQuery in example_wrap.o > "_free", referenced from: > _SwigPyPacked_dealloc in example_wrap.o > _swig_varlink_dealloc in example_wrap.o > _swig_varlink_dealloc in example_wrap.o > "_PyExc_TypeError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > _SWIG_Python_UnpackTuple in example_wrap.o > _SWIG_Python_UnpackTuple in example_wrap.o > _SWIG_Python_UnpackTuple in example_wrap.o > _SWIG_Python_TypeError in example_wrap.o > _SWIG_Python_TypeError in example_wrap.o > _SWIG_Python_TypeError in example_wrap.o > _SWIG_Python_TypeError in example_wrap.o > "_PyArg_UnpackTuple", referenced from: > _SwigPyObject_own in example_wrap.o > "_PyBool_FromLong", referenced from: > _SwigPyObject_own in example_wrap.o > "_PyTuple_SetItem", referenced from: > _SwigPyClientData_New in example_wrap.o > _SwigPyObject_format in example_wrap.o > "__Py_NotImplementedStruct", referenced from: > _SwigPyObject_richcompare in example_wrap.o > _SwigPyObject_richcompare in example_wrap.o > _SwigPyObject_richcompare in example_wrap.o > "_PyObject_IsTrue", referenced from: > _SwigPyObject_own in example_wrap.o > "_PyCObject_Import", referenced from: > _SWIG_Python_GetModule in example_wrap.o > "_time", referenced from: > _get_time in example.o > (maybe you meant: cstring=:get_time, cstring=get_time , _get_time ) > "_PyInstance_NewRaw", referenced from: > _SWIG_Python_NewShadowInstance in example_wrap.o > "_PyErr_SetString", referenced from: > _SWIG_Python_AddErrorMsg in example_wrap.o > _SWIG_Python_SetErrorMsg in example_wrap.o > _SWIG_Python_UnpackTuple in example_wrap.o > _swig_varlink_getattr in example_wrap.o > _swig_varlink_setattr in example_wrap.o > "_PyExc_OverflowError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > "_fputc", referenced from: > _SwigPyPacked_print in example_wrap.o > "_PyInt_AsLong", referenced from: > _SWIG_AsVal_double in example_wrap.o > _SWIG_AsVal_long in example_wrap.o > "_PyErr_SetObject", referenced from: > _SWIG_Python_SetErrorObj in example_wrap.o > "_PyObject_Malloc", referenced from: > _SwigPyObject_New in example_wrap.o > _SwigPyPacked_New in example_wrap.o > _SWIG_Python_newvarlink in example_wrap.o > "_PyString_FromFormat", referenced from: > _SwigPyObject_repr in example_wrap.o > _SwigPyPacked_repr in example_wrap.o > _SwigPyPacked_repr in example_wrap.o > _SwigPyPacked_str in example_wrap.o > "_strlen", referenced from: > _SWIG_TypeEquiv in example_wrap.o > _SWIG_TypeCompare in example_wrap.o > _SWIG_PackVoidPtr in example_wrap.o > _SWIG_PackDataName in example_wrap.o > _SWIG_FromCharPtr in example_wrap.o > _SWIG_Python_addvarlink in example_wrap.o > _SWIG_Python_FixMethods in example_wrap.o > _SWIG_Python_FixMethods in example_wrap.o > "_PyExc_AttributeError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > "___strcpy_chk", referenced from: > _SWIG_PackVoidPtr in example_wrap.o > ___inline_strcpy_chk in example_wrap.o > "_PyLong_AsDouble", referenced from: > _SWIG_AsVal_double in example_wrap.o > "__Py_TrueStruct", referenced from: > _SwigPyObject_richcompare in example_wrap.o > "_fputs", referenced from: > _SwigPyObject_print in example_wrap.o > _SwigPyPacked_print in example_wrap.o > _SwigPyPacked_print in example_wrap.o > "_strcmp", referenced from: > _SWIG_TypeCheck in example_wrap.o > _SWIG_MangledTypeQueryModule in example_wrap.o > _SWIG_UnpackVoidPtr in example_wrap.o > _SWIG_UnpackDataName in example_wrap.o > _SwigPyObject_Check in example_wrap.o > _SwigPyPacked_Check in example_wrap.o > _swig_varlink_getattr in example_wrap.o > _swig_varlink_setattr in example_wrap.o > "_PyErr_Format", referenced from: > _SWIG_Python_AddErrorMsg in example_wrap.o > _SWIG_Python_UnpackTuple in example_wrap.o > _SWIG_Python_UnpackTuple in example_wrap.o > _SWIG_Python_UnpackTuple in example_wrap.o > _SWIG_Python_AddErrMesg in example_wrap.o > _SWIG_Python_AddErrMesg in example_wrap.o > _SWIG_Python_TypeError in example_wrap.o > _SWIG_Python_TypeError in example_wrap.o > _SWIG_Python_TypeError in example_wrap.o > _SWIG_Python_TypeError in example_wrap.o > "_PyExc_SyntaxError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > "_PyObject_GenericGetAttr", referenced from: > _tmp.9623 in example_wrap.o > _tmp.9773 in example_wrap.o > "_PyFloat_Type", referenced from: > _SWIG_AsVal_double in example_wrap.o > _SWIG_AsVal_double in example_wrap.o > "_PyString_ConcatAndDel", referenced from: > _SwigPyObject_repr in example_wrap.o > _swig_varlink_str in example_wrap.o > _swig_varlink_str in example_wrap.o > _swig_varlink_str in example_wrap.o > "_PyCObject_FromVoidPtr", referenced from: > _SWIG_Python_SetModule in example_wrap.o > _SWIG_Python_TypeQuery in example_wrap.o > "_PyList_SetItem", referenced from: > _SWIG_Python_AppendOutput in example_wrap.o > "___strncpy_chk", referenced from: > _SWIG_PackDataName in example_wrap.o > ___inline_strncpy_chk in example_wrap.o > _SWIG_Python_addvarlink in example_wrap.o > _SWIG_Python_FixMethods in example_wrap.o > _SWIG_Python_FixMethods in example_wrap.o > "_ctime", referenced from: > _get_time in example.o > "_PyExc_IndexError", referenced from: > _SWIG_Python_ErrorType in example_wrap.o > "_PyObject_GetAttrString", referenced from: > _SwigPyClientData_New in example_wrap.o > _SwigPyClientData_New in example_wrap.o > _SWIG_Python_SetSwigThis in example_wrap.o > "_PyString_AsString", referenced from: > _SWIG_Python_str_AsChar in example_wrap.o > "_PyObject_Init", referenced from: > _SwigPyObject_New in example_wrap.o > _SwigPyPacked_New in example_wrap.o > _SWIG_Python_newvarlink in example_wrap.o > "_PyExc_NameError", referenced from: > _swig_varlink_getattr in example_wrap.o > _swig_varlink_setattr in example_wrap.o > "_PyInstance_Type", referenced from: > _SWIG_Python_GetSwigThis in example_wrap.o > "_fwrite", referenced from: > _SwigPyPacked_print in example_wrap.o > _SwigPyPacked_print in example_wrap.o > _swig_varlink_print in example_wrap.o > "_memcpy", referenced from: > __PySwigObject_type in example_wrap.o > __PySwigPacked_type in example_wrap.o > _swig_varlink_type in example_wrap.o > ld: symbol(s) not found for inferred architecture x86_64 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From massimodisasha at yahoo.it Sat Sep 18 13:53:27 2010 From: massimodisasha at yahoo.it (Massimo Di Stefano) Date: Sat, 18 Sep 2010 13:53:27 +0200 Subject: [Pythonmac-SIG] Pythonmac-SIG Digest, Vol 89, Issue 12 In-Reply-To: References: Message-ID: <6FB17316-7A71-4B94-8E09-236343669F5C@yahoo.it> thanks! i haven't looked inside the faq :-( thanks to point me to its page, swig -python example.i cc -c `python-config --cflags` example.c example_wrap.c cc -bundle `python-config --ldflags` example.o example_wrap.o -o _example.so fix the problems, now in the tutorial, all works as aspected. best regard, Massimo Il giorno 18/set/2010, alle ore 12.00, pythonmac-sig-request at python.org ha scritto: > Did you try using the instructions for building on OS X pointed to in > the FAQ? > > http://www.dabeaz.com/cgi-bin/wiki.pl?SwigFaqMaxOSXSharedLibraries -------------- next part -------------- An HTML attachment was scrubbed... URL: From massimodisasha at yahoo.it Sat Sep 18 13:56:26 2010 From: massimodisasha at yahoo.it (Massimo Di Stefano) Date: Sat, 18 Sep 2010 13:56:26 +0200 Subject: [Pythonmac-SIG] Pythonmac-SIG Digest, Vol 89, Issue 12 In-Reply-To: References: Message-ID: <86BEFCBF-F6CF-4F51-A0EE-9B99AC20EF7C@yahoo.it> I tried using the notes from here : http://www.dabeaz.com/cgi-bin/wiki.pl?SwigFaqMaxOSXSharedLibraries all works fine, in the nex days i'll also try the "distutils way" and let you know :-) thanks to helped me !!! best regards, Massimo. Il giorno 18/set/2010, alle ore 12.00, pythonmac-sig-request at python.org ha scritto: > When building python extensions, you REALLY want to use distutils. See here for an example: > > http://www.swig.org/Doc2.0/Python.html#Python_nn6 > > at least that doc patch got in there. > > Let us know if that still doesn't work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hello at segovis.com Fri Sep 17 15:47:05 2010 From: hello at segovis.com (hello at segovis.com) Date: Fri, 17 Sep 2010 08:47:05 -0500 Subject: [Pythonmac-SIG] Newbie MacPython 3.1 question: installing Tweepy Message-ID: <4C937159.7070704@segovis.com> Newbie question: I am new to python (and programming in general) and have begun working with python 3.1.2 on my Mac. I used the DMG installer available on python.org, and have been able to write, and run, python code successfully. Currently, I am trying to install the tweepy-1.7 library to work with the python 3.1.2 install. I have installed tweepy on my Mac and have the library running successfully with the default python 2.6 install. Can someone provide advice as to how to link my python 3.1.2 with the tweepy library? I have tried setup.py with python 3.1.2, but this function is not available. I apologize if this email is in appropriate for this list, and if so, would appreciate any information as to where I should send this question. Sincerely, C From nad at acm.org Sun Sep 19 17:00:01 2010 From: nad at acm.org (Ned Deily) Date: Sun, 19 Sep 2010 08:00:01 -0700 Subject: [Pythonmac-SIG] Newbie MacPython 3.1 question: installing Tweepy References: <4C937159.7070704@segovis.com> Message-ID: In article <4C937159.7070704 at segovis.com>, "hello at segovis.com" wrote: > Newbie question: > > I am new to python (and programming in general) and have begun working > with python 3.1.2 on my Mac. I used the DMG installer available on > python.org, and have been able to write, and run, python code > successfully. Currently, I am trying to install the tweepy-1.7 library > to work with the python 3.1.2 install. I have installed tweepy on my > Mac and have the library running successfully with the default python > 2.6 install. Can someone provide advice as to how to link my python > 3.1.2 with the tweepy library? I have tried setup.py with python 3.1.2, > but this function is not available. A similar question came up recently on Stackoverflow. At the time, as far as I could tell there was no evidence that tweety from http://github.com/joshthecoder/tweepy had been converted to run under Python 3, despite the mention of "python 3" in its short description. I just tried it again and even tried to run 2to3 on it. It looks like it still needs attention for Python 3. You might want to open an issue there on github. -- Ned Deily, nad at acm.org From christian at prinoth.name Fri Sep 24 11:29:13 2010 From: christian at prinoth.name (Christian Prinoth) Date: Fri, 24 Sep 2010 11:29:13 +0200 Subject: [Pythonmac-SIG] appscript and mail.app, how to access attachments? Message-ID: I am trying the following: mail=app('mail') msgs=mail.selection() msg=msgs[0] now I would like to use msg.mail_attachments but this won't work. If I ask for help, under elements I get the following: Elements: AEType("attc") -- by name, index, relative, range, test, id bcc_recipients -- by name, index, relative, range, test cc_recipients -- by name, index, relative, range, test headers -- by name, index, relative, range, test recipients -- by name, index, relative, range, test to_recipients -- by name, index, relative, range, test How do I access the attachments? Thanks Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: From madzientist at gmail.com Tue Sep 28 22:00:04 2010 From: madzientist at gmail.com (Suresh Krishna) Date: Tue, 28 Sep 2010 21:00:04 +0100 Subject: [Pythonmac-SIG] Interacting with the contents of an editor Message-ID: Hi, I would like to interact with the content of an editor (simple single file editor will do) using Python on OS 10.6. The python script will run in the background and do stuff (like open pop-up windows etc) based on evaluating the text entered into the editor. I am a Python novice, but am familiar with C/Matlab programming. And I want to learn whatever is necessary to get this done. What would be the easiest way to go about this ? Using wxPython's text controls ? I would really like to interact with a full-fledged editor if possible. Would Scintilla be an option ? Maybe something using AppleScript and TextEdit ? Thanks much !! Suresh From cohar at conncoll.edu Tue Sep 28 23:53:24 2010 From: cohar at conncoll.edu (Charles Hartman) Date: Tue, 28 Sep 2010 17:53:24 -0400 Subject: [Pythonmac-SIG] Interacting with the contents of an editor In-Reply-To: References: Message-ID: If I understand correctly, you want to build an editor with a Python component, rather than interact with an existing editor. If I'm wrong, maybe AppleScript/TextEdit is a way to go; maybe someone else will have tips on how to do that. In wxPython, the wxStyledTextCtrl is essentially a Scintilla-based editor, with lexers, very much like WingIDE. Getting the STC to behave reasonably as a basic editor is not difficult -- I know because I've done it, and I'm not much of a programmer. Note that the documentation for STC is rather separate from the rest of the wxPython documentation. Look on http://www.yellowbrain.com/stc/index.html Browsing through that would show you a lot of what the STC is built to do. If you want special behavior, you'd have to build a lexer or more likely tweak an existing one. I haven't yet found a need to do that. On Tue, Sep 28, 2010 at 4:00 PM, Suresh Krishna wrote: > > Hi, > > I would like to interact with the content of an editor (simple single file > editor will do) using Python on OS 10.6. The python script will run in the > background and do stuff (like open pop-up windows etc) based on evaluating > the text entered into the editor. > > I am a Python novice, but am familiar with C/Matlab programming. And I want > to learn whatever is necessary to get this done. > > What would be the easiest way to go about this ? Using wxPython's text > controls ? I would really like to interact with a full-fledged editor if > possible. Would Scintilla be an option ? Maybe something using AppleScript > and TextEdit ? > > Thanks much !! > > Suresh > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Charles O. Hartman Poet in Residence Professor, Chair, Department of Literatures in English oak.conncoll.edu/cohar -------------- next part -------------- An HTML attachment was scrubbed... URL: From madzientist at gmail.com Wed Sep 29 05:48:35 2010 From: madzientist at gmail.com (Suresh Krishna) Date: Wed, 29 Sep 2010 04:48:35 +0100 Subject: [Pythonmac-SIG] Interacting with the contents of an editor In-Reply-To: References: Message-ID: On Tue, 28 Sep 2010 22:53:24 +0100, Charles Hartman wrote: > If I understand correctly, you want to build an editor with a Python > component, rather than interact with an existing editor. If I'm wrong, > maybe AppleScript/TextEdit is a way to go; maybe someone else will have > tips > on how to do that. Thank you for your reply. I went through the yellowbrain.com site on the STC and learnt a lot. And I also found peppy, the python-based XEMacs-like editor based on the STC. So that may be the best of both worlds: an editor with functionality, and the STC hooks that would allow me to implement what I wanted. I would like to use the lexer that you mentioned, but I have a feeling it might be easier for my purpose to use the stc_onChange event, because the lexer appears to be particularly designed for triggering text coloring rather than for returning tokens that can trigger actions (am I wrong ?). I would still also like to find an AppleScript+TextEdit solution if one seems plausible. Thanks again for the very prompt and useful reply !! Suresh From nad at acm.org Wed Sep 29 05:42:20 2010 From: nad at acm.org (Ned Deily) Date: Tue, 28 Sep 2010 20:42:20 -0700 Subject: [Pythonmac-SIG] Interacting with the contents of an editor References: Message-ID: In article , "Suresh Krishna" wrote: > I would still also like to find an AppleScript+TextEdit solution if one > seems plausible. appscript (http://pypi.python.org/pypi/appscript/) allows you to control AppleScriptable applications. Its documentation includes some examples of scripting TextEdit (for example: http://appscript.sourceforge.net/py-appscript/examples.html). -- Ned Deily, nad at acm.org