Can .py be complied?

jfj jfj at freemail.gr
Thu Apr 28 11:45:53 EDT 2005


beliavsky at aol.com wrote:

> IMO the fact that so many people ask
> 
> "How can I create executables in Python on Windows"
> 
> indicates that standard "batteries included" Windows Python
> distribution is missing a vital battery. There are tools such as
> py2exe, but this functionality should be built-in, so that a newbie to
> Python can just download it, type
> 
> python -o foo.exe foo.py
> 
> at the command line, and get an executable, without any further effort.
> 


Since this is about windows and windows users just want everything in
".exe" form (no matter if it also contains spyware), and they don't care
about the size of it (they just want the damn exe) and since there is
zero chance that python will be included in the next windows
distribution but these people still want the exe (they do, really),
I think I have a convenient solution to give it to them.

/* small program in C in self extracting archive
  */
if (have_application ("Python")) {
   have_python:
   system ("python.exe my_application.py")
} else {
   printf ("This software requires python. Wait until all the
necessary components are being installed\n");
   download_python_from_python_org();
   system ("install_python.exe");
   goto have_python;
}


Seriously, people who want executables wouldn't notice the difference.


jfj




More information about the Python-list mailing list