Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to make executable file ?

Reply
Thread Tools

How to make executable file ?

 
 
BOOGIEMAN
Guest
Posts: n/a
 
      01-02-2005
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.
 
Reply With Quote
 
 
 
 
Gian Mario Tagliaretti
Guest
Posts: n/a
 
      01-02-2005
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/
 
Reply With Quote
 
 
 
 
BOOGIEMAN
Guest
Posts: n/a
 
      01-02-2005
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.
 
Reply With Quote
 
Maurice LING
Guest
Posts: n/a
 
      01-02-2005
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
 
Reply With Quote
 
Tim Jarman
Guest
Posts: n/a
 
      01-02-2005
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
 
Reply With Quote
 
Grant Edwards
Guest
Posts: n/a
 
      01-02-2005
On 2005-01-02, BOOGIEMAN <> wrote:

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

>
> 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!
 
Reply With Quote
 
Alex Martelli
Guest
Posts: n/a
 
      01-02-2005
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?


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
 
Reply With Quote
 
Andrew Robert
Guest
Posts: n/a
 
      01-05-2005
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:
Ur: http://shardservant.no-ip.info
 
Reply With Quote
 
Catalin Lungu
Guest
Posts: n/a
 
      01-05-2005
Also, you can try with py2exe. It's very easy.
Catalin.

"Andrew Robert" <> escribió en el mensaje
news:...
> 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:
> Ur: http://shardservant.no-ip.info



 
Reply With Quote
 
Fuzzyman
Guest
Posts: n/a
 
      01-05-2005
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

 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
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



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