[Tutor] Distribution of Python programs

alan.gauld@bt.com alan.gauld@bt.com
Wed, 31 Jul 2002 17:06:24 +0100


> install Python, are there any wrappers that I could use (Like 
> freewrap for tcl/tk) to make it into a .exe file?

Yes. Freeze comes in the standard distro but is a bit 
limited. py2exe and Gordon MacMillans installer are 
the most popular tools for this. py2exe is reputedly 
the easiest to use.

> My second question is along the same lines... With C and C++ 
> you compile programs and run them.. 
> Does anyone know if there is a major speed difference? 

Yes, on average Python is about 5-10 times slower than 
C/C++ Of course if you are mainly using libraries written 
in C then it might only be a factor of 2 or 3, and if 
you are doing a lot ogf database access you might not 
even notice the difference! OTOH if you try writing 
a big number crunching app in pure python you will see 
it for sure!

> speed even an issue with Python? 

Depends on what you are doing. Speed is only an issue 
if its too slow. If its a batch job that runs overnight 
while you are sleeping do you care if it finishes 5 
minutes later? OTOH if its a missile avoidance system 
on a fighter jet that 10ms difference might matter a lot!

Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld