Running scripts without installing Python?

Discussion in 'Python' started by hepp, Sep 16, 2004.

  1. hepp

    hepp Guest

    Is it possible to run a Python script in Windows without installing
    Python on your machine first?

    At my work we are using a mixed environment - some have Solaris
    workstations and others PC's. I have written an application in
    wxPython that runs in both Unix and Solaris. For the Unix version I
    put an installation of Python on a network drive that everybody can
    access, but in Windows everybody has to download Python and wxPython
    before they can run the application.

    Is it possible to put a global installation on a network drive in
    Windows as well? I tried, but then it complained that it couldn't find
    some dll files when I ran the application from another computer.

    I have also tried to compile the application to an executable binary
    with py2exe, but it didn't work properly.
     
    hepp, Sep 16, 2004
    #1
    1. Advertising

  2. hepp

    Jason Zheng Guest

    hepp wrote:
    > Is it possible to run a Python script in Windows without installing
    > Python on your machine first?
    >
    > At my work we are using a mixed environment - some have Solaris
    > workstations and others PC's. I have written an application in
    > wxPython that runs in both Unix and Solaris. For the Unix version I
    > put an installation of Python on a network drive that everybody can
    > access, but in Windows everybody has to download Python and wxPython
    > before they can run the application.
    >
    > Is it possible to put a global installation on a network drive in
    > Windows as well? I tried, but then it complained that it couldn't find
    > some dll files when I ran the application from another computer.
    >
    > I have also tried to compile the application to an executable binary
    > with py2exe, but it didn't work properly.

    How about compiling it to binary code?
    http://starship.python.net/crew/theller/moin.cgi/Py2Exe
     
    Jason Zheng, Sep 16, 2004
    #2
    1. Advertising

  3. hepp wrote:
    ....>
    > Is it possible to put a global installation on a network drive in
    > Windows as well?

    Sure.
    I tried, but then it complained that it couldn't find
    > some dll files when I ran the application from another computer.

    What dll's did give you trouble?

    --
    Vincent Wehren
    >
    > I have also tried to compile the application to an executable binary
    > with py2exe, but it didn't work properly.
     
    vincent wehren, Sep 17, 2004
    #3
  4. hepp

    Gary Herron Guest

    On Thursday 16 September 2004 12:14 pm, hepp wrote:
    > Is it possible to run a Python script in Windows without installing
    > Python on your machine first?


    If you just pick up the whole directory structure and put it on a
    machine that's never seen python, it will mostly work. Several things
    can fail, but there are work-arounds that are not too difficult:

    The module search path (stored by Python in sys.path) may not pick
    everything up. Running python.exe from the directory it resides
    in will mostly fix this up. Your python script may need
    to explicitly append some paths to sys.path before doing other
    imports. (Yuck -- but not too bad.)

    Windows won't find any of the DLL's that get installed in the
    system32 directory -- the work around is to decide on the working
    directory from which your scripts will be run, and copy any needed
    DLL's into that directory. Then windows will find them.

    I've successfully done this for an application that runs on both
    Windows and Linux, using PIL, numarray, PyOpenGL, GTK+, libglade, and
    gtglext, as well as buchnes of standard library things. It's not a
    picnic, but it can be made to work. Several pieces of win32all need
    special care.

    Gary Herron
     
    Gary Herron, Sep 17, 2004
    #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. Jan Danielsson
    Replies:
    8
    Views:
    631
    Mike Meyer
    Jul 22, 2005
  2. Jp Calderone
    Replies:
    0
    Views:
    461
    Jp Calderone
    Jul 21, 2005
  3. Dale
    Replies:
    2
    Views:
    782
    Mike Meyer
    Jan 11, 2008
  4. davidj411
    Replies:
    0
    Views:
    518
    davidj411
    Jun 27, 2008
  5. Replies:
    13
    Views:
    534
    Anno Siegel
    Sep 10, 2007
Loading...

Share This Page