[Pythonmac-SIG] @reboot

2005-05-27 Thread Mario Ruggier
Hi, [ apologies about this not really being directly related to python mac... ] I am trying ro use an @reboot cron job to start an svn server (used for python development ;) with each restart (of a Panther G5 powermac). I have edited the file /etc/crontab, adding the line: @reboot svnserve -d

Re: [Pythonmac-SIG] making a C extension compatible across OS versions?

2005-05-27 Thread has
Bob wrote: >>Will extensions built on 10.4 work on 10.3, or will I have to create separate >>OS-specific binaries for those as well? > >Maybe, it depends. > >You really should be building packages on the least common denominator, you >have to test there anyway. It's hard to do right, Xcode is t

[Pythonmac-SIG] PYTHONPATH

2005-05-27 Thread Daniel S. Hartmanstorfer II
How do I set my PYTHONPATH in OS X? I am using python2.4 installed via Darwinports in /opt/local/bin/python. Thanks. Daniel S. Hartmanstorfer II "Opportunity is missed by most because it is dressed in overalls and looks like work." -Thomas Edison ___

Re: [Pythonmac-SIG] Upgraded to 2.4 and can't make it work

2005-05-27 Thread Kent Quirk
I can't find where you said that extensions shouldn't be linking to Python at all. I also can't understand how this could be the case, at least if we're building the extensions using Boost.Python (which we are). I've tried to build without linking to it, and it compiles but I end up with a bunch o

Re: [Pythonmac-SIG] PYTHONPATH

2005-05-27 Thread Ronald Oussoren
On Friday, May 27, 2005, at 03:12PM, Daniel S. Hartmanstorfer II <[EMAIL PROTECTED]> wrote: >How do I set my PYTHONPATH in OS X? I am using python2.4 installed >via Darwinports in /opt/local/bin/python. Thanks. Why do you want to do that? It's often (if not almost always) better to use a

Re: [Pythonmac-SIG] Upgraded to 2.4 and can't make it work

2005-05-27 Thread Ronald Oussoren
On Friday, May 27, 2005, at 03:33PM, Kent Quirk <[EMAIL PROTECTED]> wrote: >I can't find where you said that extensions shouldn't be linking to >Python at all. I also can't understand how this could be the case, at >least if we're building the extensions using Boost.Python (which we >are). The

Re: [Pythonmac-SIG] @reboot

2005-05-27 Thread Jim Allman
On May 27, 2005, at 5:11 AM, Mario Ruggier wrote: > Cannot tell where the problem is... The system.log contains the > following potentially relevant lines: > May 27 10:47:15 localhost SystemStarter: Initializing network > May 27 10:47:15 localhost cron[176]: (*system*) PARSE (bad username) > > Any

Re: [Pythonmac-SIG] making a C extension compatible across OS versions?

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 4:29 AM, has wrote: > Bob wrote: > > >>> Will extensions built on 10.4 work on 10.3, or will I have to >>> create separate OS-specific binaries for those as well? >>> >> >> Maybe, it depends. >> >> You really should be building packages on the least common >> denominator,

Re: [Pythonmac-SIG] Upgraded to 2.4 and can't make it work

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 6:31 AM, Kent Quirk wrote: > I can't find where you said that extensions shouldn't be linking to > Python at all. I also can't understand how this could be the case, at > least if we're building the extensions using Boost.Python (which we > are). When I said it shouldn't be li

Re: [Pythonmac-SIG] making a C extension compatible across OS versions?

2005-05-27 Thread has
Bob wrote: >> It sounds like the easiest thing would be to put the Tiger-only code in a >> separate file and build that on Tiger, and build the remainder on an older >> OS as before; then have osaterminology import or ignore the Tiger-only >> extension at runtime as appropriate. > >Yeah, the "e

[Pythonmac-SIG] best way to get os version?

2005-05-27 Thread has
Hi all, Apropos to last thread, what's the best way to check Mac OS version from Python at runtime? Thanks, has -- http://freespace.virgin.net/hamish.sanderson/ ___ Pythonmac-SIG maillist - [email protected] http://mail.python.org/mailman/li

Re: [Pythonmac-SIG] best way to get os version?

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 12:26 PM, has wrote: > Apropos to last thread, what's the best way to check Mac OS version > from Python at runtime? platform.mac_ver() is probably the easiest way, but there was a bug in Python 2.3.0 that prevents it from working there (i.e. Apple Python on Mac OS X 10.

Re: [Pythonmac-SIG] best way to get os version?

2005-05-27 Thread Bill Janssen
> platform.mac_ver() is probably the easiest way, but there was a bug > in Python 2.3.0 that prevents it from working there (i.e. Apple > Python on Mac OS X 10.3) That seems to make it essentially useless. Why tell us about it? Bill ___ Pythonmac-S

Re: [Pythonmac-SIG] best way to get os version?

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 1:57 PM, Bill Janssen wrote: >> platform.mac_ver() is probably the easiest way, but there was a bug >> in Python 2.3.0 that prevents it from working there (i.e. Apple >> Python on Mac OS X 10.3) >> > > That seems to make it essentially useless. Why tell us about it? Yet anot

[Pythonmac-SIG] SetSystemUIMode in python?

