possible to run a python script without installing python?

Discussion in 'Python' started by davidj411, Mar 15, 2011.

  1. davidj411

    davidj411 Guest

    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.
    davidj411, Mar 15, 2011
    #1
    1. Advertising

  2. davidj411

    scattered Guest

    On Mar 15, 4:58 pm, davidj411 <> wrote:
    > 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.
    scattered, Mar 16, 2011
    #2
    1. Advertising

  3. davidj411

    Terry Reedy Guest

    On 3/15/2011 4:58 PM, davidj411 wrote:
    > 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.

    --
    Terry Jan Reedy
    Terry Reedy, Mar 16, 2011
    #3
  4. davidj411

    anpeo Guest

    On Mar 16, 1:15 am, Terry Reedy <> wrote:
    > On 3/15/2011 4:58 PM, davidj411 wrote:
    >
    > > 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.
    >
    > --
    > Terry Jan Reedy


    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
    anpeo, Mar 16, 2011
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    464
  2. Replies:
    9
    Views:
    956
    Paddy O'Loughlin
    Feb 27, 2009
  3. Rubyist
    Replies:
    12
    Views:
    178
    David Vallner
    Feb 15, 2006
  4. The Duke of Dunstable

    Installing a cgi script without shell access

    The Duke of Dunstable, Feb 14, 2005, in forum: Perl Misc
    Replies:
    1
    Views:
    167
    Tintin
    Feb 14, 2005
  5. hara
    Replies:
    6
    Views:
    155
    Peter Scott
    May 27, 2006
Loading...

Share This Page