Code

d27d6d1f48c9635f286fe9e0fd272456aa807cff
[inkscape.git] / share / extensions / launch_webbrowser.py
1 #!/usr/bin/env python \r
2 import webbrowser, threading\r
3 from optparse import OptionParser\r
4 \r
5 class VisitWebSiteWithoutLockingInkscape(threading.Thread):\r
6     def __init__(self):\r
7         threading.Thread.__init__ (self)\r
8         parser = OptionParser()\r
9         parser.add_option("-u", "--url", action="store", type="string", \r
10                         default="http://www.inkscape.org/", \r
11                         dest="url", help="The URL to open in web browser")\r
12         (self.options, args) = parser.parse_args()        \r
13 \r
14     def run(self):       \r
15         webbrowser.open(self.options.url)\r
16         \r
17 vwswli = VisitWebSiteWithoutLockingInkscape()\r
18 vwswli.start()