Can .py be complied?

J

jfj

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
 
M

Maurice LING

steve.leach said:
Hence making the resulting program useless to users of most operating
systems.

In close sourced development, which most corporates may prefer, yes, the
resulting program is useless to users of most operating systems.

In open sourced developement, it is still a good feature to have. At
least for distribution to end users or as trial.

To end users, they don't care, as long as they can click and run the
program they need.

To developers, if the codes are close source, nothing can be done anyway
even if you have the codes, licensing agreements and contracts usually
forbids everything. If the codes are open source, you will get the codes
anyway and do according to the limits of the licence.

maurice
 
S

Simon Brunning

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.

It indicates to *me* that people aren't reading the FAQ. ;-)
 
S

Steve Holden

steve.leach said:
Hence making the resulting program useless to users of most operating
systems.

Let's ignore for the moment whether including py2exe as a "battery" is a
desirable thing from an abstract point of view. We may legitimately
differ about that.

We should not forget in our enthusiasm for open source that while "users
of most operating systems" might not find py2exe useful, "most users of
operating systems" may well, since Windows users outnumber the rest
several times.

There's nothing wrong with open source projects catering to a market,
and there's nothing wrong with running open source software on a
proprietary operating system. To behave otherwise might reduce the
growth opportunities for Python and its community.

no-zealotry-please-ly y'rs - steve
 
J

John J. Lee

Steve Holden said:
There's nothing wrong with open source projects catering to a market,
and there's nothing wrong with running open source software on a
proprietary operating system. To behave otherwise might reduce the
growth opportunities for Python and its community.

no-zealotry-please-ly y'rs - steve
[...]

I'm hesitant to label everybody who disagrees with you (and me) on
that a zealot. Though I tend to take the same side you do, I'm not
entirely sure it's not just laziness on my part that I think that way.

Seems to me that holding opinions such as "it's a bad thing to support
open source software on closed source systems, and you should not do
it, for the common good" is far from crazy, even though I don't
currently happen to hold that view.


John
 
J

John J. Lee

jfj said:
/* 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.

Until they install the next program that does this.


John
 
S

Steve Holden

John said:
There's nothing wrong with open source projects catering to a market,
and there's nothing wrong with running open source software on a
proprietary operating system. To behave otherwise might reduce the
growth opportunities for Python and its community.

no-zealotry-please-ly y'rs - steve

[...]

I'm hesitant to label everybody who disagrees with you (and me) on
that a zealot. Though I tend to take the same side you do, I'm not
entirely sure it's not just laziness on my part that I think that way.

Seems to me that holding opinions such as "it's a bad thing to support
open source software on closed source systems, and you should not do
it, for the common good" is far from crazy, even though I don't
currently happen to hold that view.
Well, we appear to agree. Please note I wasn't labelling anyone a
zealot, simply implying that I didn't want the discussion to descend to
blind repetitions of principle with no supporting arguments.

I have no problem with others taking a different view from mine on this
issue, though I reserve the right to disagree with them. My own view is
that open source (Python included) wouldn't be anywhere near as advanced
and popular as it is if it hadn't been ported to the majority platform,
and that this actually positions it better for eventual world domination
:). There's a reason Microsoft are fighting Linux with FUD.

Let's also not forget that at PyCon, (I am told) when Jim Hugunin asked
for a show of hands as to who principally developed for Windows
platforms, *Guido* raised his hand.

regards
Steve
 
P

Peter Dembinski

(e-mail address removed) (John J. Lee) writes:

[snap]
Until they install the next program that does this.

If we talk about _real_ users from the _real_ world, the most of them
would just kill the app (or what is the name for stopping running
program in w32) when the download begins[1] :)

[1] 'hey, is that a spyware or what? what takes so darn long?'
 
M

Mike Meyer

jfj said:
/* 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;
}

Goto. Ugh.

if (!have_application("Python")) {
printf ("This software requires python. Wait until all the
necessary components are being installed\n");
download_python_from_python_org();
system ("install_python.exe");
}
system("python.exe my_application.py");

<mike
 
J

John J. Lee

Steve Holden said:
John J. Lee wrote: [...]
I'm hesitant to label everybody who disagrees with you (and me) on
that a zealot. Though I tend to take the same side you do, I'm not
[...]
Well, we appear to agree. Please note I wasn't labelling anyone a
zealot, simply implying that I didn't want the discussion to descend
to blind repetitions of principle with no supporting arguments.
[...]

Sorry, I wasn't reading carefully.

I suppose really my thought was directed more at the programming world
in general, which often feels free to label free software advocates as
loonies (I've been guilty of this myself, I'm sure). Of course, lots
of them *are* loonies, but that's beside the point. ;-)


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,237
Messages
2,571,189
Members
47,823
Latest member
eipamiri

Latest Threads

Top