473,692 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make executable file ?

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.
Jul 18 '05 #1
9 7151
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/
Jul 18 '05 #2
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.
Jul 18 '05 #3
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
Jul 18 '05 #4
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
Jul 18 '05 #5
On 2005-01-02, BOOGIEMAN <BO*********@YA HOO.COM> 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!
Jul 18 '05 #6
Maurice LING <ma*********@ac m.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
Jul 18 '05 #7
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: ar*****@townisp .com
Ur: http://shardservant.no-ip.info
Jul 18 '05 #8
Also, you can try with py2exe. It's very easy.
Catalin.

"Andrew Robert" <ar*****@townis p.com> escribió en el mensaje
news:10******** *****@corp.supe rnews.com...
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: ar*****@townisp .com
Ur: http://shardservant.no-ip.info

Jul 18 '05 #9
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

Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3889
by: Michael Dekson | last post by:
Hello, Can I exe file made in Microsoft Visual C++ decompile into source code. If it is possibly please tell me how. Thanks
7
29395
by: Johnny | last post by:
How do I create a link on a Web page on my hard drive that will run an executable file on my hard drive? For example, let's say I create runpoodle.htm and save it to my hard drive, and let's also say I have an executable file on the root of C named c:\poodle.exe. How can I create a link of some sort on runpoodle.htm that will run poodle.exe on c:\ ?
4
5199
by: Caroline | last post by:
I'd like to launch an executable file from a web page. Basically, the user enters seven parameters and then clicks a button to generate a graph. The input is written to a file and then read by the exe. The exe then generates a graph based upon the input parameters. I am reading about the Process class and wondering if that is the best approach to this. Can you recommend a KB article?
8
7071
by: suresh_C# | last post by:
Dear All, What is difference between Portable Executable (PE) file and a Assembly? Thanks, Mahesh
3
4100
by: SpIcH | last post by:
Hi All, This is all about protecting my data in Executable file. I have developed a program in Visual Basic .NET 2002. I have many questions in mind... please help me to complete my project. 1. I have very much data to be incorporated into the executable file. I have to add much data into my developed program into 2 Combo Boxes and 1 List Box control. For that i have created an xml element with all of the
28
20613
by: Tim Daneliuk | last post by:
I have a program wherein I want one behavior when a file is set as executable and a different behavior if it is not. Is there a simple way to determine whether a given named file is executable that does not resort to all the lowlevel ugliness of os.stat() AND that is portable across Win32 and *nix? Thanks, ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: ...
3
2341
by: uzzi | last post by:
I don't know how to make a php script to work via cron...I want to make it run daily...My server API is CGI/Fast CGI.I have hosting from godaddy and in the help section i found that i have to specify the interpreter manually...look what it says: i've tried with /web/cgi-bin/php "$HOME/html/path/to/my/script.php as command and it doesn't work. if i run the script in browser it works...what should i introduce as a command..and do i have...
3
7247
by: Mo | last post by:
Hi, Is there a way to include an executable (xxx.exe) file inside a c# console project so that the resulting project binary have only one final executable file? My c# console application is calling another Executable (exe) which I am trying to include in my project so I can only have one file for the executable. Any ideas? Mo
4
2709
by: Nethali | last post by:
Hi folks, Is there any way to embed shared library directly, to executable file it self so that executable file can run stand alone without the shared library. I don't want to compile the source, make the static library and plug it. I just want to use dynamic library as it is. Thanks in advance...
16
4491
by: Erwin Moller | last post by:
Why is a binary file executable? Is any binary file executable? Is only binary file executable? Are all executable files binary? What is the connection between the attribute of binary and that of executable?
0
8611
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8547
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9090
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8812
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8810
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7639
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6462
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5822
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.