For Programmers: Free Programming Magazines  


Home > Archive > Python > January 2005 > How to make executable file ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to make executable file ?
BOOGIEMAN

2005-01-02, 8:56 pm

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.
Gian Mario Tagliaretti

2005-01-02, 8:56 pm

BOOGIEMAN wrote:

[...]
> and saved it as pyt.txt
>


Maybe pyt.py is better :)

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


Have a look at py2exe:
http://starship.python.net/crew/theller/py2exe/

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

cheers
--
Gian Mario Tagliaretti
PyGTK GUI programming
http://www.parafernalia.org/pygtk/
BOOGIEMAN

2005-01-02, 8:56 pm

On Sun, 02 Jan 2005 21:56:45 +0100, Gian Mario Tagliaretti wrote:

> 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.
Maurice LING

2005-01-02, 8:56 pm

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
Tim Jarman

2005-01-02, 8:56 pm

Maurice LING wrote:

> 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.

--
Website: www DOT jarmania FULLSTOP com
Grant Edwards

2005-01-02, 8:56 pm

On 2005-01-02, BOOGIEMAN <BOOGIEMANPN@YAHOO.COM> wrote:

>
> 1.9 Mb for a console application ?!


Yup. I know it's rather small for a Windows application.

> And is it possible to make Windows application?


Yes.

> I want to display results in windows message box.


--
Grant Edwards grante Yow! Pardon me, but do you
at know what it means to be
visi.com TRULY ONE with your BOOTH!
Alex Martelli

2005-01-02, 8:56 pm

Maurice LING <mauriceling@acm.org> wrote:

> 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
Andrew Robert

2005-01-05, 3:59 pm

BOOGIEMAN wrote:
> 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: arobert@townisp.com
Ur: http://shardservant.no-ip.info
Catalin Lungu

2005-01-05, 3:59 pm

Also, you can try with py2exe. It's very easy.
Catalin.

"Andrew Robert" <arobert@townisp.com> escribió en el mensaje
news:10to3sve2nburaf@corp.supernews.com...
> BOOGIEMAN wrote:
>
> 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: arobert@townisp.com
> Ur: http://shardservant.no-ip.info



Fuzzyman

2005-01-05, 3:59 pm

An alternative way is to use Movable Python. It's a frozen distribution
of python that can run without being 'installed'.

See http://sourceforge.net/projects/movpy

To display things in a 'window' you'll need to use a GUI toolkit like
Tkinter or wxPython.
Regards,

Fuzzy
http://www.voidspace.org.uk/python/index.shtml

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com