Hi,
I noticed that in the original Apple configuration certain
CoreGraphics functions are available not only inside
Quartz.CoreGraphics but also directly at the Quartz module, but when I
tried to compile and install PyObjC from svn sources it is not the
case. See the sessions below:
Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Quartz
>>> import Quartz.CoreGraphics
>>> Quartz.CoreGraphics.CGContextSetRGBFillColor
<objc.function object at 0x7d4380>
>>> Quartz.CGContextSetRGBFillColor
<objc.function object at 0x7d4380>
ActivePython 2.6.1.1 (ActiveState Software Inc.) based on
Python 2.6.1 (r261:67515, Dec 5 2008, 12:21:29)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Quartz
>>> import Quartz.CoreGraphics
>>> Quartz.CoreGraphics.CGContextSetRGBFillColor
<objc.function 'CGContextSetRGBFillColor' at 0x3c2ada0>
>>> Quartz.CGContextSetRGBFillColor
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'CGContextSetRGBFillColor'
Is this expected to happen?
Cheers,
Guerra
|