[Pythonmac-SIG] Re: Python/Tkinter and QuickTimeTcl

Jack Jansen Jack.Jansen@oratrix.com
Thu, 21 Mar 2002 21:41:11 +0100


On donderdag, maart 21, 2002, at 06:20 , Mats Bengtsson wrote:

>
> Forwarded to  tcl-mac@lists.sourceforge.net:
>
> The thought has struck me, but I've never started an investigation.
> But since we have (Jack ?) a Python guy here perhaps we may ask him,
> or anyone else; what does it take to port a Tcl/Tk extension
> to Python? Have never used Python myself.
> QuickTimeTcl: "http://hem.fyristorg.com/matben/qt"

I haven't a clue whether a general Tcl extension would work in 
Tkinter in Python. So, I've added the pythonmac-sig to the 
recipient list: has anyone there ever tried this?

But for the case of QuickTime specifically I do have an answer: 
there is probably little point in getting QuickTimeTcl to work. 
The Python quicktime module exports about 90% of quicktime (I 
think sprite tracks are the only obvious omission; at least: 
extracting or creating them, I think playback should work fine) 
so there's probably little point in using QuickTimeTcl from 
Python.

[What follows now is a very biased opinion, if you read on you 
should bear in mind that I'm responsible for the stuff described 
here]

In general I think that looking at whether functionality can be 
exported from Python to Tcl, especially for the Mac, may be a 
more interesting route. The MacOS toolbox modules for MacPython 
are almost all machine-generated: you feed in Universal Headers 
.h files on one end and out the other end come complete (or 
almost complete) glue modules. The package that does this, bgen, 
could probably be adapted to generate Tcl plugin modules in 
stead of Python plugin modules,  but it would definitely take 
some real dedication to master it. But once you've mastered it 
it is great: I did an interface to most of CoreFoundation in a 
few evenings.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- 
Emma Goldman -