DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Python (http://www.daniweb.com/forums/forum114.html)
-   -   Py2exe (http://www.daniweb.com/forums/thread201518.html)

funfullson Jul 3rd, 2009 1:52 pm
Py2exe
 
I am sorry if it is simple or repetitive but I have problem with this.
I make a play :
I have python 2.6 or 3.0
a program in my c partition
its name is test.py
I want to compile it and it have to works in linux and windows.
I cannot read english so well please write little sentences with clear means.
Thanks.

vegaseat Jul 3rd, 2009 2:52 pm
Re: Py2exe
 
The py2exe module does not compile to an executable.

It packages your Python bytecode files, other needed files and the Python interpeter to run from an executable file.

At this point py2exe is not yet out for Python3.

shadwickman Jul 3rd, 2009 3:50 pm
Re: Py2exe
 
You will have to make separate executables for Windows and Linux too.

funfullson Jul 3rd, 2009 5:27 pm
Re: Py2exe
 
How do you render your projects tocustomers?
You will say himto instal python?
how I do it.Is it possible to make an exe file?if yes how?

shadwickman Jul 3rd, 2009 5:36 pm
Re: Py2exe
 
py2exe can make .exe files for Windows. These .exe files can run without Python installed. However, .exe files will not run on Linux.

funfullson Jul 4th, 2009 3:12 am
Re: Py2exe
 
I wrote my condition please write how can i do it.

shadwickman Jul 4th, 2009 3:16 am
Re: Py2exe
 
Well here is the py2exe website:
http://www.py2exe.org/
And here is their tutorial that you should follow:
http://www.py2exe.org/index.cgi/Tutorial

This only makes executables which run on Windows. However, most Linux distributions already come with Python installed, so Python .py files should run fine from them as-is.

funfullson Jul 4th, 2009 3:24 am
Re: Py2exe
 
#!/usr/bin/env python

from distutils.core import setup
import py2exe
import sys

sys.argv.append("py2exe")

sys.argv.append("--bundle")
sys.argv.append("1")


opt = {"py2exe": {"compressed": 1,
"optimize": 2,
"ascii": 1,
"bundle_files": 1,
"packages": ["encodings"]}}

setup(options = opt, zipfile=None, console = [{"script": 'test.py'}])

shadwickman Jul 4th, 2009 3:30 am
Re: Py2exe
 
Um... what exactly are you trying to say with the above post? So you posted some code. Good work, but what is your question/motive?

funfullson Jul 4th, 2009 3:43 am
Re: Py2exe
 
I have this but realy confused Ihas error.
left it down.say me a way to make an executable program with maprogram
name:test.py
location c:\
how do it?


All times are GMT -4. The time now is 10:47 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC