473,320 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

py to exe: suggestions?

I need to convert a python file to an '.exe'. I've tried py2exe, and I
don't like it because you have to include that huge dll and libraries.

Thanks for the Help!!

Aug 28 '05 #1
6 7362
chris patton enlightened us with:
I need to convert a python file to an '.exe'. I've tried py2exe, and
I don't like it because you have to include that huge dll and
libraries.


Then what would you expect? The whole Python interpreter is needed if
you want to run Python programs. It's more a smart packaging process
than a compilation of Python code into an executable.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
Aug 28 '05 #2
chris patton <ch*********@gmail.com> wrote:
I need to convert a python file to an '.exe'.
A Python program is executable only in the context of a Python
interpreter. Python is a dynamic language; it can't be compiled to
native machine code.
I've tried py2exe, and I don't like it because you have to include
that huge dll and libraries.


That's the Python interpreter environment, and the standard Python
library that is made available in the Python environment. Without
them, your program isn't executable.

What were you hoping for?

--
\ "If trees could scream, would we be so cavalier about cutting |
`\ them down? We might, if they screamed all the time, for no good |
_o__) reason." -- Jack Handey |
Ben Finney
Aug 28 '05 #3
There's movpy, w/option to exclude Unicode/win98 capabilities:

http://www.voidspace.org.uk/python/movpy/

Also:

http://www.effbot.org/zone/exemaker.htm
http://www.python.org/doc/current/di...on-script.html
http://www.jython.org/docs/differences.html

Ben Finney wrote:
chris patton <ch*********@gmail.com> wrote:
I need to convert a python file to an '.exe'.


A Python program is executable only in the context of a Python
interpreter. Python is a dynamic language; it can't be compiled to
native machine code.
I've tried py2exe, and I don't like it because you have to include
that huge dll and libraries.


That's the Python interpreter environment, and the standard Python
library that is made available in the Python environment. Without
them, your program isn't executable.

What were you hoping for?

--
\ "If trees could scream, would we be so cavalier about cutting |
`\ them down? We might, if they screamed all the time, for no good |
_o__) reason." -- Jack Handey |
Ben Finney


Aug 28 '05 #4
If your users already have Python installed then you could just create a
self-extracting, self-executing .exe that contains only your scripts and
necessary files. I belive many of the popular zip utilities have the
ability to do this. The free info-zip does this as well:
http://www.info-zip.org (but you have to recompile it with the
appropriate switch turned on).

If they don't have Python installed then you have no choice but to
include the python DLLs, libraries, etc. as that's your runtime
environment necessary to run your Python application.

HTH

chris patton wrote:
I need to convert a python file to an '.exe'. I've tried py2exe, and I
don't like it because you have to include that huge dll and libraries.

Thanks for the Help!!

Aug 28 '05 #5
chris patton wrote:
I need to convert a python file to an '.exe'. I've tried py2exe, and I
don't like it because you have to include that huge dll and libraries.

Thanks for the Help!!


Do you want to create an exe to give to others, or so that you can use
it in windows easier just like any other exe?

If the later you may be able to tell py2exe to exclude dll's that are in
your search path.

If you want something you can send to other windows users, then it's far
easier to include the dll's and extra files than it is to try and make
sure all the files the programs needs are installed correctly on the
recipients computer.

I use:

py2exe - to create the main exe and gather all the needed files together.

Inno Setup - to create a windows installer complete with license, docs,
Internet support links, and an uninstaller.

And a few other programs such as an icon editor to create icons, and
Resource Hacker to change the tk window icons to my own. Py2exe will
insert the exe icon, but not change the little tk window icons which
reside in the tk dll files.

When it's all done you have an installable application from a single exe
file that's very professional. Most users won't need to know or care
what language you developed your application with as long as it works.

Hope that helps,
Cheers,
Ron



Aug 28 '05 #6
Ivan Shevanski wrote:
Not sure if you already got the answer to this lol but since this is one
thing about python i do know how to do, use CXFreeze. Its basicly a
combination of all the programs you have already tryed. Works great for me
=D sorry I dont have a link, just google it.


it's spelled cx_freeze, and can be found here:

http://starship.python.net/crew/atuining/cx_Freeze/

</F>

Sep 1 '05 #7

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

Similar topics

1
by: maya2000 | last post by:
Hello, I searched this java newsgroup and tried all suggestions, but still failed. I keep watch a task manager, but cmd.exe never running. All I want to do is run and pop up the cmd.exe using...
5
by: David | last post by:
Hi everyone, I have a ActiveX EXE component written in VB6. This ActiveX EXE exposes various public methods that can be called by several other independent Windows EXE applications (also written...
5
by: Joseph | last post by:
Hello, I have a C# program that builds a txt file and then, calls an external exe (this external exe simply imports this txt file into a DBF (DBase) file. (we copy a template of the DBF file into...
8
by: Vinod | last post by:
Hi, I have a problem, i am calling an exe from asp program. Its not working fine. When i execute the exe through the dos program directly i get the desired result. My exe will convert files in...
15
by: (Pete Cresswell) | last post by:
I've got a .BAT file that I use for executing various MS Access apps that I wrote way back in the days of 2.0. It's evolved over time, but it still contains a number of possible paths to...
0
by: ashton | last post by:
My last question wound up opening up a larger can of worms then I had thought. This may be off-topic as it involves more then just C++. Any help would be appreciated. Our application is as...
14
by: frostalicious | last post by:
Used VB.NET (on my client PC) to convert VB6 executable to .NET executable. Placed the .exe file on a network drive on my server. From client, ran .NET Wizards "Trust an Assembly" to make the...
9
by: sdb1031 | last post by:
I am trying to run an exe within a python script, but I'm having trouble with spaces in the directory name. The following example will display the usage statement of the program, so I know that...
5
by: Connie | last post by:
I am running the following script: begin set quoted_identifier off declare @pk int declare @where_clause varchar(100) declare @file_name varchar (50)
2
by: Teja | last post by:
Hi All, I have a Python COM server. I need to deploy it on various sytems. When I run the COM server from python its showing an output " Registered : sample.lib" If I try to use the COM obj...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.