Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Win32: python-network-installation?

2 views
Skip to first unread message

Holger Jannsen

unread,
Jul 7, 1999, 3:00:00 AM7/7/99
to
High,

we've got an intranet with several linux- and WinNT-servers and
many Win32-clients (Win95/98).
It must be possible to run on every machine my python-scripts,
but I don't like to install every time the newest python-version
on every client. So I thought about a chance to make the python.exe
and pythonw.exe available on every client by net. I only would have to
administrate one installation on one server and every client could
run the python-scripts, too.

For a first idea is to manage this by manipulate registry-entries
on client by only executing a *.reg-file onto this machines.

Is this possible?
What do I have to do?

thanx,
Holger

Holger Jannsen

unread,
Jul 7, 1999, 3:00:00 AM7/7/99
to
To stop some people burning their brains I've made some
of the job already:

I summarized all registry-entries from my installation
and changed paths inside to server-UNC-Paths (file appended!).
I've made a test-server installation on my server 'as1'
where the directory 'python' is opened for everybody inside
intranet.
To reach Python-dlls I copied the dlls '\WinNT\System32\PythonCOM15.dll'
and '\WINNT\System32\Python15.dll' to a directory '\\as1\python\dll'
onto the server.

Just tested that construction:
1)starting python-scripts via double-click works fine
2)starting python.exe or pythonw.exe with
'\\as1\python\pythonw.exe' works fine ,too
3)only '\\as1\python\pythonwin\pythonwin.exe' occurs a
'Microsoft Visual C++ Runtime Library'-RuntimeError:
Program: \\as1\python\pythonwin\pythonwin.exe
abnormal program termination

What do you think, does I forget any dll? Why does that error (3)
occur? (Perhaps I need that pythonwin.exe to check some
scripts when sitting at a client...?!)

What's about that registry-file? Do I really need all that entries?
What entries could I dismiss?

Are there other (better) ways to get a network installation for Win32-Clients?

by,
Holger

--------------------ClientReg.reg------------
REGEDIT4

[HKEY_CLASSES_ROOT\.py]
@="Python.File"
"Content Type"="text/plain"

[HKEY_CLASSES_ROOT\.pyc]
@="Python.CompiledFile"

[HKEY_CLASSES_ROOT\.pyc]
@="Python.CompiledFile"

[HKEY_CLASSES_ROOT\.pyo]
@="Python.CompiledFile"

[HKEY_CLASSES_ROOT\.pyw]
@="Python.NoConFile"
"Content Type"="text/plain"

[HKEY_CLASSES_ROOT\Python.CompiledFile]
@="Compiled Python File"

[HKEY_CLASSES_ROOT\Python.CompiledFile\DefaultIcon]
@="\\\\as1\\Python\\pyc.ico"

[HKEY_CLASSES_ROOT\Python.CompiledFile\shell]

[HKEY_CLASSES_ROOT\Python.CompiledFile\shell\open]

[HKEY_CLASSES_ROOT\Python.CompiledFile\shell\open\command]
@="\\\\as1\\Python\\python.exe \"%1\" %*"

[HKEY_CLASSES_ROOT\Python.File]
@="Python File"

[HKEY_CLASSES_ROOT\Python.File\AutoRegister]
@="\\\\as1\\Python\\DLL\\PythonCOM15.dll"

[HKEY_CLASSES_ROOT\Python.File\DefaultIcon]
@="\\\\as1\\Python\\Py.ico"

[HKEY_CLASSES_ROOT\Python.File\shell]

[HKEY_CLASSES_ROOT\Python.File\shell\Edit]

[HKEY_CLASSES_ROOT\Python.File\shell\Edit\command]
@="\\\\as1\\Python\\Pythonwin\\pythonwin.exe /edit \"%1\""

[HKEY_CLASSES_ROOT\Python.File\shell\open]

[HKEY_CLASSES_ROOT\Python.File\shell\open\command]
@="\\\\as1\\Python\\python.exe \"%1\" %*"

[HKEY_CLASSES_ROOT\Python.NoConFile]
@="Python File (no console)"

