pyjamas-desktop running under python 2.6... on wine (!)

lkcl luke.leighton at gmail.com
Thu Apr 19 15:00:24 EDT 2012


i think this is so hilarious and just such a stunning achievement by
the wine team that i had to share it with people.

the writeup's here:
http://appdb.winehq.org/objectManager.php?sClass=version&iId=25765

but, to summarise:

* python2.6 runs under wine (the win32 emulator)
* so does python-comtypes (0.6.1)
* you can also install IE6, 7 or 8 under wine
* then you can also install pyjamas
* and at the C:\ DOS prompt you can run "python.exe Hello.py"

... and it will work!  you'll actually get a desktop application as a
win32 GDI program running on your X-Windows GNU/Linux desktop :)  i
just fell off my chair when that happened.

underneath, what's happening is that pyjd's mshtml.py is firing up a
COM interface to MSHTML.DLL (which is part of IE), it's embedding an
IWebBrowser2 OCX control into a w32 GDI window (using a ctypes wrapper
to do that, if you're interested in those kinds of details), and then
handing that over to pyjamas.

 and this is all emulated!

 it's just an absolutely staggering testament to how far wine has come
that it can run python.exe in the first place, but being able to run
COM interfaces around something as sophisticated as MSHTML.DLL is just
mind-blowing.

all right, rant over :)

l.



More information about the Python-list mailing list