summaryrefslogtreecommitdiffstats
path: root/share/extensions/launch_webbrowser.py
blob: d27d6d1f48c9635f286fe9e0fd272456aa807cff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python 
import webbrowser, threading
from optparse import OptionParser

class VisitWebSiteWithoutLockingInkscape(threading.Thread):
    def __init__(self):
        threading.Thread.__init__ (self)
        parser = OptionParser()
        parser.add_option("-u", "--url", action="store", type="string", 
                        default="http://www.inkscape.org/", 
                        dest="url", help="The URL to open in web browser")
        (self.options, args) = parser.parse_args()        

    def run(self):       
        webbrowser.open(self.options.url)
        
vwswli = VisitWebSiteWithoutLockingInkscape()
vwswli.start()