2005-05-27 Thread Jacob Kaplan-Moss
Howdy -- I'm working on a kiosk app, and I'd like to use SetSystemUIMode and friends (defined in MacApplication.h inside HIToolbox.framework). As far as I can tell, the HIToolbox framework isn't exposed in MacPython anywhere, but I might be missing something. Before I start figuring out ho

Re: [Pythonmac-SIG] SetSystemUIMode in python?

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 2:24 PM, Jacob Kaplan-Moss wrote: > I'm working on a kiosk app, and I'd like to use SetSystemUIMode and > friends (defined in MacApplication.h inside HIToolbox.framework). As > far as I can tell, the HIToolbox framework isn't exposed in MacPython > anywhere, but I might be mi

Re: [Pythonmac-SIG] SetSystemUIMode in python?

2005-05-27 Thread Dethe Elza
> While Pyrex is a pretty reasonable way to write extensions, PyObjC or > ctypes is generally less painful when wrapping a small number of > functions. This is very interesting. I thought the basic choices for wrapping C functions were: * Pyrex * ctypes * Write Obj-C and import with PyObjC I

Re: [Pythonmac-SIG] SetSystemUIMode in python?

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 3:01 PM, Dethe Elza wrote: >> While Pyrex is a pretty reasonable way to write extensions, PyObjC or >> ctypes is generally less painful when wrapping a small number of >> functions. >> > > This is very interesting. I thought the basic choices for wrapping C > functions were:

Re: [Pythonmac-SIG] SetSystemUIMode in python?

2005-05-27 Thread Dethe Elza
On 27-May-05, at 4:05 PM, Bob Ippolito wrote: >> * Pyrex >> * ctypes >> * Write Obj-C and import with PyObjC >> > > * SWIG (ughh) > * Write C++ and use Boost.Python (ugh) > * Python C API directly (not really *that* bad) Yeah, I know, I was only listing methods that I'd actually consider *using.

Re: [Pythonmac-SIG] SetSystemUIMode in python?

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 4:18 PM, Dethe Elza wrote: > On 27-May-05, at 4:05 PM, Bob Ippolito wrote: > >>> I hadn't realized that you could import functions with PyObjC and no >>> (additional) intervening Obj-C code. Very very cool. >> >> This functionality has been there since 1.2 (2004-12-29). > > Ye

[Pythonmac-SIG] Apple's python extensions into Quartz2D

2005-05-27 Thread nickg
Hi, What's the latest with Apple's python extensions to use Quartz2D? I'd like to use them with the latest python release but I can't figure out where the original source code for the extensions are so I can't do a build. It looks like they used SWIG, but that's about as much as I figure

Re: [Pythonmac-SIG] Apple's python extensions into Quartz2D

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 6:32 PM, nickg wrote: > What's the latest with Apple's python extensions to use Quartz2D? > I'd like to use them with the latest python release but I can't > figure out where the original source code for the extensions are so I > can't do a build. It looks like they used SWIG

Re: [Pythonmac-SIG] Apple's python extensions into Quartz2D

2005-05-27 Thread nickg
thanks for the reply. Odd, the Python API is nearly 1-1 with the CoreGraphics C API so I wouldn't expect any hacks. Oh well. I'm just using it to "draw" into a PDF or buffer to save a file. No UI or Windows needed. Can PyObjC make these calls? I'm new to the all the mac-python trickery

Re: [Pythonmac-SIG] Apple's python extensions into Quartz2D

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 7:00 PM, nickg wrote: > On May 27, 2005, at 9:39 PM, Bob Ippolito wrote: > > >> >> On May 27, 2005, at 6:32 PM, nickg wrote: >> >> >> >>> What's the latest with Apple's python extensions to use Quartz2D? >>> I'd like to use them with the latest python release but I can't >>>

Re: [Pythonmac-SIG] SetSystemUIMode in python?

2005-05-27 Thread Kent Quirk
Bob wrote: >* SWIG (ughh) >* Write C++ and use Boost.Python (ugh) >* Python C API directly (not really *that* bad) Well, I've looked at all of these, and I've gotta disagree with the Ugh on Boost.Python. At least for large projects. If (like me) you have large quantities of existing C++ to deal wi

Re: [Pythonmac-SIG] SetSystemUIMode in python?

2005-05-27 Thread Bob Ippolito
On May 27, 2005, at 7:22 PM, Kent Quirk wrote: > Bob wrote: > >> * SWIG (ughh) >> * Write C++ and use Boost.Python (ugh) >> * Python C API directly (not really *that* bad) >> > > Well, I've looked at all of these, and I've gotta disagree with the > Ugh > on Boost.Python. At least for large proj

Re: [Pythonmac-SIG] Apple's python extensions into Quartz2D

2005-05-27 Thread Robert Kern
nickg wrote: > thanks for the reply. > > Odd, the Python API is nearly 1-1 with the CoreGraphics C API so I > wouldn't expect any hacks. Oh well. I disliked the implementation (undocumented, closed source SWIG bindings are largely unusable), so I wrote my own using Pyrex. I call it, unimagin

[Pythonmac-SIG] Correct way to send info to running program

2005-05-27 Thread Dethe Elza
I want to be able to periodically send data to a running program, from the command-line. I was looking at the various NSPort classes, but just discovered that NSSocketPort is not a raw socket, but only intended to talk to other NSPort instances. Surely I'm not the only one who wants to be