By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,391 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,391 IT Pros & Developers. It's quick & easy.

Windows URL protocol handler in python?

P: n/a
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.

Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"jo*********@jbmail.com" <jo*********@jbmail.com> writes:
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.


Maybe pywin32 can do it. Probably ctypes can do it.

Read up on COM monikers (eg. Essential COM by Don Box).
John
Jul 18 '05 #2

P: n/a
jo*********@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
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.