EvilZone
Programming and Scripting => Scripting Languages => : Ragehottie May 15, 2012, 02:18:47 AM
-
Hello. I would like someone to tell me how to run a python script without python installed on the computer. I don't care what it is, I just want it to run on windows. I am fine with it being an exe, but Py2Exe is bull shit.
-
Have you tried Pyinstaller?
You can create stand alone executables to use on computers without python installed.
-
Py2Exe is the best method. The only reason you think it is bullshit is because you don't know how to use it, or it is too complicated for you to understand.
If Py2Exe is such bullshit, switch to a native language like VB.NET or C#.
-
You will also need to know a bit about distutils and how python packages everything.
Here (http://www.daniweb.com/software-development/python/threads/256661/py2exe-and-wxpython) is a link that might help a bit more.
And here is an example of the setup.py
from distutils.core import setup
import py2exe
setup = (version = "1.0",
description = "My App",
name = "Hello World",
console = ["myapp.py"],
options = {"py2exe" : {"bundle_files" : 1}})
Also, sometimes the compile process doesn't grab the DLL required, and you might need to include that with the distribution of your app. But then you get into the legality of shit and most all the DLLs required are proprietary, on the windows side anyway, and you could get into some serious shit if they find you just passing them around.
But as I said before, doing things in a native language is much better for coding, compiling, and legal reasons. If you insist on python, install the interpreter on the OS or learn a new language.
-
Portable python is also pretty cool, I use it at school.
It works well, comes with some built in handy modules like wxpython : D
-
Have you tried Pyinstaller?
You can create stand alone executables to use on computers without python installed.
Pyinstaller is no 'real' standalone executable. It's a self-extracting executable,that first extracts the files into the temp folder,and then runs the real executeable...
-
True, but if he doesn't want to use Py2exe or portable python...it's an option. ;)
-
There is no reason for him to not want to use py2exe other than being lazy. There is also no other easy way to make a single file executable that I know of which will include the python interpreter. Py2EXE can put everything in to one executable nice and easily, you just have to spend 15 minutes reading the documentation and experiment a bit.
-
It would be way more professionally to just compile the converted files to a self-extracting archieve with iexpress.exe ;)
But this works only if there's no folder created,as iexpress doesn't allow folders, but just files...