possible to run a python script without installing python?

D

davidj411

it seems that if I copy the python.exe binary and the folders
associated with it to a server without python, i can run python.
does anyone know which files are important to copy and which can be
omitted?

i know about py2exe and have had no luck with it.
 
S

scattered

it seems that if I copy the python.exe binary and the folders
associated with it to a server without python, i can run python.
does anyone know which files are important to copy and which can be
omitted?

i know about py2exe and have had no luck with it.

Wouldn't figuring out how to use py2exe be, well, *easier* than
figuring out what a minimal install would look like? Your question
can't be answered in the abstract. Something is important if you use
it. Without seeing your code (and without detailed knowledge of Python
internals), there is no way to tell what that might be. You can of
course omit things that you don't use - but because of various
dependencies you might be using a file without knowing it. One of the
purposes of a tool like py2exe is to automatically handle such
dependencies.
 
T

Terry Reedy

it seems that if I copy the python.exe binary and the folders
associated with it to a server without python, i can run python.
does anyone know which files are important to copy and which can be
omitted?

For the 3.2 Windows installation, you should be able to omit Doc,
Lib/test, Lib/turtledemo, and Tools. Three of those are optional
installs anyway. Lib/idlelib could almost certainly go if not running
IDLE from the server (which would be unlikely). If not using tcl/tk,
several files in DLLs, Lib, and libs and the tcl directory can go.

Translate as needed for *nix.
 
A

anpeo

For the 3.2 Windows installation, you should be able to omit Doc,
Lib/test, Lib/turtledemo, and Tools. Three of those are optional
installs anyway. Lib/idlelib could almost certainly go if not running
IDLE from the server (which would be unlikely). If not using tcl/tk,
several files in DLLs, Lib, and libs and the tcl directory can go.

Translate as needed for *nix.

I use cx_freeze witch also works with Python 3.x
Test it, for me it was easier than to figure out what to copy

http://cx-freeze.sourceforge.net/

// Anders
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top