[Pythonmac-SIG] Creating an applet that includes wxPython
Bob Ippolito
bob at redivi.com
Mon Sep 8 04:36:53 EDT 2003
On Sunday, Sep 7, 2003, at 16:29 America/New_York, Bob Ippolito wrote:
>
> On Sunday, Sep 7, 2003, at 16:20 America/New_York, Just van Rossum
> wrote:
>
>> Bob Ippolito wrote:
>>
>>> I haven't tried this, but it should work. In a future version of
>>> bundlebuilder, we could incorporate my potool module (
>>> http://undefined.org/python/ ) to perform translations like this
>>> automatically (though we would also need logic for Frameworks, and it
>>> would have to do this process recursively).
>>
>> That would be fantastic. I briefly looked at potool just now, but for
>> it
>> to be incorporated in bundlebuilder if would have to be independent
>> from
>> 3rd party packages. How deep is potool's dependence on ctypes?
>
> Very shallow, it just uses the Structure class for convenience. I'll
> write a metaclass that does what ctypes Structure module does (as far
> as I'm using it, at least) and post a new version today.
As promised, I've emulated all of the ctypes functionality that I've
used for potool. Here's the latest version (it is the same, except it
does not depend on ctypes):
http://undefined.org/python/potool-0.2.tgz
The ptypes module I've written is rather interesting. I'd like to
improve on it (to accommodate variable length arrays, particularly
those based on structures as in mach-o headers. and also certain types
that change based upon "typecodes" in the structure) mapping, and also
to optimize it a bit (have structures and arrays turn a list of
non-Indeterminate Packables into a single pack or unpack statement).
Aside from that, I should change the interface and provide convenience
methods for the functions that otool and install_name_tool perform.
The ptypes module is a cute little example of what __metaclass__ can do
for you.
-bob
More information about the Pythonmac-SIG
mailing list