[HKEY_CLASSES_ROOT\Python.NoConFile\DefaultIcon]
@="\\\\as1\\Python\\Py.ico"

[HKEY_CLASSES_ROOT\Python.NoConFile\shell]

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\Edit]

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\Edit\command]
@="\\\\as1\\Python\\Pythonwin\\pythonwin.exe /edit \"%1\""

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\open]

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\open\command]
@="\\\\as1\\Python\\pythonw.exe \"%1\" %*"


[HKEY_CURRENT_USER\Software\Python]

[HKEY_CURRENT_USER\Software\Python\Python for Win32]

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Editor]
"Tab Size"=dword:00000008
"Indent Size"=dword:00000008
"Use Tabs"=dword:00000001
"Auto Reload"=dword:00000001
"Backup Type"=dword:00000003
"Smart Tabs"=dword:00000000
"Default Font"="(-134217665, 0, 200, 0, 0, 0, 49, 'Courier')"

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Format]
"Syntax"="{7: (-1073741821, 0, 200, 0, 0), 6: (-1073741821, 0, 200, 0, 0), 5:
(-1073741821, 1, 200, 0, 8388608), 4: (-1073741821, 0, 200, 0, 8421376), 3: (-1073741821,
0, 200, 0, 128), 2: (-1073741821, 2, 200, 0, 32768), 1: (-1073741821, 1, 200, 0, 255)}"

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Interactive Window]
"left"=dword:0000001a
"top"=dword:00000043
"right"=dword:00000376
"bottom"=dword:00000176
"FormatTitle"="(-536870897, 0, 220, 0, 16711680, 184, 34, 'Arial')"
"FormatInput"="(-134217665, 0, 200, 0, 0, 0, 49, 'Courier')"
"FormatOutput"="(-134217665, 0, 200, 0, 8421376, 0, 49, 'Courier')"
"FormatOutputError"="(-134217665, 0, 200, 0, 255, 0, 49, 'Courier')"
"Show at startup"=dword:00000001

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Main Window]
"left"=dword:0000007b
"top"=dword:000000bf
"right"=dword:0000037b
"bottom"=dword:000002d8

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Python]

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Python Trace Collector]
"left"=dword:00000016
"top"=dword:00000016
"right"=dword:0000034c
"bottom"=dword:000001da

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Recent File List]

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Settings]
"Recent File List Size"=dword:0000000a

[HKEY_CURRENT_USER\Software\Python\Python for Win32\ToolbarDefault-Bar0]
"BarID"=dword:0000e801

[HKEY_CURRENT_USER\Software\Python\Python for Win32\ToolbarDefault-Bar1]
"BarID"=dword:0000e800
"XPos"=dword:00000071
"YPos"=dword:fffffffe
"MRUWidth"=dword:00000153
"Docking"=dword:00000001
"MRUDockID"=dword:0000e81b
"MRUDockLeftPos"=dword:00000071
"MRUDockTopPos"=dword:fffffffe
"MRUDockRightPos"=dword:000001d4
"MRUDockBottomPos"=dword:0000001e
"MRUFloatStyle"=dword:00002004
"MRUFloatXPos"=dword:80000000
"MRUFloatYPos"=dword:00000000

[HKEY_CURRENT_USER\Software\Python\Python for Win32\ToolbarDefault-Bar2]
"BarID"=dword:0000e81b
"Bars"=dword:00000003
"Bar#0"=dword:00000000
"Bar#1"=dword:0000e800
"Bar#2"=dword:00000000

[HKEY_CURRENT_USER\Software\Python\Python for Win32\ToolbarDefault-Summary]
"Bars"=dword:00000003
"ScreenCX"=dword:00000400
"ScreenCY"=dword:00000300

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Tools Menu]

