docutil/docsvg.py
changeset 2431 6923074540dd
parent 1881 091005ec69c4
child 2628 40c4449001df
equal deleted inserted replaced
2427:9554952d36d7 2431:6923074540dd
    29 import wx
    29 import wx
    30 
    30 
    31 
    31 
    32 def get_inkscape_path():
    32 def get_inkscape_path():
    33     """ Return the Inkscape path """
    33     """ Return the Inkscape path """
    34     import _winreg
    34     from six.moves import winreg
    35     try:
    35     try:
    36         svgexepath = _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE,
    36         svgexepath = winreg.QueryValue(winreg.HKEY_LOCAL_MACHINE,
    37                                         'Software\\Classes\\svgfile\\shell\\Inkscape\\command')
    37                                        'Software\\Classes\\svgfile\\shell\\Inkscape\\command')
    38     except OSError:
    38     except OSError:
    39         svgexepath = _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE,
    39         svgexepath = winreg.QueryValue(winreg.HKEY_LOCAL_MACHINE,
    40                                         'Software\\Classes\\inkscape.svg\\shell\\open\\command')
    40                                        'Software\\Classes\\inkscape.svg\\shell\\open\\command')
    41     svgexepath = svgexepath.replace('"%1"', '')
    41     svgexepath = svgexepath.replace('"%1"', '')
    42     return svgexepath.replace('"', '')
    42     return svgexepath.replace('"', '')
    43 
    43 
    44 
    44 
    45 def open_win_svg(svgexepath, svgfile):
    45 def open_win_svg(svgexepath, svgfile):