Associating file types to my Python program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Psymaster

    Associating file types to my Python program

    How could I do that? I'm writing an image viewer and I would
    want to associate all images to be opened with my proggie when
    they are double-clicked.
  • John Roth

    #2
    Re: Associating file types to my Python program


    "Psymaster" <roa81NOSPAM@ho tmail.com> wrote in message
    news:Xns93C2BBA 60F6BEt45fs6vve @130.133.1.4...[color=blue]
    > How could I do that? I'm writing an image viewer and I would
    > want to associate all images to be opened with my proggie when
    > they are double-clicked.[/color]

    Do you really want to do that? I'd advise going a bit
    slow, and just get an item on the context menu for
    starters. Look at HKCR\SystemFile Associations\Im age\Shell
    and put your command in there. It will pop up on
    the context menu for all file extensions that have
    a "PercievedT ype" of "Image", at least under Windows XP.

    Then if you want to make some of them the default,
    you can go ahead, but that's actually a bit more
    difficult since it has to be done file type by file type;
    there's no way of doing it wholesale.

    Just remember one thing: learn the registry editor
    thoroughly first. Appendix A of the Microsoft
    Windows XP Registry Guide can be quite helpful
    if you want to hack file associations.

    John Roth


    Comment

    Working...