[HKEY_CURRENT_USER\Software\Python\Python for Win32\Tools Menu\1]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.py]
@="Python.File"
"Content Type"="text/plain"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pyc]
@="Python.CompiledFile"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pyo]
@="Python.CompiledFile"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pyw]
@="Python.NoConFile"
"Content Type"="text/plain"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.CompiledFile]
@="Compiled Python File"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.CompiledFile\DefaultIcon]
@="\\\\as1\\Python\\pyc.ico"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.CompiledFile\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.CompiledFile\shell\open]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.CompiledFile\shell\open\command]
@="\\\\as1\\Python\\python.exe \"%1\" %*"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File]
@="Python File"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\AutoRegister]
@="\\\\as1\\python\\DLL\\PythonCOM15.dll"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\DefaultIcon]
@="\\\\as1\\Python\\Py.ico"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shell\Edit]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shell\Edit\command]
@="\\\\as1\\Python\\Pythonwin\\pythonwin.exe /edit \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shell\open]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shell\open\command]
@="\\\\as1\\Python\\python.exe \"%1\" %*"


[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.NoConFile]
@="Python File (no console)"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.NoConFile\DefaultIcon]
@="\\\\as1\\Python\\Py.ico"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.NoConFile\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.NoConFile\shell\Edit]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.NoConFile\shell\Edit\command]
@="\\\\as1\\Python\\Pythonwin\\pythonwin.exe /edit \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.NoConFile\shell\open]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.NoConFile\shell\open\command]
@="\\\\as1\\Python\\pythonw.exe \"%1\" %*"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Python.exe]
@="\\\\as1\\Python\\Python.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Pythonwin.exe]
@="\\\\as1\\Python\\Pythonwin\\Pythonwin.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python]

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore]

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5]

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\Dll]
@="\\\\as1\\python\\DLL\\Python15.dll"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\Help]

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\Help\Main Python Documentation]
@="\\\\as1\\Python\\Doc\\index.html"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\Help\Python COM Reference]
@="\\\\as1\\Python\\win32com\\win32com.hlp"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\Help\Pythonwin Reference]
@="\\\\as1\\Python\\Pythonwin\\Help\\Pythonwin.hlp"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\Help\Win32 Extensions]
@="\\\\as1\\Python\\win32\\Help\\Python Win32 Extensions.hlp"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\InstallPath]
@="\\\\as1\\Python"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\InstallPath\InstallGroup]
@="Python 1.5"

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\Pythonwin]

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\Pythonwin\Build]
@="123"
---------------End of ClientReg.reg------------

Mark Hammond

unread,
Jul 8, 1999, 3:00:00 AM7/8/99
to
Holger Jannsen wrote in message
<37835B30...@phoenix-edv.netzservice.de>...

>To reach Python-dlls I copied the dlls '\WinNT\System32\PythonCOM15.dll'
>and '\WINNT\System32\Python15.dll' to a directory '\\as1\python\dll'
>onto the server.

Dont forget pywintypes15.dll.

>3)only '\\as1\python\pythonwin\pythonwin.exe' occurs a
> 'Microsoft Visual C++ Runtime Library'-RuntimeError:
> Program: \\as1\python\pythonwin\pythonwin.exe
> abnormal program termination
>
>What do you think, does I forget any dll? Why does that error (3)
>occur? (Perhaps I need that pythonwin.exe to check some
>scripts when sitting at a client...?!)

That error normally means 2 Python DLLs were found. My guess is either
pythoncom15.dll or pywintypes15.dll.

The more I think about it, the problem is almost certainly the fact that
win32api.pyd, win32ui.pyd etc all use pywintypes15.dll - not as a Python
module, but as a regular DLL. So assuming you still have pywintypes15.dll
in your system directory, the DLL load process will be:

* Python does "import win32api" - part of the NT process finds and loads
pywintypes15.dll, probably from the system directory.
* Python does "import pywintypes" - Python searches for Pywintypes, consults
the registry and finds it listed somewhere else. Python loads this DLL.

Things then go boom very quickly.

I would put all the DLLs (not necessarily .pyds, but python15.dll,
pywintypes15.dll, pythoncom15.dll) and all the .EXEs (python.exe,
pythonw.exe and pythonwin.exe) into the same directory. Then seek out and
destroy all other copies of these files from your machine.

>Are there other (better) ways to get a network installation for
Win32-Clients?

Nope, but feel free to help :-)

