Re: [Pythonmac-SIG] py2app cannot move to target thread error

2009-09-17 Thread Daniel Miller
Has anyone within earshot of this list successfully built a PyQt app with SQL support using py2app? I've been poking and prodding at the problem for a few months now and I'm no closer to a solution to the "cannot move to thread ..." error. Yes, I think I got this to work recently with Qt3.

Re: [Pythonmac-SIG] Including images (jpg) in app bundle

2009-08-10 Thread Daniel Miller
On Aug 8, 2009, at 9:13 AM, Brendan Simon (eTRIX) wrote: I have a jpg image which is displayed in my wxPython app. It is loaded from an 'image' directory. eg. image/mypic.jpg This works fine when I type "python mywxapp" from the command line, but when I build an app bundle it doesn't wor

Re: [Pythonmac-SIG] How to get setuptools to build a Universal Binary? [SOLVED!]

2009-01-08 Thread Daniel Miller
Woot! I finally got my MySQLdb-using Python app working as a Universal Binary! Excellent! I'm glad you got it working. The root cause of most of the trouble was the broken 5.1 MySQL distribution (bug #41940 on the MySQL tracker). I tried patching it up as Ned suggested, but that didn't

Re: [Pythonmac-SIG] How to get setuptools to build a Universal Binary?

2009-01-07 Thread Daniel Miller
MySQLdb instead uses setuptools. So: does anyone have a clue how I can convince setuptools to build a PPC binary (or better yet, a Universal one) on an Intel machine? I just downloaded the mysqldb module from sourceforge to have a look at how it decides how to compile its C extension.

Re: [Pythonmac-SIG] Carbon bindings' future

2008-05-19 Thread Daniel Miller
Ronald, This version is now merged into urllib and commited as revision 63159 in the trunk. Ahh, sorry I'm late. I was on vacation last week when you posted this. Here's an updated version with a bit less duplication (about 55 lines removed). This seems like it will be much easier to mai

Re: [Pythonmac-SIG] Carbon bindings' future

2008-04-14 Thread Daniel Miller
Try again...that last file was my scratch file I was using for development. Here's the real thing. Sorry for the mess. ~ Daniel def getproxies_internetconfig(): """Return a dictionary of scheme -> proxy server URL mappings. This function has 'internetconfig' in its name for histo

Re: [Pythonmac-SIG] Carbon bindings' future

2008-04-14 Thread Daniel Miller
Thanks Nicholas, The general CF rule is that if you use a function named *Get*, then you don't need to CFRelease; if you use a function named *Copy* or *Create*, you do. So, what you've written looks fine. With that in mind one further modification seems to be necessary. Take three attac

Re: [Pythonmac-SIG] Carbon bindings' future

2008-04-11 Thread Daniel Miller
Take two (attached). BTW, I'm not sure if I'm doing the memory management correctly, especially with the values returned from CFDictionaryGetValue (it might need a CFRelease in there). Could someone double-check me on that please? ~ Daniel def getproxies_internetconfig(): """Return

Re: [Pythonmac-SIG] Carbon bindings' future

2008-04-11 Thread Daniel Miller
Hi Ronald, Will this work (see attached)? ~ Daniel def getproxies_internetconfig(): """Return a dictionary of scheme -> proxy server URL mappings. By convention the mac uses Internet Config to store proxies. An HTTP proxy, for instance, is stored under the HttpProxy key.

Re: [Pythonmac-SIG] ctypes and OS X CF types?

2007-10-22 Thread Daniel Miller
AFAIK you don't need to do anything special (i.e. write "ctypes definitions") to call the CF functions with ctypes. Just call them. Here's a snippet of code that I use to open a PDF document and get the number of pages: from ctypes import cdll, byref, c_void_p, c_int, c_uint, c_float, c_d

Re: [Pythonmac-SIG] ctypes and OS X CF types?

2007-10-22 Thread Daniel Miller
Please ignore my previous email. I hope it didn't come across as condescending. Really, I was only trying to help. Unfortunately, I had not read your question thoroughly enough. Bill Janssen wrote: > I'm trying to call the Spotlight system from Python, and I thought I'd > try using the ctypes

Re: [Pythonmac-SIG] Python/appscript ready for primetime?

2007-09-05 Thread Daniel Miller
Karl, Karl Sweitzer wrote: > Is Python's appscript suitable and sufficiently mature for deployment > in a commercial application? I've used appscript for simple tasks (e.g. attaching a PDF to an email) in an in-house application where I work. It works great for what I need to do. My only

[Pythonmac-SIG] Send a fax or email via PDF workflow with PyObjC

2007-06-19 Thread Daniel Miller
I'm using PyObjC to print a PDF document in an application I'm building. I've got the print feature working with a custom NSView subclass and NSPrintOperation (I can print and preview PDF documents generated by my application). However, I would like to provide a fax number and and email add