Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Directly Executable Files in Python

Reply
Thread Tools

Re: Directly Executable Files in Python

 
 
harrismh777
Guest
Posts: n/a
 
      03-29-2011
Chris Rebert wrote:
> Yes. py2exe is a tool which generates such Windows executables:
> http://www.py2exe.org/


Interesting... but it can't possibly be creating .exe files
(compiling)... I don't buy it... it has to be reproducing the byte code
interpreter in the code segment and the byte code in the data segment...
so that each .exe file created by said process is actually loading an
entire copy of at least the byte code interpreter with each program
"compiled" ... can't be very efficient??

.... just a question?

 
Reply With Quote
 
 
 
 
Benjamin Kaplan
Guest
Posts: n/a
 
      03-29-2011
On Tue, Mar 29, 2011 at 12:16 AM, harrismh777 <> wrote:
> Chris Rebert wrote:
>>
>> Yes. py2exe is a tool which generates such Windows executables:
>> http://www.py2exe.org/

>
> Interesting... but it can't possibly be creating .exe files (compiling).... I
> don't buy it... it has to be reproducing the byte code interpreter in the
> code segment and the byte code in the data segment... so that each .exe file
> created by said process is actually loading an entire copy of at least the
> byte code interpreter with each program "compiled" ... *can't be very
> efficient??
>
> ... just a question?


If you can figure out a good way to compile a language like Python,
you'll be very rich. Yes, it is running the interpreter and then
running the bytecode on the interpreter. It's the same way Java and
..NET work.
 
Reply With Quote
 
 
 
 
Paul Rudin
Guest
Posts: n/a
 
      03-29-2011
Benjamin Kaplan <> writes:


> If you can figure out a good way to compile a language like Python,
> you'll be very rich. Yes, it is running the interpreter and then
> running the bytecode on the interpreter. It's the same way Java and
> .NET work.


Not exactly AIUI. .NET bytecodes do actually get compiled to executable code
before being executed (unless things have changed recently - I haven't
really done anything significant with .NET in the last couple of years).
 
Reply With Quote
 
Ethan Furman
Guest
Posts: n/a
 
      03-29-2011
harrismh777 wrote:
> Chris Rebert wrote:
>> Yes. py2exe is a tool which generates such Windows executables:
>> http://www.py2exe.org/

>
> Interesting... but it can't possibly be creating .exe files
> (compiling)...


Yes and no. The python program is not being compiled. The Python
system, along with all the necessary libraries and support .py files,
are combined into a .exe loader. When the .exe is run it extracts the
Python interpreter, makes all the other files available, and then starts
it running.*

~Ethan~

*The details are not exact, but this is the general idea.
 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      03-29-2011
On 2011-03-29, harrismh777 <> wrote:
> Chris Rebert wrote:
>> Yes. py2exe is a tool which generates such Windows executables:
>> http://www.py2exe.org/

>
> Interesting... but it can't possibly be creating .exe files


It is.

> (compiling)...


It isn't.

> I don't buy it...


Then don't.

> it has to be reproducing the byte code interpreter in the code
> segment and the byte code in the data segment...


Something like that.

--
Grant Edwards grant.b.edwards Yow! Either CONFESS now or
at we go to "PEOPLE'S COURT"!!
gmail.com
 
Reply With Quote
 
CM
Guest
Posts: n/a
 
      03-29-2011

> it has to be reproducing the byte code
> interpreter in the code segment and the byte code in the data segment...
> so that each .exe file created by said process is actually loading an
> entire copy of at least the byte code interpreter with each program
> "compiled" ...


Yes, if you think of it as a handy packager and not a compiler, it
makes sense.

>*can't be very efficient??


How do you define efficient? All I know is that it works well. You
click on
the .exe and a moment later you are running the application despite
not having
Python installed on your computer. I'm grateful for its existence.

Che

 
Reply With Quote
 
CM
Guest
Posts: n/a
 
      03-29-2011
On Mar 29, 12:16*am, harrismh777 <harrismh...@charter.net> wrote:
> Chris Rebert wrote:
> > Yes. py2exe is a tool which generates such Windows executables:
> >http://www.py2exe.org/

>
> Interesting... but it can't possibly be creating .exe files
> (compiling)... I don't buy it... it has to be reproducing the byte code
> interpreter in the code segment and the byte code in the data segment...
> so that each .exe file created by said process is actually loading an
> entire copy of at least the byte code interpreter with each program
> "compiled" ... *


Yes, if you think of it as a handy packager and not a compiler, it
makes sense.

> can't be very efficient??


How do you define efficient? All I know is that it works well. You
click on the .exe and a moment later you are running the application
despite not having Python or any of the third party libraries you've
used installed on your computer. I'm grateful for its existence.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create executable from executable with py2exe vedrandekovic@gmail.com Python 0 03-29-2008 12:23 PM
Running an Executable Before Executable JAR Jason Cavett Java 8 05-16-2007 07:14 PM
what is fast dynamically linked executable or statically linked executable ?how to decide? pratap C Programming 20 03-07-2007 04:46 AM
How can I run a c executable in pwd ,while the executable is in some other directory vishsid3@gmail.com C Programming 15 08-21-2006 06:04 AM
Preview image directly on PC, save directly to HD Patrick M. Digital Photography 3 01-07-2004 08:29 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57