Re: [Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?

2007-11-02 Thread Dethe Elza
On 11/2/07, Darran Edmundson <[EMAIL PROTECTED]> wrote: > > The bare minimum you need is: > > import objc > > objc.loadBundle('MyBundle', globals(), > > bundle_path='/my/bundle/path/MyBundle.framework') One more thing. While the above is a bare minimum from the command line or to work with th

Re: [Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?

2007-11-02 Thread Dethe Elza
On 11/2/07, Darran Edmundson <[EMAIL PROTECTED]> wrote: > Now that we have a proof-of-concept Objective-C framework, I'm trying to > port a simple test application to python. Keep in mind that I didn't > write either of these. I'm a complete neophyte in terms of Mac > development and Objective

Re: [Pythonmac-SIG] Problem with numpy on Leopard

2007-11-02 Thread Ronald Oussoren
On 2 Nov, 2007, at 12:32, Kent Johnson wrote: Christopher Barker wrote: I suppose this may be a time to take a good look at workingenv again... Or virtualenv which has replaced workingenv: http://pypi.python.org/pypi/virtualenv Virtualenv almost but not quite works on OSX. I've donated th

Re: [Pythonmac-SIG] Leopard python architectures in setup.py

2007-11-02 Thread Ronald Oussoren
On 2 Nov, 2007, at 21:38, Martina Oefelein wrote: Am 02.11.2007 um 08:03 schrieb Ronald Oussoren: As you've noticed the actual framework is 64bit but the commandline tools are not. It should be easy enough to add 64-bit command-line tools as well, but even then you'll have to add extra ar

Re: [Pythonmac-SIG] Leopard python architectures in setup.py

2007-11-02 Thread Ronald Oussoren
On 2 Nov, 2007, at 22:02, Boyd Waters wrote: On Nov 2, 2007, at 2:38 PM, Martina Oefelein wrote: I think this actually makes sense: if the command line tools were 32/64 bit universal, scripts would run with the 64 bit version on 64 bit systems, and wouldn't be able to use any of the librarie

Re: [Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?

2007-11-02 Thread Darran Edmundson
Dethe Elza wrote: > If you write an Objective-C framework, the python code to wrap it > using PyObjC is very short. Here is an example I use to expose Tim > Omernick's CocoaSequenceGrabber framework to capture images from the > iSight camera ... > The bare minimum you need is: > import objc >

Re: [Pythonmac-SIG] Python TkAqua, Tkinter bug

2007-11-02 Thread Kevin Walzer
Dave Reed wrote: > > > I'm not certain exactly what you're saying. Are you saying to install > Active State's Python? It looks like that doesn't include a new Tk Aqua. > Or are you saying to install Active State's Tcl? I'm not certain how > installing the latter by itself will change which Tk

Re: [Pythonmac-SIG] Python TkAqua, Tkinter bug

2007-11-02 Thread Dave Reed
On Nov 2, 2007, at 6:32 PM, Kevin Walzer wrote: > [EMAIL PROTECTED] wrote: >> I am not certain where the problem is or who to report it to, but >> there is a bug in TkAqua, Tkinter, or possibly OS X's windowing >> system. I am using a simple module on top of Tkinter for teaching >> an in

Re: [Pythonmac-SIG] Python TkAqua, Tkinter bug

2007-11-02 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: > I am not certain where the problem is or who to report it to, but > there is a bug in TkAqua, Tkinter, or possibly OS X's windowing > system. I am using a simple module on top of Tkinter for teaching an > intro programming course. When I click the mouse in the Tkint

[Pythonmac-SIG] Python TkAqua, Tkinter bug

2007-11-02 Thread davelist
I am not certain where the problem is or who to report it to, but there is a bug in TkAqua, Tkinter, or possibly OS X's windowing system. I am using a simple module on top of Tkinter for teaching an intro programming course. When I click the mouse in the Tkinter window, it often reports the

Re: [Pythonmac-SIG] more tab completion issues.

2007-11-02 Thread Boyd Waters
I've reported this in Apple Bug 5563035. On Nov 1, 2007, at 9:25 PM, Michael VanLandingham wrote: > Yeah after looking at it again, I noticed certain things, like > __class__, had 4, and not 1, entries in the listing. It's a bit > annoying, since with something like numpy's 'array', it'll fi

Re: [Pythonmac-SIG] sys.path on Leopard

2007-11-02 Thread Brian Granger
I think this is currently the best approach because PYTHONPATH gets lost in sudo commands in Leopard. On 11/1/07, Jack Jansen <[EMAIL PROTECTED]> wrote: > > On 1-Nov-2007, at 20:45 , Brian Granger wrote: > > Running python setup.py install on Leopard causes packages to be > > installed in the usua

Re: [Pythonmac-SIG] Round 2 with Leopard+Python

2007-11-02 Thread Brian Granger
Yep, here is the beginning of my /etc/sudoers: # sudoers file. # # This file MUST be edited with the 'visudo' command as root. # # See the sudoers man page for the details on how to write a sudoers file. # # Host alias specification # User alias specification # Cmnd alias specification # Defau

Re: [Pythonmac-SIG] Round 2 with Leopard+Python

2007-11-02 Thread Boyd Waters
FYI: On Leopard, "sudo" filters environment variables, including PYTHONPATH. I have not tested this with MacPorts yet; I've been running MacPorts as a "normal" user without sudo. Will this matter for MacPorts? > Running "sudo -V" as root shows sudo's settings; part of that is > environment

Re: [Pythonmac-SIG] Leopard python architectures in setup.py

2007-11-02 Thread Boyd Waters
On Nov 2, 2007, at 2:38 PM, Martina Oefelein wrote: > I think this actually makes sense: if the command line tools were > 32/64 bit universal, scripts would run with the 64 bit version on 64 > bit systems, and wouldn't be able to use any of the libraries that > are only 32 bit. > > The framework,

Re: [Pythonmac-SIG] Leopard python architectures in setup.py

2007-11-02 Thread William Kyngesburye
On Nov 2, 2007, at 3:38 PM, Martina Oefelein wrote: > > Am 02.11.2007 um 08:03 schrieb Ronald Oussoren: > >> As you've noticed the actual framework is 64bit but the commandline >> tools are not. It should be easy enough to add 64-bit command-line >> tools as well, but even then you'll have to add

Re: [Pythonmac-SIG] Round 2 with Leopard+Python

2007-11-02 Thread Boyd Waters
On Nov 2, 2007, at 10:16 AM, Brian Granger wrote: > First, if you have set PYTHONPATH to point > sys.path at the site-packages in /Library, this setting will be lost > when you do: > > sudo python setup.py install Ouch, another good one... This is almost certainly not a bug, but rather a secu

Re: [Pythonmac-SIG] Leopard python architectures in setup.py

2007-11-02 Thread Martina Oefelein
Am 02.11.2007 um 08:03 schrieb Ronald Oussoren: > As you've noticed the actual framework is 64bit but the commandline > tools are not. It should be easy enough to add 64-bit command-line > tools as well, but even then you'll have to add extra arguments to > build 64-bit extensions (as Boyd

Re: [Pythonmac-SIG] sys.path on Leopard

2007-11-02 Thread Martina Oefelein
Am 01.11.2007 um 21:14 schrieb Jack Jansen: > > On 1-Nov-2007, at 20:45 , Brian Granger wrote: >> Running python setup.py install on Leopard causes packages to be >> installed in the usual: >> >> /Library/Python/2.5/site-packages >> >> But, Apple put this directory _after_ >> >> /System/Library/F

Re: [Pythonmac-SIG] sys.path on Leopard

2007-11-02 Thread Brian Granger
I guess then that the main different is that the 2.5.1 off python.org doesn't include older versions of things like numpy, twisted, etc. that people would want to upgrdate. Brian On 11/2/07, Martina Oefelein <[EMAIL PROTECTED]> wrote: > > Am 01.11.2007 um 21:14 schrieb Jack Jansen: > > > > > On 1

Re: [Pythonmac-SIG] Problem with numpy on Leopard

2007-11-02 Thread Nicholas Riley
On Fri, Nov 02, 2007 at 01:06:08PM -0700, Christopher Barker wrote: > Ned Deily wrote: > > The easiest way is to use the install_requires keyword in setup.py. See > > the setuptools documentation here: > > > > > > That appears to handle depe

Re: [Pythonmac-SIG] Problem with numpy on Leopard

2007-11-02 Thread Robert Kern
Christopher Barker wrote: > Ned Deily wrote: >> The easiest way is to use the install_requires keyword in setup.py. See >> the setuptools documentation here: >> >> > > That appears to handle dependencies: > > install_requires > A string or l

Re: [Pythonmac-SIG] Problem with numpy on Leopard

2007-11-02 Thread Christopher Barker
Ned Deily wrote: > The easiest way is to use the install_requires keyword in setup.py. See > the setuptools documentation here: > > That appears to handle dependencies: install_requires A string or list of strings specifying what other dist

Re: [Pythonmac-SIG] Round 2 with Leopard+Python

2007-11-02 Thread Christopher Barker
Brian Granger wrote: > But, in Leopard, sudo does not preserve environment variables: > The solution currently is to install all packages to locations that > don't require sudo to write to. Or use "sudo -s", which starts a shell, then set your env vars: $ sudo -s $ export FOO=/tmp $ python -c

Re: [Pythonmac-SIG] [Numpy-discussion] Problem with numpy on Leopard

2007-11-02 Thread Boyd Waters
On Nov 2, 2007, at 9:33 AM, Brian Granger wrote: > Now under Leopard, this becomes "python setup.py install" + > muck with PYTHONPATH or .pth files. I'm not sure it's that bad. We ship a fairly complex science application. You might call it a very large set of Python extensions, but the C++

Re: [Pythonmac-SIG] [Numpy-discussion] Problem with numpy on Leopard

2007-11-02 Thread Bill Janssen
> I think the "FUD" you refer > to concerns a different problem: developing and distributing > multiple-component Python apps to multiple users on multiple machines. Well, that's actually what I do, on Tiger. I'll be interested to see how hard it is to do it with the system Python on Leopard.

[Pythonmac-SIG] Round 2 with Leopard+Python

2007-11-02 Thread Brian Granger
Hi, In the process of working through the issues with sys.path on Leopard, I have found another potential Leopard bug that is particularly nasty. In Tiger, sudo preserves environment variables: $ export FOO=/tmp $ python -c "import os; print os.environ['FOO']" /tmp $ sudo python -c "import os; p

Re: [Pythonmac-SIG] Problem with numpy on Leopard

2007-11-02 Thread Brian Granger
This is definitely worth looking at for this type of thing. Thanks for the pointer. Brian On 11/2/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > Christopher Barker wrote: > > I suppose this may be a time to take a good look at workingenv again... > > Or virtualenv which has replaced workingenv: >

Re: [Pythonmac-SIG] [Numpy-discussion] Problem with numpy on Leopard

2007-11-02 Thread Brian Granger
On 11/1/07, Bill Janssen <[EMAIL PROTECTED]> wrote: > > > It's not entirely silly. This has been the advice given to app > > > developers on this list and the PyObjC list for years now. It's nice > > > to have a better system Python for quick scripts, but it's still the > > > System Python. It's

Re: [Pythonmac-SIG] Problem with numpy on Leopard

2007-11-02 Thread Kent Johnson
Christopher Barker wrote: > I suppose this may be a time to take a good look at workingenv again... Or virtualenv which has replaced workingenv: http://pypi.python.org/pypi/virtualenv Kent ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://m