EvilZone

Programming and Scripting => Scripting Languages => : Ragehottie May 15, 2012, 02:18:47 AM

: [Python] Run a Python script without Python
: 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.
: Re: [Python] Run a Python script without Python
: F1.z3ro May 15, 2012, 04:17:51 AM
Have you tried Pyinstaller? 


You can create stand alone executables to use on computers without python installed.
: Re: [Python] Run a Python script without Python
: techb May 15, 2012, 04:36:00 AM
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#.
: Re: [Python] Run a Python script without Python
: techb May 15, 2012, 05:07:23 AM
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.
: Re: [Python] Run a Python script without Python
: Lionofgod May 15, 2012, 01:30:04 PM
Portable python is also pretty cool, I use it at school.
It works well, comes with some built in handy modules like wxpython : D
: Re: [Python] Run a Python script without Python
: Area_13org May 20, 2012, 02:14:53 PM
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...
: Re: [Python] Run a Python script without Python
: F1.z3ro May 21, 2012, 05:00:25 AM
True, but if he doesn't want to use Py2exe or portable python...it's an option.     ;)
: Re: [Python] Run a Python script without Python
: centizen May 21, 2012, 06:19:23 PM
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.
: Re: [Python] Run a Python script without Python
: flowjob May 21, 2012, 06:39:27 PM
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...