How to make executable file ?

B

BOOGIEMAN

Just how to make *.exe file from python code ??
I typed this :

a, b = 0, 1
while b < 1000:
print b,
a, b = b, a+b

and saved it as pyt.txt

Now, how do I make pyt.exe file ???
I want to run it on windows where isn't installed python.
 
B

BOOGIEMAN

don't be scared when you see the dimension of the files...

1.9 Mb for a console application ?!
And is it possible to make Windows application ?
I want to display results in windows message box.
 
M

Maurice LING

Hi all,

This may be OT but is there a way to do the same for *nix type of
system? Like cast a python interpreter with scripts together?

I'm running Mac OSX here.

The only remote idea I have is to use jythonc to convert everything into
..class files and package that as a .jar file but I can't do that with C
bindings.

Any suggestions?

Thanks,
Maurice
 
T

Tim Jarman

Maurice said:
Hi all,

This may be OT but is there a way to do the same for *nix type of
system? Like cast a python interpreter with scripts together?

I'm running Mac OSX here.

For OSX, google for py2app - for *nix in general, I believe freeze is your
mman, although so many *nixen ship with Python these days it's not such an
issue.
 
A

Alex Martelli

Maurice LING said:
Hi all,

This may be OT but is there a way to do the same for *nix type of
system? Like cast a python interpreter with scripts together?

Yes, but fortunately on the Mac you don't need that.
I'm running Mac OSX here.

Assuming we're talking Mac OS X 10.3 or later, Python itself comes with
the operating system (it's used somewhere in stuff provided with the
system, such as fax handling). As I saw others suggest, google for
py2app, it's probably the best way to handle this for the Mac today.


Alex
 
A

Andrew Robert

BOOGIEMAN said:
Just how to make *.exe file from python code ??
I typed this :

a, b = 0, 1
while b < 1000:
print b,
a, b = b, a+b

and saved it as pyt.txt

Now, how do I make pyt.exe file ???
I want to run it on windows where isn't installed python.

You may want to try cx_freeze.

Details on it can be found at
http://starship.python.net/crew/atuining/cx_Freeze/

Binaries are available for Linux and Windows.

Alternately, source code is available if you need to compile it for a
different platform.


--
Thank you,
Andrew Robert

E-mail: (e-mail address removed)
Ur: http://shardservant.no-ip.info
 

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
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top