"Paul Franz" wrote...
: I have looked and looked and looked. But I can not find directions
: on installing the version of Python built using Microsoft's 
: compiler. It builds. I get the dlls and the exe's. But there is no 
: documentation that says how to install what has been built. I have
: read every readme and stop by the IRC channel and there seems to
: be nothing.
: 
: Any ideas where I can look?

Hi Paul,

Try the following. Create a file called python.reg. Then open it
with an editor and add the following lines to it. The lines should
get a CRLF termination, but LF works just fine as well.

You'll need to edit the paths to the files to point to the proper
location of your python executables/dlls.

<snip file="python.reg">
Windows Registry Editor Version 5.00

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

[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]
@="C:\\Python\\DLLs\\pyc.ico"

[HKEY_CLASSES_ROOT\Python.CompiledFile\shell]

[HKEY_CLASSES_ROOT\Python.CompiledFile\shell\open]

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

[HKEY_CLASSES_ROOT\Python.CompiledFile\shellex]

[HKEY_CLASSES_ROOT\Python.CompiledFile\shellex\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

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

[HKEY_CLASSES_ROOT\Python.File\DefaultIcon]
@="C:\\Python\\DLLs\\py.ico"

[HKEY_CLASSES_ROOT\Python.File\shell]

[HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE]

[HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE\command]
@="\"C:\\Python\\pythonw.exe\" \"C:\\Python\\Lib\\idlelib\\idle.pyw\" -n -e 
\"%1\""

[HKEY_CLASSES_ROOT\Python.File\shell\open]

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

[HKEY_CLASSES_ROOT\Python.File\shellex]

[HKEY_CLASSES_ROOT\Python.File\shellex\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

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

[HKEY_CLASSES_ROOT\Python.NoConFile\DefaultIcon]
@="C:\\Python\\DLLs\\py.ico"

[HKEY_CLASSES_ROOT\Python.NoConFile\shell]

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\Edit with IDLE]

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\Edit with IDLE\command]
@="\"C:\\Python\\pythonw.exe\" \"C:\\Python\\Lib\\idlelib\\idle.pyw\" -n -e 
\"%1\""

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\open]

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

[HKEY_CLASSES_ROOT\Python.NoConFile\shellex]

[HKEY_CLASSES_ROOT\Python.NoConFile\shellex\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

[HKEY_CLASSES_ROOT\CLSID\{60254CA5-953B-11CF-8C96-00AA00B8708C}]
@="Shell Extension For Windows Script Host"

[HKEY_CLASSES_ROOT\CLSID\{60254CA5-953B-11CF-8C96-00AA00B8708C}\InProcServer32]
@="C:\\WINDOWS\\system32\\wshext.dll"
"ThreadingModel"="Apartment"


</snip>

NOTE: Make sure there are a couple blank lines at the end of the
file. No need to mess with setting the PATH EV anywhere. The above
registry script registers everything to execute Python as needed.
Double-click upon a test.py file and you'll see the test.pyc file
get created and then you'll see the file run as needed.

If you're curious about to see if those extensions are already set
you can use a cmd.exe prompt to do so with the assoc.exe and the
ftype.exe commands. Not sure if those get installed by default for
Windows though. They might need to get downloaded from Microsoft
in some sort of resource kit. They work with Windows 2000, XP and
possibly earlier versions of Windows.

Let me know if this helps and works for you? Thanks.

-- 
Jim Carlock
http://www.microcosmotalk.com/contact/


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to