Python Forum
[Py2Exe] How can i convert py files to exe ? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: [Py2Exe] How can i convert py files to exe ? (/thread-5305.html)

Pages: 1 2


[Py2Exe] How can i convert py files to exe ? - JamieVanCadsand - Sep-27-2017

Hey Guys...

Now i get installed py2exe for windows and python, from PIP.
But can anyone tell me how it works... or give my any tutorial ?...

I want it use in the future for my own software, writted in python.
But i want:

1. Learn how i can make an .exe format from all python scripts
of the same python program

2. Learn how i can make an .zip archive with one .exe, incl.
all python scripts they hearth by my program, writed in python.


Can anyone give my any tutorial, or tell my in diffrence steps how
i can use py2exe for this two points ?...

Thanks for help... Jamie.


RE: [Py2Exe] How can i convert py files to exe ? - metulburr - Sep-27-2017

its hard to generally say do this without seeing what code you want compiled.

Because it depends on what 3rd party libs you add, your programs structure for resources, whether you want all python library within the exe or separate, etc.

You dont really need that much. You write a setup.py and then just execute
python setup.py build
to build the exe. And it will be in the dist directory.

Here is a setup.py example. the isSystemSLL function is there only a workaround for an issue with building pygame games. The rest of the options just says to throw everything in the exe and use the starter script called game.py in the same directory. You should in theory be able to download my repo, delete the exe, install pygame and py2exe and rebuild the exe in this case. You can tweak the options to see what different ones do
http://www.py2exe.org/

Usually its gerenally good to start with a hello world, and then work from there because everything you add in the program usually adds some complex issue in building the exe.


RE: [Py2Exe] How can i convert py files to exe ? - snippsat - Sep-27-2017

py2exe i no longer being developed,so it work up to 3.4.
So better choice are PyInstaller(recommend and now work for 3.6),Cx_Freeze and pynsist.


RE: [Py2Exe] How can i convert py files to exe ? - metulburr - Sep-27-2017

is it they just havent released anything since 3.4 or they officially stated its no longer being developed? Thats a big difference. I cant find anything regarding to the fact of it being no longer dev.


RE: [Py2Exe] How can i convert py files to exe ? - snippsat - Sep-27-2017

I have not heard any officially statement,but it have been over 3-year since 3.4 was released.
So no attempt to make it work for 3.5 or 3.6 tells that it's not a priority or it mostly dead for now.


RE: [Py2Exe] How can i convert py files to exe ? - metulburr - Sep-27-2017

I think you are jumping the gun. i dont think 3 years is that long. Pygame went from like 2009 to 2016 before a new release. I dont think just because they havent made a release in X amount of time means no one should use it. Especially since it still works and was only 3 years ago. Albeit the longer without a release, usually the more other new libraries comes to take its place. Py2exe is like the first few results from google on searching for py to exe, so i think it wouldnt have trouble coming back if they took awhile to get a new release out.


RE: [Py2Exe] How can i convert py files to exe ? - snippsat - Sep-27-2017

Not jumping to any gun Wink
I used py2exe a couple of week ago for my Norwegian Tv project(have user from XP to Win-10),
that project will stay on Python 2.7. 
I know py2exe really good,so if someone is stubborn and most use it i will help.

I stick to the advice that new user should use 3.6,
therefor will i not recommend py2exe.
There are some really good alternative like PyInstaller.


RE: [Py2Exe] How can i convert py files to exe ? - Skaperen - Sep-28-2017

maybe someone can get the source code of python and give it this feature:  if a python source file (or .pyc file or .pyo file) is appended to the executable file, it will run (interpret) that source file instead of doing any other things.  all arguments, even if they look like arguments for python itself, will be passed to the interpreted python program   this python executable can be shortened by only including what is needed to run the python code that is appended.  a bonus feature is to handle compressed python programs.  an added bonus would be to support one or more modules appended between the interpreter and the program to be run.  yet another added bonus is to support everything in an appended .zip file or .tar.*z file.

(Sep-27-2017, 08:32 PM)snippsat Wrote: Not jumping to any gun Wink
I used py2exe a couple of week ago for my Norwegian Tv project(have user from XP to Win-10),
that project will stay on Python 2.7. 
I know py2exe really good,so if someone is stubborn and most use it i will help.

I stick to the advice that new user should use 3.6,
therefor will i not recommend py2exe.
There are some really good alternative like PyInstaller.
hvor kan jeg laste ned videoen?


RE: [Py2Exe] How can i convert py files to exe ? - snippsat - Sep-28-2017

(Sep-28-2017, 04:11 AM)Skaperen Wrote: hvor kan jeg laste ned videoen?
Her wx_nrk.


RE: [Py2Exe] How can i convert py files to exe ? - metulburr - Sep-28-2017

english please
Quote:hvor kan jeg laste ned videoen?
Output:
Where can I download the video?