473,668 Members | 2,386 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 5894
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
1317
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
2866
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
2832
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
1191
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
1336
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
2432
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
2846
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
1566
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
1078
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
8459
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
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7398
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
6206
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
4202
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
4376
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2786
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.