stewer opened this issue on Jun 28, 2004 ยท 42 posts
TrekkieGrrrl posted Tue, 29 June 2004 at 11:45 AM
This is the script that should register python. But I don't see how to USE it? # # script to register Python 2.0 or later for use with win32all # and other extensions that require Python registry settings # # written by Joakim L for Secret Labs AB / PythonWare # # source: # http://www.pythonware.com/products/works/articles/regpy20.htm import sys from _winreg import * # tweak as necessary version = sys.version[:3] installpath = sys.prefix regpath = "SOFTWAREPythonPythoncore%s" % (version) installkey = "InstallPath" pythonkey = "PythonPath" pythonpath = "%s;%sLib;%sDLLs" % ( installpath, installpath, installpath ) def RegisterPy(): try: reg = OpenKey(HKEY_LOCAL_MACHINE, regpath) except EnvironmentError: try: reg = CreateKey(HKEY_LOCAL_MACHINE, regpath) SetValue(reg, installkey, REG_SZ, installpath) SetValue(reg, pythonkey, REG_SZ, pythonpath) CloseKey(reg) except: print "*** Unable to register!" return print "--- Python", version, "is now registered!" return if (QueryValue(reg, installkey) == installpath and QueryValue(reg, pythonkey) == pythonpath): CloseKey(reg) print "=== Python", version, "is already registered!" return CloseKey(reg) print "*** Unable to register!" print "*** You probably have another Python installation!" return if name == "main": RegisterPy() I tried saving it as a .reg file but that wasn't the way to do it L.. so... then what? Save it as a .py? And run it with.. what?
FREEBIES! | My Gallery | My Store | My FB | Tumblr |
You just can't put the words "Poserites" and "happy" in the same sentence - didn't you know that? LaurieA
Using Poser since 2002. Currently at Version 11.1 - Win 10.