Python compiled?

B

billiejoex

Hi all. I'm sorry for a noob question like this but I'll try to ask it
anyway.
One of the greatest problem that may discourage a new user to choose Python
language is it's interpreted nature.
Another important problem is that no interpreter is installed on Windows
machine by default and this makes harder to distribute the software.
Does it is planned that, in a far future, Python will implement a form of
compilation?
This would be awesome.
 
D

Devan L

billiejoex said:
Hi all. I'm sorry for a noob question like this but I'll try to ask it
anyway.
One of the greatest problem that may discourage a new user to choose Python
language is it's interpreted nature.

What? The instant gratification of immediate results is not
discouraging.
Another important problem is that no interpreter is installed on Windows
machine by default and this makes harder to distribute the software.

Python isn't that big to install, and people don't have problems with
small downloads
Does it is planned that, in a far future, Python will implement a form of
compilation?
This would be awesome.

Again, I don't see how compiling would make Python better.
 
K

Kartic

One of the greatest problem that may discourage a new user to choose Python
language is it's interpreted nature.

Strange.. this is one reason I love Python :)
Another important problem is that no interpreter is installed on Windows
machine by default and this makes harder to distribute the software.
Does it is planned that, in a far future, Python will implement a form of
compilation?
This would be awesome.

py2exe (http://starship.python.net/crew/theller/py2exe/) and pyinstaller
(http://pyinstaller.hpcf.upr.edu/pyinstaller/) compile python programs
into .exe files that can be executed on any Win32 machine.

So you can develop the code using the python interpreter and deploy it
using either of these. I have used py2exe and nsis installer to create
setup versions of my applications and it deployment is really smooth,
just like any compiled software.

-Kartic
 
D

Do Re Mi chel La Si Do

Hi !


One of the greatest reason which encouraged me to choose Python is its
interpreted nature (more exactly its nature of dynamic language).

The utilities of distribution, or packaging, are enough numerous to solve
this kind of problem.

The existence of Py2exe (inter alia), could concillier the needs...


@-salutations

Michel Claveau
 
F

fuzzylollipop

there are "noob" questions and there are uneducated questions, yours
are of the latter ( actually yours are STATEMENTS not questions ), and
just trolling for what it is worth, if you would take the time to read
what Python is and why it is you would not be asking these "questions".
 
B

billiejoex

I'm sorry. Maybe you misunderstanded.
I know the great advanteges deriving by using interpretation too, I
appreciate it very much (I'm newbie in Python and the interpeter really
helps me out in many situations), but a 'pure' interpretated language needs
obligatorily an interpreter and (sorry for repeating) this could be a
problem for distribution (imho).
Py2exe is surely a good compromise but it is not comparable to an executable
file compiled, for example, in C for obvious sizing reasons (I never used
PyInstaller. I surely try it out as soon as possible, but I didn't think
that the output package size is too much different than py2exe one).
For these reasons I think that an hibrid language that permits
interpretation and compilation at the same time, should be a great
advantage.

best regards
 
B

billiejoex

there are "noob" questions and there are uneducated questions, yours
are of the latter ( actually yours are STATEMENTS not questions ), and
just trolling for what it is worth, if you would take the time to read
what Python is and why it is you would not be asking these "questions".

I'm really sorry man. I didn't wanted to be uneducated, believe me.
I wrote fastly, I'm new in Python and probably for my language problems I
didn't expressed concepts properly.
 
D

Diez B. Roggisch

billiejoex said:
I'm sorry. Maybe you misunderstanded.
I know the great advanteges deriving by using interpretation too, I
appreciate it very much (I'm newbie in Python and the interpeter really
helps me out in many situations), but a 'pure' interpretated language needs
obligatorily an interpreter and (sorry for repeating) this could be a
problem for distribution (imho).

Do youself a favour - google this group for that question. You'll get
plenty of answers to your questions and allegations. This dead Horse has
been beaten to hell and back. Really.

Diez
 
F

Fredrik Lundh

billiejoex said:
I know the great advanteges deriving by using interpretation too, I appreciate it very much (I'm newbie in Python and the
interpeter really helps me out in many situations), but a 'pure' interpretated language needs obligatorily an interpreter and
(sorry for repeating) this could be a problem for distribution (imho).

Python is a compiled language; the Python source code you write is
compiled to byte codes, which are executed by a virtual machine.

on windows, that virtual machine consists of a DLL. distributing DLLs
have been a solved problem for at least 15-20 years...

</F>
 
V

Valentino Volonghi aka Dialtone

billiejoex said:
interpretation and compilation at the same time, should be a great
advantage.

Python is compiled and needs a runtime environment.
just like java does and like C needs the C standard library installed.

I can see no differences except one is compiled to native code, the
other is compiled to bytecode and JITted or interpreted and python is
compiled to bytecode and interpreted or (with psyco) JITted.
 
G

Grant Edwards

Py2exe is surely a good compromise but it is not comparable to
an executable file compiled, for example, in C for obvious
sizing reasons

In theory something written in C could be smaller. In
practice, it isn't. Most "real" apps end up shipping with a
directory full of .dlls, help-files, uninstall scripts and
miscellaneous other stuff. There are very, very few pure "exe"
single-file executable windows apps. Putty is the only one
I've run across in a _long_ while. Everything else ends up
installing a directory full of libraries and help files and
whatnot. In practice, a Python app packages with py2exe and
Inno Setup behaves exactly the same as anything other recent
Windows app.
(I never used PyInstaller. I surely try it out as soon as
possible, but I didn't think that the output package size is
too much different than py2exe one). For these reasons I think
that an hibrid language that permits interpretation and
compilation at the same time, should be a great advantage.

You're wrong. The size of a packaged Python app is simply not
a concern. I've distributed several Python wxWidgets apps
after packaging them with py2exe and Inno setup. I never got a
single comment about the size of the packaged app -- all I got
were surprised remarks about how they thought I was a Unix guy
who didn't know anything about Windows. I reply that I am, and
I don't.
 
F

Fredrik Lundh

Grant said:
There are days when some poeple might disagree with that. ;)

distributing them has never been a problem. installing them in a
shared location has always been a problem.

(the solution to the latter is simple, of course: don't do that)

</F>
 
G

Grant Edwards

distributing them has never been a problem. installing them in a
shared location has always been a problem.

(the solution to the latter is simple, of course: don't do that)

</F>

I should add that py2exe doesn't do that, so py2exe'd apps tend
to be better behaved than many other sorts of Window's apps.
 
J

Jorgen Grahn

I'm really sorry man. I didn't wanted to be uneducated, believe me.
I wrote fastly, I'm new in Python and probably for my language problems I
didn't expressed concepts properly.

I didn't think they were uneducated, they were good questions.
At least if one understands that the problem is that the /end user/
percieves a problem.

I hope people are less hesitant to install "interpreted" applications today
than they were ten years ago.

I also believe it's better to convince the end user to install Python before
installing the application[1], rather than to try to sneak in an interpreter
with py2exe or something -- an interpreter which the end user cannot update,
manage or use for other things.

/Jorgen

[1] Might be hard to convince people who have ever installed a Java
interpreter -- when I do that on Windows, I usually break at least one
existing Java application, and I usually get a whole lot of useless
desktop icons, a funny thing in the system tray, etc.
 
G

Grant Edwards

I also believe it's better to convince the end user to install Python before
installing the application[1], rather than to try to sneak in an interpreter
with py2exe or something -- an interpreter which the end user cannot update,
manage or use for other things.

There's a typo in that last phrase. It should read "[...] --
an interpreter the user isn't going to uninstall or break
because he doesn't know what it is or why it's there."
 
C

Christos Georgiou

There are very, very few pure "exe"
single-file executable windows apps. Putty is the only one
I've run across in a _long_ while.

Then you should also run across Media Player Classic (download it from
http://sourceforge.net/projects/guliverkli ). Just a plain exe, no
installation needed, and is an excellent media player. For a funny
side, check the program's version history.
 
T

Terry Hancock

I hope people are less hesitant to install "interpreted" applications today
than they were ten years ago.

I also believe it's better to convince the end user to install Python before
installing the application[1], rather than to try to sneak in an interpreter
with py2exe or something -- an interpreter which the end user cannot update,
manage or use for other things.

I have to confess to be very ignorant about the Windows installation options
for Python packages, but surely in principle at least, it should be possible
to make self-installing .EXE files that do what I get from

apt-get install python-mypackage

or at least

dpkg --install mypackage

That is to say, which install an interpreter if one isn't already there, and
then install the package. Or, upon finding an interpreter install into it
along the lines of distutils.

I mean, with the whole AUTOEXEC.BAT start up a CD and run whatever
evil code we find there as soon as we stick it into our unwisely
promiscuous machine, it ought to make it possible for the installation
to be completely transparent to the user.

You know, after writing that, I'm starting to rethink what people
mean when they say Windows is "easy". ;-)

Cheers,
Terry
 
J

Jorgen Grahn

I also believe it's better to convince the end user to install Python before
installing the application[1], rather than to try to sneak in an interpreter
with py2exe or something -- an interpreter which the end user cannot update,
manage or use for other things.

There's a typo in that last phrase. It should read "[...] --
an interpreter the user isn't going to uninstall or break
because he doesn't know what it is or why it's there."

I meant what I wrote, of course (and you should really have added a smiley.)

Might be because I'm more at home in Linux (Debian). The
bundling-an-interpreter approach to distribution software is simply not
applicable on those platforms, for many different reasons.

Maybe that's why I have a hard time even understanding the idea.
I see lots of problems and few benefits.

For example, the issue of security fixes. If there's a bug in Python which
makes anyone running an interpreter vulnerable, how are those users even
going to /find out/ about it?

/Jorgen
 

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,264
Messages
2,571,315
Members
48,001
Latest member
Wesley9486

Latest Threads

Top