jcw at equi4.com
Tue Nov 7 21:00:32 CET 2000
In article <8u8t7v018mc at news1.newsguy.com>, "Alex Martelli"
<aleaxit at yahoo.com> wrote:
> "Maurice Ling" <htling at cyberway.com.sg> wrote in message
> news:3A07CCC0.52105127 at cyberway.com.sg...
> > Well, what I'm really interested in is, is there any python compiler
> > that can compile python codes into standalone executables?
> See http://www.mcmillan-inc.com/install1.html -- he offers tools
> to do that (which are *NOT* "python compilers") and points to a
> few alternatives (which might conceivably be seen as "compilers"
> in some sense -- at least, Python2C might be seen that way).
> Note that only in the Windows version does he build
> _truly_ totally self-contained executables -- "it's not
> culturally appropriate" (and is technically harder, it
> seems) to do that for Linux. I'm not sure I understand
> this (but then, my Linux knowledge dates mostly from
> 0.99 days -- I have heard executable/object formats have
> indeed been changed drastically since those days). But
> it's an issue of C-written DLL's (.so's, in Linux), not
> of any Python code -- apparently it's hard/inappropriate
> to package up an executable together with all the DLL's
> it needs. Actually, very few do that in Windows, either --
> at the very least, kernel32.dll, etc, are _never_ packaged
> together with the .exe (or else the latter would run on
> just ONE possible Windows configuration...), so, there is
> really no such thing as "a truly, fully stand-alone exe".
> But if it's OK for the C-written DLL's to remain "outside"
> (to be unpackaged side-by-side with the almost-standalone
> EXE, e.g. in the same directory), and you're only worried
> about Python-code (and its compiled forms), then Gordon's
> installer is probably the best available solution today.
There is more to it than that, though. Maybe one day, Python will add a
little callback layer ("stubs") like Tcl does, then one could go further
as this recent Tcl-specific announcement by yours truly illustrates:
This has been done for Windows, Linux, Solaris, FreeBSD, Mac, and a few
others, so far. This approach is not tied to Tcl or MetaKit, it could
be done with Python and ZIP archives, for example.
More information about the Python-list