[Tutor] program closes straight away + python compiler?

Magnus Lycka magnus@thinkware.se
Mon, 21 Oct 2002 10:39:04 +0200


At 02:10 2002-10-18 +0100, Alex Gillis wrote:
>When using a program i've written with python, the window closes as soon=20
>as its finished its job, which is usually too quick for me to even read=20
>the last print.  How do I change this?

Get a slower computer! ;)

Or, end your program with:
raw_input('Press enter to close')

I think there should be a tutor FAQ, this question
is certainly FA. Is there a searchable archive of
the mailing list somewhere?

>  Also, is there some sort of python compiler available or similar so that=
=20
> I could make python programs available to people without the python=20
> interpreter?

Yes and no... :)

There is no complete python compiler. It's long been
"common knowledge" that Python is to dynamic for a
compiler to be viable. Now, there are a number of
projects working in that direction anyway.

Then there are other ways to bundle python programs
into a single executable to make distribution simpler.
The most common are py2exe and McMillan Installer. See
http://www.thinkware.se/cgi-bin/thinki.cgi/PythonInstallers

These tools don't give the speedup one could imagine from
native compilation, but they make it into one big exe. It
includes the python interpreter and the libraries you need.


--=20
Magnus Lyck=E5, Thinkware AB
=C4lvans v=E4g 99, SE-907 50 UME=C5
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se