pyobjc-dev Mailing List for PyObjC (Page 70)
Brought to you by:
ronaldoussoren
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(9) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(30) |
May
(18) |
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2002 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
(13) |
Aug
|
Sep
(23) |
Oct
(180) |
Nov
(291) |
Dec
(95) |
| 2003 |
Jan
(338) |
Feb
(352) |
Mar
(97) |
Apr
(46) |
May
(226) |
Jun
(184) |
Jul
(145) |
Aug
(141) |
Sep
(69) |
Oct
(161) |
Nov
(96) |
Dec
(90) |
| 2004 |
Jan
(66) |
Feb
(87) |
Mar
(98) |
Apr
(132) |
May
(115) |
Jun
(68) |
Jul
(150) |
Aug
(92) |
Sep
(59) |
Oct
(52) |
Nov
(17) |
Dec
(75) |
| 2005 |
Jan
(84) |
Feb
(191) |
Mar
(133) |
Apr
(114) |
May
(158) |
Jun
(185) |
Jul
(62) |
Aug
(28) |
Sep
(36) |
Oct
(88) |
Nov
(65) |
Dec
(43) |
| 2006 |
Jan
(85) |
Feb
(62) |
Mar
(92) |
Apr
(75) |
May
(68) |
Jun
(101) |
Jul
(73) |
Aug
(37) |
Sep
(91) |
Oct
(65) |
Nov
(30) |
Dec
(39) |
| 2007 |
Jan
(24) |
Feb
(28) |
Mar
(10) |
Apr
(2) |
May
(18) |
Jun
(16) |
Jul
(21) |
Aug
(6) |
Sep
(30) |
Oct
(31) |
Nov
(153) |
Dec
(31) |
| 2008 |
Jan
(63) |
Feb
(70) |
Mar
(47) |
Apr
(24) |
May
(59) |
Jun
(22) |
Jul
(12) |
Aug
(7) |
Sep
(14) |
Oct
(26) |
Nov
(5) |
Dec
(5) |
| 2009 |
Jan
(10) |
Feb
(41) |
Mar
(70) |
Apr
(88) |
May
(49) |
Jun
(62) |
Jul
(34) |
Aug
(15) |
Sep
(55) |
Oct
(40) |
Nov
(67) |
Dec
(21) |
| 2010 |
Jan
(60) |
Feb
(17) |
Mar
(26) |
Apr
(26) |
May
(29) |
Jun
(4) |
Jul
(21) |
Aug
(21) |
Sep
(10) |
Oct
(12) |
Nov
(3) |
Dec
(19) |
| 2011 |
Jan
(3) |
Feb
(13) |
Mar
(8) |
Apr
(8) |
May
(17) |
Jun
(20) |
Jul
(21) |
Aug
(7) |
Sep
|
Oct
|
Nov
(9) |
Dec
(11) |
| 2012 |
Jan
(3) |
Feb
|
Mar
|
Apr
(5) |
May
(4) |
Jun
(14) |
Jul
(5) |
Aug
(2) |
Sep
(15) |
Oct
(2) |
Nov
(23) |
Dec
(1) |
| 2013 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
(5) |
Jun
(1) |
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(12) |
Nov
(10) |
Dec
(3) |
| 2014 |
Jan
(7) |
Feb
(14) |
Mar
(2) |
Apr
|
May
(2) |
Jun
(11) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(8) |
Nov
(1) |
Dec
(2) |
| 2015 |
Jan
(9) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(7) |
Jun
|
Jul
(5) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(4) |
Dec
|
| 2016 |
Jan
(1) |
Feb
(1) |
Mar
(4) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(6) |
Aug
(8) |
Sep
(21) |
Oct
(17) |
Nov
|
Dec
(36) |
| 2017 |
Jan
(6) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(6) |
| 2018 |
Jan
(2) |
Feb
(3) |
Mar
(3) |
Apr
(14) |
May
(2) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(6) |
Oct
(16) |
Nov
(1) |
Dec
(6) |
| 2019 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(1) |
| 2021 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
|
From: Richard B. <br...@ma...> - 2007-12-20 15:17:19
|
I was looking for an Xcode/Leopard/PyObjC tutorial that actually worked. I cam across the one on Apple's site, http://developer.apple.com/cocoa/pyobjc.html but it's old and will not work (PyAvenger). It compiles, but throws a runtime error I decided I didn't want to track down. At the point of the failure, I did not know if my system was set up properly. I've had so many different versions of Python installed over the years, who knows if the problem I saw was due to my system setup, or the tutorial.=20 Then I found another tutorial that seems to work quite well with no tweaks. Find=20 Cocoa for Scientists (Part XX): Python Scripters...Meet Cocoa at http://www.macresearch.org/node/4527 This tutorial is a bit more sophisticated than the Apple one, but still pretty easy to follow. What this proved to me is that my system is set up just fine, working with pyobjc2.0 and python2.5.1. I think Apple's tutorial could work with some tweaks to the code, and a fairly major rewrite to the tutorial itself. I'm going to go look for some other tutorials! --=A0 Richard Brosnahan Editor in Chief Broz News http://broznews.org Adventure is worthwhile. Amelia Earhart, pilot |
|
From: Jonathan S. <sa...@gm...> - 2007-12-20 15:16:54
|
The news file is also a great help http://svn.red-bean.com/pyobjc/branches/pyobjc2/pyobjc-core/NEWS.txt The new features are somewhat enumerated there. J On Dec 20, 2007, at 2:56 AM, Michael McCracken wrote: > Hi Jon, most of the basics are the same, so starting with the older > docs shouldn't set you back too much, assuming you're familiar with > Cocoa. I learned the differences by looking through the list > archives, and > that wasn't too hard. > > As for building it, it's already there. Perhaps the most useful thing > to do is launch XCode, start a few sample projects using the new > project templates, and look through the code and XIBs in there. > > The main changes that tripped me up are that to benefit from the IB > integration (I think) you need to use the XIB format, and you want to > declare your class ivars as IBOutlet, and methods as IBAction when > appropriate, like you do in ObjC: > > from objc import IBOutlet, IBAction > > class SomeWindowController(NSWindowController): > myProgressMeter = IBOutlet() > > @IBAction > def haveAHollyJollyChristmas_(self, sender): > # etc... > > Then IB will see these just like it does with ObjC IBAction/Outlets, > and you'll hook up your UI like you would for ObjC. > > Hope this helps a bit, > -mike > > > On Dec 19, 2007 2:28 PM, Jon Rosebaugh <ch...@gm...> wrote: > >> I'd like to use the latest and greatest version of PyObjC, especially >> since the version provided on the website doesn't seem to even >> compile >> on Leopard. I see from Ronald Oussoren's message on Dec 7th that the >> documentation for PyObjC2 is not on the site yet. Is there >> documentation anywhere on the net for PyObjC 2? Apple's site doesn't >> seem to have anything for this either. > > > -- > Michael McCracken > UCSD CSE PhD Candidate > research: http://www.cse.ucsd.edu/~mmccrack/ > misc: http://michael-mccracken.net/wp/ > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ |
|
From: Michael M. <mic...@gm...> - 2007-12-20 07:56:02
|
Hi Jon, most of the basics are the same, so starting with the older
docs shouldn't set you back too much, assuming you're familiar with
Cocoa. I learned the differences by looking through the list archives, and
that wasn't too hard.
As for building it, it's already there. Perhaps the most useful thing
to do is launch XCode, start a few sample projects using the new
project templates, and look through the code and XIBs in there.
The main changes that tripped me up are that to benefit from the IB
integration (I think) you need to use the XIB format, and you want to
declare your class ivars as IBOutlet, and methods as IBAction when
appropriate, like you do in ObjC:
from objc import IBOutlet, IBAction
class SomeWindowController(NSWindowController):
myProgressMeter = IBOutlet()
@IBAction
def haveAHollyJollyChristmas_(self, sender):
# etc...
Then IB will see these just like it does with ObjC IBAction/Outlets,
and you'll hook up your UI like you would for ObjC.
Hope this helps a bit,
-mike
On Dec 19, 2007 2:28 PM, Jon Rosebaugh <ch...@gm...> wrote:
> I'd like to use the latest and greatest version of PyObjC, especially
> since the version provided on the website doesn't seem to even compile
> on Leopard. I see from Ronald Oussoren's message on Dec 7th that the
> documentation for PyObjC2 is not on the site yet. Is there
> documentation anywhere on the net for PyObjC 2? Apple's site doesn't
> seem to have anything for this either.
--
Michael McCracken
UCSD CSE PhD Candidate
research: http://www.cse.ucsd.edu/~mmccrack/
misc: http://michael-mccracken.net/wp/
|
|
From: Jon R. <ch...@gm...> - 2007-12-19 22:28:45
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'd like to use the latest and greatest version of PyObjC, especially since the version provided on the website doesn't seem to even compile on Leopard. I see from Ronald Oussoren's message on Dec 7th that the documentation for PyObjC2 is not on the site yet. Is there documentation anywhere on the net for PyObjC 2? Apple's site doesn't seem to have anything for this either. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: http://firegpg.tuxfamily.org iD8DBQFHaZsCvzqluCF30FgRAl4xAKCMuZCgpPctFSuYe+VU+YT09bCCQQCeM0FL IUDx+EKv1DpYV+iZ9atbdp0= =r3vl -----END PGP SIGNATURE----- |
|
From: Ronald O. <ron...@ma...> - 2007-12-18 11:19:21
|
On Tuesday, December 18, 2007, at 08:47AM, "Michael McCracken" <mic...@gm...> wrote: >I'll confirm that that does seem to quiet it. > >To the admins, then - how can I help with documentation updates? The website definitely needs updating, which mostly requires some time on my part. The documentation in the source tree is already up-to-date, I just have to update the website-building script to deal with the current source structure and regenerate the website. The website needs a lot of love beyond that though, I'd like to add all sample code to the website as well (as downloadable archives instead of links to the repository). Possibly something like the example code on the ADC website. Ronald |
|
From: Michael M. <mic...@gm...> - 2007-12-18 07:47:18
|
I'll confirm that that does seem to quiet it. To the admins, then - how can I help with documentation updates? -mike On Dec 17, 2007 9:51 PM, Jonathan Saggau <sa...@gm...> wrote: > Try this: use None in place of the pass-by-reference arguments; IIRC > it's killed this error for me recently. I'm guessing that the bridge > likes to have all arguments in order now, using None as a placeholder > for pass-by-reference arguments. > > lowerEdgeRect, ignoreme = NSDivideRect(self.currentCellFrame(), > None, None, lowerRectEdge) > > Experts? :) > > Jonathan > > > On Dec 17, 2007, at 9:46 PM, Michael McCracken wrote: > > > lowerEdgeRect, ignoreme = NSDivideRect(self.currentCellFrame(), 1.0, > > lowerRectEdge) > > -- Michael McCracken UCSD CSE PhD Candidate research: http://www.cse.ucsd.edu/~mmccrack/ misc: http://michael-mccracken.net/wp/ |
|
From: Jonathan S. <sa...@gm...> - 2007-12-18 05:51:53
|
Try this: use None in place of the pass-by-reference arguments; IIRC it's killed this error for me recently. I'm guessing that the bridge likes to have all arguments in order now, using None as a placeholder for pass-by-reference arguments. lowerEdgeRect, ignoreme = NSDivideRect(self.currentCellFrame(), None, None, lowerRectEdge) Experts? :) Jonathan On Dec 17, 2007, at 9:46 PM, Michael McCracken wrote: > lowerEdgeRect, ignoreme = NSDivideRect(self.currentCellFrame(), 1.0, > lowerRectEdge) |
|
From: Michael M. <mic...@gm...> - 2007-12-18 02:46:17
|
Hi, I wanted to call NSDivideRect, which returns two NSRects by reference: FOUNDATION_EXPORT void NSDivideRect(NSRect inRect, NSRect *slice, NSRect *rem, CGFloat amount, NSRectEdge edge); I followed the online docs for how to treat out params in calls, and came up with this: lowerEdgeRect, ignoreme = NSDivideRect(self.currentCellFrame(), 1.0, lowerRectEdge) This worked with no complaints on 10.4, but on 10.5 with system python, I get this: /Users/mmccrack/Products/Debug/Incoming.app/Contents/Resources/ActionSearchResultsWindowController.py:143: DeprecationWarning: Not all arguments to an Objective-C function are present lowerEdgeRect, ignored = NSDivideRect(self.currentCellFrame(), 1.0, lowerRectEdge) It still works, but the warning bothers me. What's going on there? Thanks, -mike -- Michael McCracken UCSD CSE PhD Candidate research: http://www.cse.ucsd.edu/~mmccrack/ misc: http://michael-mccracken.net/wp/ |
|
From: Michael M. <mic...@gm...> - 2007-12-18 02:37:32
|
For the list archives, I'm going to sum up what Ronald and I discussed off-list after this email: 1. The pyobjc-wrapper-gen script is the right way to go to wrap the whole framework, but it currently doesn't quite work on Security.framework. 2. The pyobjc-wrapper-gen script requires an x86_64 machine to run on, so that it can get the correct values of header constants for all platforms, which involves running the probes natively and under Rosetta. 3. The script could get around this with a custom C/ObjC parser - potentially written using clang ( http://clang.llvm.org/ ) but there's little time to do that. It'd probably be a great project for a student looking to test their chops and add a resume item, though. Working on Security.framework may now be on Ronald's long to-do list, but since I've only got G4 systems, I'm not going to be able to help. So I'll stick with my single function wrapper, at least until I get my hands on a mac pro. (I'd accept donations :) Thanks, -mike On Dec 12, 2007 10:13 PM, Ronald Oussoren <ron...@ma...> wrote: > > On 12 Dec, 2007, at 21:12, Michael McCracken wrote: > > > Hi, I wrote a C extension module to use > > SecKeychainFindInternetPassword, and I wanted to ask here if anyone > > else wanted it, and if there was a better way to do the wrapping. > > If there's a preferred technique that'll make it more general, I don't > > mind putting that wrapper together for public use - especially if it's > > automated :) > > Thanks for the offer :-) > > > > > > > > I didn't use the ObjC Keychain.framework because I really only needed > > the one function, and this seemed like less work... > > > > What I did was using the XCode 3 template, I simply added a C file to > > munge the strings back and forth, and initialized it in main.m > > > > To wit: > > > > SecKeychainWrapperModule.c: > > // include Python.h, Security/Security.h, and Core{Foundation, > > Services}.h > > > > static PyObject * > > SecKeychainWrapperModule_findPasword(PyObject *self > > __attribute__((unused)), > > PyObject *args) > > { ...do some stuff to unwrap username, pass, and protocol, call > > SecKeychainFindInternetPassword, then rewrap and return password > > data... > > } > > > > static PyMethodDef SecKeychainWrapperModuleMethods[] = { > > {"findPassword", SecKeychainWrapperModule_findPasword, > > METH_VARARGS, > > "Find a password in the Keychain for a server/username/protocol > > tuple." }, > > {NULL, NULL, 0, NULL } /* Sentinel */ > > }; > > > > PyMODINIT_FUNC > > initSecKeychainWrapperModule(void) > > { > > PyObject* mod = Py_InitModule3("SecKeychainWrapperModule", > > SecKeychainWrapperModuleMethods, > > "Wrapper for part of the > > SecKeychain C API" ); > > if(mod == NULL) return; > > } > > > > Then in main.m I added this: > > /* Init wrapper for SecKeychain functions */ > > initSecKeychainWrapperModule(); > > > > Just after Py_Initialize(). > > > > And that's it. This works pretty well for me, but if there's a better > > way to wrap the whole of SecKeychain*, I'd be glad to do it for the > > public good. > > > > (Also, if there needs to be some docs on how to do that in the new > > pyobjc2 world, I don't mind helping with them) > > This should be a lot easier in pyobjc2: it should be possible to wrap > most if not all of the security framework without writing a single > line of C code. You "just" have to generate an XML file that describes > the API and include that in a > small wrapper package. > > The official way for generating said metadata is through > gen_bridge_metadata(1), a commandline tool on Leopard. An alternative > way is to use 'pyobjc-wrapper-gen', which will appear when you install > the pyobjc-metadata package from pyobjc's Subversion repository. > > When you use the latter tool it will create the required python > packages, setup.py and metadata files for you. You will have to > examine and update the file Exceptions/Security.bridgesupport. This > contains a description of all metadata that might require manual > attention, see the BridgeSuppport(5) manualpage for information on the > format of that file. Then add unittests, examples and documentation to > taste. > > I'm currently pyobjc-wrapper-gen to see how much output that generates > and how much work it would be to create a good wrapper. > > Ronald > > P.S. pyobjc-wrapper-gen takes rather a long amount of time due to > compiling and running loads and loads of small C programs. > -- Michael McCracken UCSD CSE PhD Candidate research: http://www.cse.ucsd.edu/~mmccrack/ misc: http://michael-mccracken.net/wp/ |
|
From: Tom T. <pan...@gm...> - 2007-12-14 00:31:21
|
I've been trying to make a program using a function to draw to a context that it is passed to render a custom view. I'd also like to be able to use the same function that draws into the window to draw into a PDF. At the moment the drawing is done by importing Quartz, and drawing into the view's context using commands like CGContextSetGrayFillColor(self.context,1.0,1.0) CGContextFillRect(self.context,self.rect) This works fine when I call it in my subclass of NSView, but when I try to draw into a PDF it doesnt work properly. Looking at this page: http://developer.apple.com/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/chapter_14_section_4.html#//apple_ref/doc/uid/TP30001066-CH214-CJBHHJCB I would have assumed that all you have to do is create a context for your PDF, and then I could draw into it as usual using my generic drawing function that renders the custom view. However looking at the example file in /Developer/Examples/Quartz/Python/circle.py, they use CoreGraphics, and seem to be using a different calling style to call the drawing functions. from CoreGraphics import * import math # for pi pageRect = CGRectMake (0, 0, 612, 792) # landscape c = CGPDFContextCreateWithFilename ("circle.pdf", pageRect) c.beginPage (pageRect) c.setRGBFillColor(1.0,0.0,0.0,1.0) c.addArc(300,300,100,0,2*math.pi,1) c.fillPath() c.endPage() c.finish() I have tried using this, and inserting my code using 'c' as the context, but it does not work properly and gives the error: 2007-12-14 00:30:21.515 Python[992:613] <type 'exceptions.TypeError'>: depythonifying struct, got no sequence I don't understand what the difference between using CoreGraphics and Quartz is, and why the calling conventions are different. Do I need to use Quartz to create the PDF instead of CoreGraphics? Or do i need to rewrite my custom view using importing coregraphics instead of quartz? Why is the calling convention different? (the Quartz code I used for the custom view I took from the dotView example is similar to the function calls in the objective-C pdf creation example, whereas on the apple Quartz 2D python bindings page it is like the example above) Any help would be much appreciated! |
|
From: Ronald O. <ron...@ma...> - 2007-12-13 06:20:33
|
On 12 Dec, 2007, at 21:12, Michael McCracken wrote:
> Hi, I wrote a C extension module to use
> SecKeychainFindInternetPassword, and I wanted to ask here if anyone
> else wanted it, and if there was a better way to do the wrapping.
> If there's a preferred technique that'll make it more general, I don't
> mind putting that wrapper together for public use - especially if it's
> automated :)
Thanks for the offer :-)
>
>
> I didn't use the ObjC Keychain.framework because I really only needed
> the one function, and this seemed like less work...
>
> What I did was using the XCode 3 template, I simply added a C file to
> munge the strings back and forth, and initialized it in main.m
>
> To wit:
>
> SecKeychainWrapperModule.c:
> // include Python.h, Security/Security.h, and Core{Foundation,
> Services}.h
>
> static PyObject *
> SecKeychainWrapperModule_findPasword(PyObject *self
> __attribute__((unused)),
> PyObject *args)
> { ...do some stuff to unwrap username, pass, and protocol, call
> SecKeychainFindInternetPassword, then rewrap and return password
> data...
> }
>
> static PyMethodDef SecKeychainWrapperModuleMethods[] = {
> {"findPassword", SecKeychainWrapperModule_findPasword,
> METH_VARARGS,
> "Find a password in the Keychain for a server/username/protocol
> tuple." },
> {NULL, NULL, 0, NULL } /* Sentinel */
> };
>
> PyMODINIT_FUNC
> initSecKeychainWrapperModule(void)
> {
> PyObject* mod = Py_InitModule3("SecKeychainWrapperModule",
> SecKeychainWrapperModuleMethods,
> "Wrapper for part of the
> SecKeychain C API" );
> if(mod == NULL) return;
> }
>
> Then in main.m I added this:
> /* Init wrapper for SecKeychain functions */
> initSecKeychainWrapperModule();
>
> Just after Py_Initialize().
>
> And that's it. This works pretty well for me, but if there's a better
> way to wrap the whole of SecKeychain*, I'd be glad to do it for the
> public good.
>
> (Also, if there needs to be some docs on how to do that in the new
> pyobjc2 world, I don't mind helping with them)
This should be a lot easier in pyobjc2: it should be possible to wrap
most if not all of the security framework without writing a single
line of C code. You "just" have to generate an XML file that describes
the API and include that in a
small wrapper package.
The official way for generating said metadata is through
gen_bridge_metadata(1), a commandline tool on Leopard. An alternative
way is to use 'pyobjc-wrapper-gen', which will appear when you install
the pyobjc-metadata package from pyobjc's Subversion repository.
When you use the latter tool it will create the required python
packages, setup.py and metadata files for you. You will have to
examine and update the file Exceptions/Security.bridgesupport. This
contains a description of all metadata that might require manual
attention, see the BridgeSuppport(5) manualpage for information on the
format of that file. Then add unittests, examples and documentation to
taste.
I'm currently pyobjc-wrapper-gen to see how much output that generates
and how much work it would be to create a good wrapper.
Ronald
P.S. pyobjc-wrapper-gen takes rather a long amount of time due to
compiling and running loads and loads of small C programs.
|
|
From: James R E. <ea...@ba...> - 2007-12-12 23:07:57
|
On Dec 12, 2007, at 15:12 , Michael McCracken wrote: > Hi, I wrote a C extension module to use > SecKeychainFindInternetPassword, and I wanted to ask here if anyone > else wanted it, and if there was a better way to do the wrapping. > If there's a preferred technique that'll make it more general, I don't > mind putting that wrapper together for public use - especially if it's > automated :) Hi Mike :-) I found myself in a similar situation, but unlike you, I never contributed back to the community. Kudos to you! In my case, I found it much easier to write an ObjC wrapper around the C functions I needed and then use PyObjC to slurp them into Python. The code's really short, so I'll attach it to this email (just to demonstrate an alternative approach, if you care to pursue your project further). Cheers! James |
|
From: Michael M. <mic...@gm...> - 2007-12-12 20:12:24
|
Hi, I wrote a C extension module to use
SecKeychainFindInternetPassword, and I wanted to ask here if anyone
else wanted it, and if there was a better way to do the wrapping.
If there's a preferred technique that'll make it more general, I don't
mind putting that wrapper together for public use - especially if it's
automated :)
I didn't use the ObjC Keychain.framework because I really only needed
the one function, and this seemed like less work...
What I did was using the XCode 3 template, I simply added a C file to
munge the strings back and forth, and initialized it in main.m
To wit:
SecKeychainWrapperModule.c:
// include Python.h, Security/Security.h, and Core{Foundation, Services}.h
static PyObject *
SecKeychainWrapperModule_findPasword(PyObject *self __attribute__((unused)),
PyObject *args)
{ ...do some stuff to unwrap username, pass, and protocol, call
SecKeychainFindInternetPassword, then rewrap and return password
data...
}
static PyMethodDef SecKeychainWrapperModuleMethods[] = {
{"findPassword", SecKeychainWrapperModule_findPasword, METH_VARARGS,
"Find a password in the Keychain for a server/username/protocol tuple." },
{NULL, NULL, 0, NULL } /* Sentinel */
};
PyMODINIT_FUNC
initSecKeychainWrapperModule(void)
{
PyObject* mod = Py_InitModule3("SecKeychainWrapperModule",
SecKeychainWrapperModuleMethods,
"Wrapper for part of the
SecKeychain C API" );
if(mod == NULL) return;
}
Then in main.m I added this:
/* Init wrapper for SecKeychain functions */
initSecKeychainWrapperModule();
Just after Py_Initialize().
And that's it. This works pretty well for me, but if there's a better
way to wrap the whole of SecKeychain*, I'd be glad to do it for the
public good.
(Also, if there needs to be some docs on how to do that in the new
pyobjc2 world, I don't mind helping with them)
Thanks,
-mike
--
Michael McCracken
UCSD CSE PhD Candidate
research: http://www.cse.ucsd.edu/~mmccrack/
misc: http://michael-mccracken.net/wp/
|
|
From: Ronald O. <ron...@ma...> - 2007-12-07 11:15:12
|
On 6 Dec, 2007, at 17:15, Richard Cooper wrote: > Hi there. > > I'm interested in learning my way around PyObjC on Leopard but all of > the tutorials I can find seem to be for older versions of PyObjC, > Xcode and Interface Builder. Does anyone know of any good tutorials > covering the versions of tools installed on Leopard? Interface Builder > in particular has completely changed. The fact that http://pyobjc.sourceforge.net/ > doesn't even acknowledge the existence of PyObjC 2 makes me think I > must be missing a website somewhere. You haven't missed anything, the documentation for PyObjC2 is not online yet due to lack of time on part. > > > One of the things I'm trying to understand is the best way to layout > and build a PyObjC application. Most of the tutorials I've found on > the web and in /Developer/Examples/Python/PyObjC/ use things like > "python setup.py py2app" and "NibClassBuilder.AutoBaseClass" but if > you use one of the Cocoa-Python templates in XCode you get a very > different looking project. If I had to guess it seems that the > examples show the old way of doing things and the Xcode template is > the new way now that Apple have embraced PyObjC but really I've no > idea. Is one of these approaches recommended over the other? If not > then what are the pros and cons of each approach? I still use py2app. The Xcode templates are supported by Apple and are the best way to integrate with Xcode at the moment. py2app allows you to build applications without having Xcode installed. The AutoBaseClass stuff is deprecated in PyObjC 2, I haven't eradicated it from all examples yet. The main reasons for deprecation are that (1) it it no longer needed given Xcode/IB's support for PyObjC code and (2) the ".xib" files in Xcode3 use a completely new file format that the AutoBaseClass code doesn't grok. If you're new to PyObjC but are confortable with Xcode I'd use the Xcode templates. Ronald |
|
From: Richard C. <li...@ri...> - 2007-12-06 16:16:07
|
Hi there. I'm interested in learning my way around PyObjC on Leopard but all of the tutorials I can find seem to be for older versions of PyObjC, Xcode and Interface Builder. Does anyone know of any good tutorials covering the versions of tools installed on Leopard? Interface Builder in particular has completely changed. The fact that http://pyobjc.sourceforge.net/ doesn't even acknowledge the existence of PyObjC 2 makes me think I must be missing a website somewhere. One of the things I'm trying to understand is the best way to layout and build a PyObjC application. Most of the tutorials I've found on the web and in /Developer/Examples/Python/PyObjC/ use things like "python setup.py py2app" and "NibClassBuilder.AutoBaseClass" but if you use one of the Cocoa-Python templates in XCode you get a very different looking project. If I had to guess it seems that the examples show the old way of doing things and the Xcode template is the new way now that Apple have embraced PyObjC but really I've no idea. Is one of these approaches recommended over the other? If not then what are the pros and cons of each approach? Thanks in advance. - Richard |
|
From: Luc H. <lu...@ho...> - 2007-12-05 15:22:43
|
On 5 d=E9c. 07, at 16:13, Tommy Grav wrote: > The problem seems to be that the WebKit Framework is not found by the > install script. It is present and located in /System/Library/=20 > Frameworks/ > WebKit.framework/ How can I get the code to find this framework? The WebKit framework is correctly found by the install script, the =20 problem is that PyObjC 1.4 is not compatible with the WebKit =20 framework of Safari 3, which was a "forced" update in OS X 10.4.11. Your only solution as far as I know is to go back to OS X 10.4.10. Or =20= wait until PyObjC 2 is made compatible with OS X 10.4.x. --=20 Luc Heinrich |
|
From: Tommy G. <tg...@ma...> - 2007-12-05 15:13:55
|
I am trying to install PyObjC 1.4 on my Mac OS X 10.4.11 as I am very
interested in this project.
I run:
[tgrav@skathi] Temporary/pyobjc-1.4 --> python setup.py bdist_mpkg --
open
** using pyobjc source-deps py2app for building
running bdist_mpkg
installing to build/bdist.macosx-10.3-fat/mpkg
running build
running build_py
running build_ext
Performing task: Generating wrappers & stubs
/Library/Frameworks/Python.framework/Versions/2.5/Resources/
Python.app/Contents/MacOS/Python Scripts/CodeGenerators/
cocoa_generator.py
building 'WebKit._WebKit' extension
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -
fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -
fPIC -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -
c Modules/WebKit/_WebKit.m -o build/temp.macosx-10.3-fat-2.5/Modules/
WebKit/_WebKit.o -IModules/objc -DMACOSX -DAPPLE_RUNTIME -no-cpp-
precomp -Wno-long-double -g -Wall -Wstrict-prototypes -Wmissing-
prototypes -Wformat=2 -W -Wshadow -Wpointer-arith -Wmissing-
declarations -Wnested-externs -Wno-long-long -Wno-import -Ibuild/
codegen/
In file included from Modules/WebKit/_WebKit.m:23:
build/codegen/_WebKit_Enum.inc:3:35: error: WebKit/DOMAbstractView.h:
No such file or directory
Followed by numerous errors.
The problem seems to be that the WebKit Framework is not found by the
install script. It is present and located in /System/Library/Frameworks/
WebKit.framework/ How can I get the code to find this framework?
Cheers
TG
>
|
|
From: SourceForge.net <no...@so...> - 2007-12-05 00:05:12
|
Bugs item #1844495, was opened at 2007-12-04 16:05 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1844495&group_id=14534 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Andy Kim (andypotion) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot clean up PyObjC to get back memory with Py_Finalize Initial Comment: Summary: When embedding Python into a Cocoa application, you can't call Py_Finalize() to reclaim memory because if you call Py_Initialize() again to start another interpreter, it can't import the objc module the second time. Steps to Reproduce: 1. Build and launch the included test application. 2. Click the "Run With Foundation" button once. It will execute a very simple python file and clean up. 3. Click the "Run With Foundation" button again. You will see problems in the console this time. When you click the "Run Without Foundation" button multiple times, there are no problems. Test System: MacBook Pro Intel Core 2 Duo running Mac OS X 10.5.1 Notes: It seems that once you load the PyObjC bridge, you cannot unload it. Is this intended behavior? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1844495&group_id=14534 |
|
From: SourceForge.net <no...@so...> - 2007-12-03 03:06:37
|
Bugs item #1843072, was opened at 2007-12-02 20:06 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1843072&group_id=14534 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: jeff lyon (jefflyon) Assigned to: Nobody/Anonymous (nobody) Summary: PyobjC binary installer will not install on OS X 10 Initial Comment: PyobjC binary installer will not install on OS X 10.5. The installer returns: You cannot install pyobjc 1.4 on this volume. pyobjc requires System Python 2.4 to install. Python 2.5 is shipped with 10.5. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=1843072&group_id=14534 |
|
From: Bill B. <bb...@ma...> - 2007-11-30 07:45:48
|
On Nov 29, 2007, at 5:14 PM, Barry Wark wrote: > It can correctly build pyobjc2 (tests pass) on Leopard. For those of > you in a similar position (wanting pyobjc2 but needing newer numpy > etc.) give it a try. If this is a useful community resource, I'll work > to put it in a more permanent location and/or do more regular builds > (let me know if you find it useful). I haven't tested it except on our > machines at work, which all have a similar configuration, so YMMV. Thank you for building this! For standalone packages -- including PyObjC -- you should be able to build said packages and install 'em via the standard mechanisms (I apologize -- looking back, I think I overstated the case originally). In particular, /Library/Python/2.5/site-packages/ is not populated and is intended for installing custom packages, including installing things more up to date than what is on the system. Just don't overwrite system installed Python goop as various random applications may depend upon it. If you build a custom Python, you'll need to install anything you need against that custom Python. As well, if you ship an application and depend on Leopard stock installed Python Parts, I would highly recommend that you trim library path to not include /Library/Python as early as possible in your launch. It'll prevent support heartache down the road. b.bum |
|
From: Barry W. <bar...@gm...> - 2007-11-30 01:14:35
|
Right, so if I want to, for example, install the latest numpy, I have to use MacPython. That's how I understood things, but several statements to the effect of "the python that ships with 10.5 is all you need" seemed to contradict that. On a related note, I've placed the 10.5.sdk build of MacPython that I made at http://rieke-server.physiol.washington.edu/~barry/python/python-2.5.1-macosx2007-11-26.dmg It can correctly build pyobjc2 (tests pass) on Leopard. For those of you in a similar position (wanting pyobjc2 but needing newer numpy etc.) give it a try. If this is a useful community resource, I'll work to put it in a more permanent location and/or do more regular builds (let me know if you find it useful). I haven't tested it except on our machines at work, which all have a similar configuration, so YMMV. barry On 11/29/07, Bill Bumgarner <bb...@ma...> wrote: > On Nov 29, 2007, at 8:35 AM, Barry Wark wrote: > > So is it the official stand now that users should install new/updated > > packages in the system python? My understanding (well, from Tiger > > days) was that the system's python should not be modified since system > > services depend on it. This seems to be the unstated rule with > > Leopard, since the system python puts its own setuptools, numpy etc. > > packages in sys.path before /Library/Python/2.5/site-packages. So, if > > we don't install a framework build of Python, it looks like we either > > have to interfere with system dependencies (such as numpy, setuptools, > > pyobjc2?, etc.) or be stuck with the version that shipped in Leopard > > (numpy 1.0.4 is now available, for example). > > > > Unfortunately, pyobjc2 won't work with the pyhton.org framework build > > because the framework build was built using the 10.4u.sdk (see a > > previous post by me on this subject). However, it's not hard to build > > a framework build from the python.org source (there's a script that > > does just that in the source tree). Once python is built with the > > 10.5.sdk, pyobjc2 compiles and works just fine (we've been using it in > > production for a few days already). I'm not sure how to compile in > > dtrace support, but if you can live without that, everything else > > appears to work. Does anyone know how to add dtrace support to Python > > or does it require Apple's patches to the interpreter? > > > > Perhaps someone from Apple would be willing to comment... > > If you want to install a custom built version of Python.framework, > then you will also need to build and install PyObjC. > > In general, do not overwrite system files. Not ever. Keep your > custom stuff separated from system stuff. > > b.bum > > |
|
From: Bill B. <bb...@ma...> - 2007-11-29 17:26:42
|
On Nov 29, 2007, at 8:35 AM, Barry Wark wrote: > So is it the official stand now that users should install new/updated > packages in the system python? My understanding (well, from Tiger > days) was that the system's python should not be modified since system > services depend on it. This seems to be the unstated rule with > Leopard, since the system python puts its own setuptools, numpy etc. > packages in sys.path before /Library/Python/2.5/site-packages. So, if > we don't install a framework build of Python, it looks like we either > have to interfere with system dependencies (such as numpy, setuptools, > pyobjc2?, etc.) or be stuck with the version that shipped in Leopard > (numpy 1.0.4 is now available, for example). > > Unfortunately, pyobjc2 won't work with the pyhton.org framework build > because the framework build was built using the 10.4u.sdk (see a > previous post by me on this subject). However, it's not hard to build > a framework build from the python.org source (there's a script that > does just that in the source tree). Once python is built with the > 10.5.sdk, pyobjc2 compiles and works just fine (we've been using it in > production for a few days already). I'm not sure how to compile in > dtrace support, but if you can live without that, everything else > appears to work. Does anyone know how to add dtrace support to Python > or does it require Apple's patches to the interpreter? > > Perhaps someone from Apple would be willing to comment... If you want to install a custom built version of Python.framework, then you will also need to build and install PyObjC. In general, do not overwrite system files. Not ever. Keep your custom stuff separated from system stuff. b.bum |
|
From: Barry W. <bar...@gm...> - 2007-11-29 16:35:24
|
So is it the official stand now that users should install new/updated packages in the system python? My understanding (well, from Tiger days) was that the system's python should not be modified since system services depend on it. This seems to be the unstated rule with Leopard, since the system python puts its own setuptools, numpy etc. packages in sys.path before /Library/Python/2.5/site-packages. So, if we don't install a framework build of Python, it looks like we either have to interfere with system dependencies (such as numpy, setuptools, pyobjc2?, etc.) or be stuck with the version that shipped in Leopard (numpy 1.0.4 is now available, for example). Unfortunately, pyobjc2 won't work with the pyhton.org framework build because the framework build was built using the 10.4u.sdk (see a previous post by me on this subject). However, it's not hard to build a framework build from the python.org source (there's a script that does just that in the source tree). Once python is built with the 10.5.sdk, pyobjc2 compiles and works just fine (we've been using it in production for a few days already). I'm not sure how to compile in dtrace support, but if you can live without that, everything else appears to work. Does anyone know how to add dtrace support to Python or does it require Apple's patches to the interpreter? Perhaps someone from Apple would be willing to comment... Thanks, Barry On 11/29/07, Ronald Oussoren <ron...@ma...> wrote: > > On 29 Nov, 2007, at 15:13, George Armah wrote: > > > Hello, > > > > This is my first attempt at using pyobjc and I run into some problems. > > The problem you're having is that you have a python framework in / > Library/Frameworks. The easiest way to fix your problems is to remove > that framework (or move it aside if you want to check which site- > packages need to be reinstalled). > > The system install of python is 2.5.1 + dtrace support and there is > therefore no need to install a python framework in /Library/ > Frameworks. Well, at least not unless you want to build > redistributable applications for OSX 10.4 using py2app. > > Ronald > > > > > > > I created a new project using XCode 3.0 with the Cocoa-Python > > Application template. > > I then proceeded to do a build on the application (n.b. I haven't > > added any of my own code yet) and the build succeeded. > > When I do a build and run however, I get the following error message > > in console: > > > > //-------------------------------------------------------------------------------------------------------------------------------- > > The Debugger Debugger is attaching to process > > [Session started at 2007-11-29 08:32:29 -0500.] > > Traceback (most recent call last): > > File "/Users/Armahg/Builds/Release/again.app/Contents/Resources/ > > main.py", line 10, in <module> > > import objc > > ImportError: No module named objc > > 2007-11-29 08:32:29.349 again[2542:10b] *** Terminating app due to > > uncaught exception 'NSInternalInconsistencyException', reason: '/ > > Users/Armahg/again/main.m:46 main() PyRun_SimpleFile failed with > > file '/Users/Armahg/Builds/Release/again.app/Contents/Resources/ > > main.py'. See console for errors.' > > 2007-11-29 08:32:29.352 again[2542:10b] Stack: ( > > 2488480363, > > 2511437979, > > 2488479819, > > 2488479882 > > ) > > //-------------------------------------------------------------------------------------------------------------------------------- > > >From what I have read, i thought pyobjC2 should work right out of > > the box with Leopard. Is there anything configuration I have to do > > to get the app working? > > > > > > I also tried to run some of the PyObjc examples and received the > > following error message > > > > //-------------------------------------------------------------------------------------------------------------------------------- > > Armahg:CurrencyConverter Armahg$ python setup.py py2app > > Traceback (most recent call last): > > File "setup.py", line 8, in <module> > > import py2app > > ImportError: No module named py2app > > //-------------------------------------------------------------------------------------------------------------------------------- > > > > TroubleShooting done so far: > > > > My current path for Python is: > > Armahg$ which python > > /Library/Frameworks/Python.framework/Versions/Current/bin/python > > > > I modified the main.m file in my test PyObjc app to read > > /*Py_SetProgramName("/usr/bin/python");*/ > > Py_SetProgramName("/Library/Frameworks/Python.framework/Versions/ > > Current/bin/python"); > > > > and this has not helped either. > > > > > > Any help given would be much appreciated. Also, in return, I'll > > document what I do and post it somewhere online so that > > other newcomers won't have to email this dev list with the same > > problem again :) > > > > Thanks in advance , > > > > George. > > > > > > > > > > > > ------------------------------------------------------------------------- > > SF.Net email is sponsored by: The Future of Linux Business White Paper > > from Novell. From the desktop to the data center, Linux is going > > mainstream. Let it simplify your IT future. > > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4_______________________________________________ > > Pyobjc-dev mailing list > > Pyo...@li... > > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > > |
|
From: Ronald O. <ron...@ma...> - 2007-11-29 14:53:07
|
On 29 Nov, 2007, at 15:13, George Armah wrote:
> Hello,
>
> This is my first attempt at using pyobjc and I run into some problems.
The problem you're having is that you have a python framework in /
Library/Frameworks. The easiest way to fix your problems is to remove
that framework (or move it aside if you want to check which site-
packages need to be reinstalled).
The system install of python is 2.5.1 + dtrace support and there is
therefore no need to install a python framework in /Library/
Frameworks. Well, at least not unless you want to build
redistributable applications for OSX 10.4 using py2app.
Ronald
>
>
> I created a new project using XCode 3.0 with the Cocoa-Python
> Application template.
> I then proceeded to do a build on the application (n.b. I haven't
> added any of my own code yet) and the build succeeded.
> When I do a build and run however, I get the following error message
> in console:
>
> //--------------------------------------------------------------------------------------------------------------------------------
> The Debugger Debugger is attaching to process
> [Session started at 2007-11-29 08:32:29 -0500.]
> Traceback (most recent call last):
> File "/Users/Armahg/Builds/Release/again.app/Contents/Resources/
> main.py", line 10, in <module>
> import objc
> ImportError: No module named objc
> 2007-11-29 08:32:29.349 again[2542:10b] *** Terminating app due to
> uncaught exception 'NSInternalInconsistencyException', reason: '/
> Users/Armahg/again/main.m:46 main() PyRun_SimpleFile failed with
> file '/Users/Armahg/Builds/Release/again.app/Contents/Resources/
> main.py'. See console for errors.'
> 2007-11-29 08:32:29.352 again[2542:10b] Stack: (
> 2488480363,
> 2511437979,
> 2488479819,
> 2488479882
> )
> //--------------------------------------------------------------------------------------------------------------------------------
> >From what I have read, i thought pyobjC2 should work right out of
> the box with Leopard. Is there anything configuration I have to do
> to get the app working?
>
>
> I also tried to run some of the PyObjc examples and received the
> following error message
>
> //--------------------------------------------------------------------------------------------------------------------------------
> Armahg:CurrencyConverter Armahg$ python setup.py py2app
> Traceback (most recent call last):
> File "setup.py", line 8, in <module>
> import py2app
> ImportError: No module named py2app
> //--------------------------------------------------------------------------------------------------------------------------------
>
> TroubleShooting done so far:
>
> My current path for Python is:
> Armahg$ which python
> /Library/Frameworks/Python.framework/Versions/Current/bin/python
>
> I modified the main.m file in my test PyObjc app to read
> /*Py_SetProgramName("/usr/bin/python");*/
> Py_SetProgramName("/Library/Frameworks/Python.framework/Versions/
> Current/bin/python");
>
> and this has not helped either.
>
>
> Any help given would be much appreciated. Also, in return, I'll
> document what I do and post it somewhere online so that
> other newcomers won't have to email this dev list with the same
> problem again :)
>
> Thanks in advance ,
>
> George.
>
>
>
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell. From the desktop to the data center, Linux is going
> mainstream. Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4_______________________________________________
> Pyobjc-dev mailing list
> Pyo...@li...
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
|
|
From: George A. <ar...@gm...> - 2007-11-29 14:13:08
|
Hello,
This is my first attempt at using pyobjc and I run into some problems.
I created a new project using XCode 3.0 with the Cocoa-Python
Application template.
I then proceeded to do a build on the application (n.b. I haven't added
any of my own code yet) and the build succeeded.
When I do a build and run however, I get the following error message in
console:
//--------------------------------------------------------------------------------------------------------------------------------
The Debugger Debugger is attaching to process
[Session started at 2007-11-29 08:32:29 -0500.]
Traceback (most recent call last):
File
"/Users/Armahg/Builds/Release/again.app/Contents/Resources/main.py",
line 10, in <module>
import objc
ImportError: No module named objc
2007-11-29 08:32:29.349 again[2542:10b] *** Terminating app due to
uncaught exception 'NSInternalInconsistencyException', reason:
'/Users/Armahg/again/main.m:46 main() PyRun_SimpleFile failed with file
'/Users/Armahg/Builds/Release/again.app/Contents/Resources/main.py'.
See console for errors.'
2007-11-29 08:32:29.352 again[2542:10b] Stack: (
2488480363,
2511437979,
2488479819,
2488479882
)
//--------------------------------------------------------------------------------------------------------------------------------
>From what I have read, i thought pyobjC2 should work right out of the
box with Leopard. Is there anything configuration I have to do to get
the app working?
I also tried to run some of the PyObjc examples and received the
following error message
//--------------------------------------------------------------------------------------------------------------------------------
Armahg:CurrencyConverter Armahg$ python setup.py py2app
Traceback (most recent call last):
File "setup.py", line 8, in <module>
import py2app
ImportError: No module named py2app
//--------------------------------------------------------------------------------------------------------------------------------
TroubleShooting done so far:
My current path for Python is:
Armahg$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python
I modified the main.m file in my test PyObjc app to read
/*Py_SetProgramName("/usr/bin/python");*/
Py_SetProgramName("/Library/Frameworks/Python.framework/Versions/Current/bin/python");
and this has not helped either.
Any help given would be much appreciated. Also, in return, I'll document
what I do and post it somewhere online so that
other newcomers won't have to email this dev list with the same problem
again :)
Thanks in advance ,
George.
|