[Pythonmac-SIG] Reading the resource fork with Python?

2005-01-31 Thread Bill Janssen
Given a filename on an HFS volume, what call do I use to see if it has a resource fork, and if there's anything in it? How do I read that data? I'm trying to read the URL out of a .webloc file, if that helps. Bill ___ Pythonmac-SIG maillist - Pythonm

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread Bob Ippolito
On Jan 31, 2005, at 19:07, has wrote: Bob wrote: p.s. I've submitted patches for Carbon.AE [1090958] and OSATerminology [1113328]; don't suppose you know if/when they'll make it into 2.4, and from there into your 2.3 retro-package? Unfortunately these patches need to be rewritten such that they

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread has
Bob wrote: I'd be happy to build a 10.2 version though if you can tell me how (given I'm not familiar with the CVS or making installers). After checking out the repository with subversion (or just doing a recursive web get, I guess), and having recent version of py2app installed (I suggest also

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread Bob Ippolito
On Jan 31, 2005, at 16:37, has wrote: Bob wrote: You should probably use my packages or source for bringing Python 2.4 features (OSA, LaunchServices) into Python 2.3. Will do. Must've missed the original announcement - didn't know of 'em till today. One thing: the binary installer only works for

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread has
Bob wrote: You should probably use my packages or source for bringing Python 2.4 features (OSA, LaunchServices) into Python 2.3. Will do. Must've missed the original announcement - didn't know of 'em till today. One thing: the binary installer only works for 10.3. I'd be happy to build a 10.2 ve

Re: [Pythonmac-SIG] What are "METH_CLASS" and "METH_STATIC"?

2005-01-31 Thread Opstad, Dave
Bob, I fixed setup.py to use the extra link args and switched to CoreServices, as you suggested. That fixed the build issues. I also discovered the main problem I was having: I had forgotten the {NULL, NULL, 0, NULL} entry at the end of my array of PyMethodDefs. I hate copy-and-paste errors... T

Re: [Pythonmac-SIG] What are "METH_CLASS" and "METH_STATIC"?

2005-01-31 Thread Bob Ippolito
On Jan 31, 2005, at 15:53, Opstad, Dave wrote: I've had good luck building C-language extensions for my Python work, at least up until now. I've got a C file which #includes Carbon.h as well as the canonical Python.h. Attempting to use distutils to build it fails with the error message: ld:

[Pythonmac-SIG] What are "METH_CLASS" and "METH_STATIC"?

2005-01-31 Thread Opstad, Dave
I've had good luck building C-language extensions for my Python work, at least up until now. I've got a C file which #includes Carbon.h as well as the canonical Python.h. Attempting to use distutils to build it fails with the error message: ld: build/temp.darwin-7.7.0-Power_Macintosh-2.3/MacUtils/

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread Bob Ippolito
On Jan 31, 2005, at 15:40, has wrote: Bob wrote: it looks like the official LaunchServices package requires one to import its sub-modules directly: [...] Not sure what the logic behind this is: [...] Maybe Jack or Bob can enlighten? It's how gensuitemodule does things... Not that one could ever

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread has
Bob wrote: it looks like the official LaunchServices package requires one to import its sub-modules directly: [...] Not sure what the logic behind this is: [...] Maybe Jack or Bob can enlighten? It's how gensuitemodule does things... Not that one could ever describe gensuitemodule as an arbiter

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread Bob Ippolito
On Jan 31, 2005, at 15:06, has wrote: Read Roberts wrote: Using the package pointed to by Bob Ippolito, I find I cannot use the import statement suggested by has hengist, although it may work with the package that he points to. My version exported everything from package's main namespace, allowing

[Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread has
Read Roberts wrote: Using the package pointed to by Bob Ippolito, I find I cannot use the import statement suggested by has hengist, although it may work with the package that he points to. My version exported everything from package's main namespace, allowing one to write: import LaunchServ

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread Read Roberts
Thank you both very much for your responses. This was very helpful - I now have working code. Using the package pointed to by Bob Ippolito, I find I cannot use the import statement suggested by hasĀ  hengist, although it may work with the package that he points to. My code now looks like: from

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread has
Read Roberts wrote: Now that mcfs.py is deprecated, what is an alternative for the now unsupported FindApplication? from LaunchServices import LSFindApplicationForInfo from Carbon.CoreFoundation import kCFURLPOSIXPathStyle creator = 'ttxt' path = LSFindApplicationForInfo(creator, None, None)[1] \

Re: [Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread Bob Ippolito
On Jan 31, 2005, at 1:50, Read Roberts wrote: Now that mcfs.py is deprecated, what is an alternative for the now unsupported FindApplication? The LaunchServices package. Python 2.4 ships with it (Carbon.LaunchServices I think?) or you can use this package for 2.3

[Pythonmac-SIG] How do you find the app that matches a creator type

2005-01-31 Thread Read Roberts
Now that mcfs.py is deprecated, what is an alternative for the now unsupported FindApplication? ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig