473,696 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running scripts without installing Python?

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.
Jul 18 '05 #1
3 5897
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
Jul 18 '05 #2
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.

Jul 18 '05 #3
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

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1319
by: Russell E. Owen | last post by:
I have a Python/Tkinter remote control application and want to add support for running user scripts. I would like the scripts to be written in python, would like them to be able to update Tkinter widgets and (the hard part) would also like them to be capable of pausing until some condition is met (e.g. a remote control command finishes) without hanging the event loop. I plan to add a library of routines to send commands and wait for...
1
2867
by: Rolfe | last post by:
Hi, I struggled, and got mod_python running on Apache/Win2k. Follow these instructions verbatim and you shouldn't have any trouble. These instructions are based on "http://www.modpython.org/live/current/doc-html/inst-testing.html". I've added specific information such as Windows filepaths and filenames so there's no ambiguity on what you should do. I encourage you to copy and paste to avoid typing errors. Cheers, Rolfe
24
2833
by: Mark | last post by:
Hi, I'm new to python and looking for a better idiom to use for the manner I have been organising my python scripts. I've googled all over the place about this but found absolutely nothing. I'm a linux/unix command line guy quite experienced in shell scripts etc. I have a heap of command line utility scripts which I run directly. What is the best way to create python command line scripts but exploit the (loadonly) speed-up benefit of...
0
1192
by: Alan Isaac | last post by:
This is really a repackaging of an earlier question, probably illustrating that I still do not understand relative imports. Suppose I have the package structure (taken from the example at http://www.python.org/dev/peps/pep-0328/) package/ __init__.py subpackage1/ __init__.py
0
1338
by: Alan Isaac | last post by:
What is the recommended packaging of demo scripts or test scripts for a package that has modules that use relative imports? Example: Suppose I have the package structure: package/ __init__.py subpackage1/
1
2434
by: walterbyrd | last post by:
I understand that Python has them, but PHP doesn't. I think that is because mod_php is built into apache, but mod_python is not usually in apache. If mod_python was built into apache, would python still have long running processes (LRP)? Do LRPs have to do with a Python interpreter running all the time? Or is it something else? I also understand that LRPs are the reason that shared hosting is less
4
2848
by: commander_coder | last post by:
Hello, I write a lot of CGI scripts, in Python of course. Now I need to convert some to long-running processes. I'm having trouble finding resources about the best practices to do that. I've found a lot of email discussions that say something like, "You need to educate yourself about the differences when you have long- running processes" but I've not had a lot of luck with finding things that explain the differences. I've seen some...
29
1567
by: joe jacob | last post by:
There are a lot of web frameworks for python like django, mod_python, spyce, turbo gears, Zope, Cherrypy etc. Which one is the best in terms of performance and ease of study.
1
1079
by: martin.nkm | last post by:
Hello, I have two questions. 1/ If I want to use Python and let my WinPC communicate via RS-232 with external embedded computer I know there is a pyserial module, which I can use it. But what will happen if I want to replace RS-232 by USB? I know I can have virtual COM port, but all the configuration parameters basically refer to RS-232 parameters - baudrate, bits, stopbits, parity. In case of USB that's a nonsense I think. Does anybody...
0
8661
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9142
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9008
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7699
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5855
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4353
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4608
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2313
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.