Windows URL protocol handler in python?

JanC usenet_spam at janc.invalid
Wed Aug 18 14:50:46 EDT 2004


john.burton at jbmail.com schreef:

> Is there a way to make a handler in python presumably using the win32
> extensions to handle URLS of a specific type when they are given to
> windows?
> 
> For example if I want to handle
> myprotocol://server/id
> using my own python program?
> Any suggestions or references would be appreciated.

That's just an entry in the Windows registry

As an example, this is how Xnews does it:

------------------------------ news-url.reg ------------------------------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\news]
@="URL:news Protocol"
"URL Protocol"=""
"EditFlags"=hex:02,00,00,00

[HKEY_CLASSES_ROOT\news\DefaultIcon]
@="\"C:\\Xnews\\Xnews.exe\""

[HKEY_CLASSES_ROOT\news\shell]

[HKEY_CLASSES_ROOT\news\shell\open]

[HKEY_CLASSES_ROOT\news\shell\open\command]
@="\"C:\\Xnews\\Xnews.exe\" /url=\"%1\""
------------------------------ news-url.reg ------------------------------


-- 
JanC

"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9



More information about the Python-list mailing list