473,549 Members | 2,329 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 5887
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
1308
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)...
1
2858
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...
24
2822
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...
0
1185
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
1331
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
2423
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...
4
2843
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...
29
1552
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
1071
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...
0
7546
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...
0
7740
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. ...
0
7985
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...
1
7503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7830
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...
0
3517
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...
1
1962
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
1
1082
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
784
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...

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.