>[HKEY_CURRENT_USER\Software\Python\Python for Win32]

ALL of these HKCU\Software\Python\Python for Win32" entries should go. the
installer doesnt create them - Pythonwin does when it shuts down for the
first time. Unless there are specific preferences you want to default for
these users, dont add them.

>[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\AutoRegister]
>@="\\\\as1\\python\\DLL\\PythonCOM15.dll"

Dunno where this came from - the installer didnt add it.

>[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5]

You are missing all the important ones - PythonPath and Modules keys are
critical for the win32 extensions to work.

Note the installer sources are on my starship page (in the "buildtools"
archive).

Also note you can become a registered user :-)
http://starship.python.net/crew/mhammond/registration

Mark.


Holger Jannsen

unread,
Jul 12, 1999, 3:00:00 AM7/12/99
to
Hi Mark,

Mark Hammond answered:


>
> Holger Jannsen wrote in message
> <37835B30...@phoenix-edv.netzservice.de>...
>

> >To reach Python-dlls I copied the dlls '\WinNT\System32\PythonCOM15.dll'
> >and '\WINNT\System32\Python15.dll' to a directory '\\as1\python\dll'
> >onto the server.
>

> Dont forget pywintypes15.dll.

Ouch, yeah! Thanx;-)

> >3)only '\\as1\python\pythonwin\pythonwin.exe' occurs a
> > 'Microsoft Visual C++ Runtime Library'-RuntimeError:
> > Program: \\as1\python\pythonwin\pythonwin.exe
> > abnormal program termination
> >
> >What do you think, does I forget any dll? Why does that error (3)
> >occur? (Perhaps I need that pythonwin.exe to check some
> >scripts when sitting at a client...?!)
>

> That error normally means 2 Python DLLs were found. My guess is either
> pythoncom15.dll or pywintypes15.dll.

It was because of pywintypes15.dll missing. Now I only get module
'win32ui.pyd' missing. Check that tomorrow, I think...


> The more I think about it, the problem is almost certainly the fact that
> win32api.pyd, win32ui.pyd etc all use pywintypes15.dll - not as a Python
> module, but as a regular DLL. So assuming you still have pywintypes15.dll
> in your system directory, the DLL load process will be:
>
> * Python does "import win32api" - part of the NT process finds and loads
> pywintypes15.dll, probably from the system directory.
> * Python does "import pywintypes" - Python searches for Pywintypes, consults
> the registry and finds it listed somewhere else. Python loads this DLL.
>
> Things then go boom very quickly.
>
> I would put all the DLLs (not necessarily .pyds, but python15.dll,
> pywintypes15.dll, pythoncom15.dll) and all the .EXEs (python.exe,
> pythonw.exe and pythonwin.exe) into the same directory. Then seek out and
> destroy all other copies of these files from your machine.
>

> >Are there other (better) ways to get a network installation for
> Win32-Clients?
>

> Nope, but feel free to help :-)

I think to make that easy registry-changes is a good way..;-)
Don't like to spent more time than usual on it.



> >[HKEY_CURRENT_USER\Software\Python\Python for Win32]

> ALL of these HKCU\Software\Python\Python for Win32" entries should go. the
> installer doesnt create them - Pythonwin does when it shuts down for the
> first time. Unless there are specific preferences you want to default for
> these users, dont add them.

Ok. Checked!



> >[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\AutoRegister]
> >@="\\\\as1\\python\\DLL\\PythonCOM15.dll"
>

> Dunno where this came from - the installer didnt add it.

Mmmh. Will check tomorrow...



> >[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5]
>

> You are missing all the important ones - PythonPath and Modules keys are
> critical for the win32 extensions to work.

Yes, could be. It was just a fast run. Have to look some further...



> Note the installer sources are on my starship page (in the "buildtools"
> archive).

Mmmh? Loaded all sources. Couldn't find a special souce/install-file where
I could take all registry-items from.;-(


> Also note you can become a registered user :-)
> http://starship.python.net/crew/mhammond/registration

;-))I'm a poor programmer...;-))))


Ciao,
Holger

0 new messages