Can Python be run off of a CD-ROM?
cmkleffner at gmx.de
Wed Dec 3 12:28:25 CET 2003
I've done this with Python-2.3.2-1 on Windows
with installing a 'registry free' Python on
local network. It should work with a CD-ROM
copy as well.
First step is to install Python on a machine
locally as a non-administrator. You could
change this as an option in the Python installer.
The non-admin option ensures, that all needed
DLLs are packed in the Python directory rather the
Windows system directory.
Next step are win32all, wxPython, GTK, pyGTK
and all other needed packages.
This version uses the registry, but the registry
wouldn't be readed if you set the enviroment
variables %PYTHONHOME% and %PYTHONPATH%.
If you want to use pyGTK you have to change the
PATH variable too. For some systems with old versions
of some MS DLLs you may want to ensure that the
DLLs delivered with the Python packages are loaded
at runtime. I use a variable called "PY_DEPRECATED_OS".
All MS DLLs have to be moved in a dedicated directory,
i.e. %PYTHONHOME%DLLs\MS_DLLs . (see example below)
All this enviroment tweaking could be done by startup
batch files instead of changing the enviroment on every
Windows client (except the PY_DEPRECATED_OS variable)
See the Pythonwin.bat file below. You can create startup
files for python, pythonw, idle as needed.
----- Pythonwin.bat example -------------------------------------
if not "x%PYTHONHOME%" == "x" goto _START
rem never overwrite PYTHONHOME, PYTHONPATH und PATH
rem if PYTHONHOME was still set in enviroment
if not "x%OS%" == "xWindows_NT" goto _WINDOWS9X
rem Windows NT and Win9x differs
rem PYTHONPATH for win32all
rem PATH for GTK-2.0
rem PATH for MS DLLs
if "x%PY_DEPRECATED_OS%" == "xTRUE" set
start %PYTHONHOME%pythonwin.exe %*
----- Pythonwin.bat example end ---------------------------------
"BJ MacNevin" <BJ at replyhere.now> wrote in message news:<BhVyb.389117$Tr4.1144562 at attbi_s03>...
> Hi all,
> I teach middle school and am currently trying to bring some computer science
> to the students. Our district has a wonderfully linked network throughout
> all our schools... done via MS Windows Network. In order to protect the
> network, our district's IT department does not want things installed on the
> system (or at least makes it VERY difficult to get it done). SO, I am using
> MSW Logo installed onto a CD-ROM... we just stick in the CD-ROMS and run it
> off of them.
> BUT, I am learning about Python and think it is TERRIFIC! So I wonder if I
> can do the same thing... or something similar? Is there a way to install
> Python on a CD-ROM, too, if we don't need it to be accessed from a command
> BJ MacNevin
More information about the Python-list