Windows URL protocol handler in python?

J

john.burton

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.
 
J

John J. Lee

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
 
J

JanC

(e-mail address removed) 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 ------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top