[Pythonmac-SIG] expat.py broken in Python 2.5
In the lastest python 2.5 build for Macintosh, the pyexpat module binary is not available to Mac users with Intel processors. If you try to import it, you get an error saying that the binary is for PPC architecture only. This is a bug introduced in Python 2.5, since it does not exist in Python 2.4. How can we go about fixing this? File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/_xmlplus/parsers/expat.py", line 4, in from pyexpat import * ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/_xmlplus/parsers/pyexpat.so, 2): no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/_xmlplus/parsers/pyexpat.so: mach-o, but wrong architecture thanks S ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Pythonmac-SIG Digest, Vol 37, Issue 28
> > From: Jerry LeVan <[EMAIL PROTECTED]> > To: pythonmac-sig@python.org > Date: Wed, 24 May 2006 15:39:48 -0400 > Subject: [Pythonmac-SIG] WhereAmI ? > I can easily pick up modules living in Resources, but > I can't see how to find pure "data" files living in the > the Resources folder. > Jerry, your current directory can be found from getting the full path to the running module: whereami = os.path.abspath(os.path.dirname(__file__)) HTH S __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] wxPython -- some disappointment using it.
> > From: Charles Hartman <[EMAIL PROTECTED]> > If I recall correctly, this syndrome is covered in the book. It > happens because the diagnostic's going to a window that closes when > the app does. Look up wx.App(redirect=True) in the index -- you can > write the diagnostic to a file and examine it at leisure. > > From: Saggau <[EMAIL PROTECTED]> > Charles is right: > http://www.wxpython.org/docs/api/wx.App-class.html thank you Charles, thank you Saggau (and thank you Daniel for posing the question). I'm also new to wxPython, though I've been working with Wax (a more pythonic layer on top of wxPython) for some months now), and I also was having a devil of a time trying to debug a simple app - the error window would pop up for a fraction of a second and then disappear. I tried your suggestion and indeed, I can read the exception message at my leisure! thanks again Stewart in Calgary __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Matplotlib give bus error (10.3.9)
-- Forwarded message -- From: Tom Loredo <[EMAIL PROTECTED]> >mpl built and installed fine, but gave a bus error when trying to plot ("import matplotlib" would work fine, but "import pylab" would give the error). Tom, I came across a bus error in an unrelated package, wax (a pythonic wrapper on wxPython). I was eventually able to track it down to a problem with sys.stdout on the Mac. Then I was able to code a workaround so that the problem statement doesn't get executed on OS X. I did that by inserting print statements (print "got to 1" - and so on) throughout the problem module and noting after which 'milepost' the exception occurred. You could try sticking some of those in your module and see what you get. cheers S ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] path locations
> From: Christopher Barker <[EMAIL PROTECTED]> > Here's where you've deviated from the standard: As a rule, you shouldn't > out ANYTHING in /usr/bin. that's Apple's job. As you haven't written > over anything, it's probably not going to cause any problems, but the > usual solution is to add /usr/local/bin to your PATH instead Thanks for the reminder. I had a feeling that we shouldn't put stuff in /sw/bin, and I am used to using /usr/local/bin on my Linux box, but it's good to know that others are doing this too. cheers S ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Question on user's directory ( ~ )
On 3/18/06, Kent Quirk <[EMAIL PROTECTED]> wrote: > Try this: > > import os.path > os.path.expanduser('~') you da man! That works perfectly. I mostly use Python on WinXP, so I haven't been familiar with that function up until now. thanks again S ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] Question on user's directory ( ~ )
I have a question on use of the tilde symbol (~) to access the current user's home directory. If you are in a bash shell, you can "cd ~" and be in the default user's home directory. I want my python app to be able to switch to the user's directory. But I can't use os.chdir('~') since Python doesn't understand the tilde. Nor can I do this: file = os.path.join('~', filename) What options do I have? thanks S ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] py2app question
I have an application I'd like to have located on a USB stick, and be able to run in a self-contained manner on any PC it's connected to, whether running OS X or Windows. Can I use py2app to help create this stand-alone distribution? Or, could I count on Python always being installed on any OS X - equipped PC, and thus not need to install a separate copy on my USB stick in order to be able to run my app? thanks S ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] indentation problem
> From: altern <[EMAIL PROTECTED]> > Subject: [Pythonmac-SIG] indentation problem > hi all > > i have been developing some tutorials with PyOxide and now i find that > when i open them on Smultron the indentation is wrong. I use Smultron as well. What do you mean, "the indentation is wrong"? Too much indentation, not enough? > It tried to fix the indentation in one but there is something wrong > under the hood because then it complains at end of lines, it says the > syntax is wrong, What complains, Smultron? What's the exact error message? > I was wondering if there is some way to automatically fix this or if i > have to go file by file fixing the indentation and line breaks. The most common source of problems with indentation is mixed use of tabs and space. You should do one or other, preferably spaces. In Preferences > Advanced, check "Indent with spaces not tabs" In View, select Show Invisible Characters. This should help you track down the problem If you do have to change the indentation of a file, you don't need to edit lines individually. Select all lines in a block, then use Option-L to indent by 4 chars, or Option-K to outdent one char at a time. > The funny thing is that when i open them in Kate under debian they look ok. Kate is not a programming editor, so that proves nothing. cheers Stewart ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] what is wxMacExecute Bad bundle?
hi I'm working on Firedrop2, a blogging client using wax and wxPython. I'm developing on OS X 10.4.4. My problem occurs while starting the app, long before a GUI is created. I import several plugins. The app was running fine earlier, now suddenly it's choking when I try to import the last of several plugins (and I haven't changed any code in any plugins!).The exact line causing the error is the one with 'exec': name = OutBox line = "import %s as mod" % name exec line Here's a debug exception statement that is generated: [Debug] 00:38:53: wxMacExecute Bad bundle: /Library/Frameworks/Python.framework/Versions/2.4/Resources/Python.app/Contents/MacOS/Python [Debug] 00:38:53: pid=10825 [Debug] 00:38:53: Successfully added notification to the runloop [Debug] 00:38:57: Process ended So, what's a bad bundle? thanks S ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig