77d65c763568495a6ffc7c15a81964448139f47apjrm#!/usr/bin/env python
e4a094fa5446f7e5e226a3b10fdb7bf676808863JazzyNico# standard library
b0a21b06590b7a9dc9670321ff099f8f711b0701JazzyNicoimport webbrowser
b0a21b06590b7a9dc9670321ff099f8f711b0701JazzyNicoimport threading
77d65c763568495a6ffc7c15a81964448139f47apjrmfrom optparse import OptionParser
e4a094fa5446f7e5e226a3b10fdb7bf676808863JazzyNico# local library
e4a094fa5446f7e5e226a3b10fdb7bf676808863JazzyNicoimport inkex
e4a094fa5446f7e5e226a3b10fdb7bf676808863JazzyNicoinkex.localize()
b0a21b06590b7a9dc9670321ff099f8f711b0701JazzyNico
77d65c763568495a6ffc7c15a81964448139f47apjrmclass VisitWebSiteWithoutLockingInkscape(threading.Thread):
77d65c763568495a6ffc7c15a81964448139f47apjrm def __init__(self):
77d65c763568495a6ffc7c15a81964448139f47apjrm threading.Thread.__init__ (self)
77d65c763568495a6ffc7c15a81964448139f47apjrm parser = OptionParser()
77d65c763568495a6ffc7c15a81964448139f47apjrm parser.add_option("-u", "--url", action="store", type="string",
77d65c763568495a6ffc7c15a81964448139f47apjrm default="http://www.inkscape.org/",
77d65c763568495a6ffc7c15a81964448139f47apjrm dest="url", help="The URL to open in web browser")
77d65c763568495a6ffc7c15a81964448139f47apjrm (self.options, args) = parser.parse_args()
77d65c763568495a6ffc7c15a81964448139f47apjrm
77d65c763568495a6ffc7c15a81964448139f47apjrm def run(self):
b0a21b06590b7a9dc9670321ff099f8f711b0701JazzyNico webbrowser.open(_(self.options.url))
77d65c763568495a6ffc7c15a81964448139f47apjrm
77d65c763568495a6ffc7c15a81964448139f47apjrmvwswli = VisitWebSiteWithoutLockingInkscape()
77d65c763568495a6ffc7c15a81964448139f47apjrmvwswli.start()
77d65c763568495a6ffc7c15a81964448139f47apjrm
77d65c763568495a6ffc7c15a81964448139f47apjrm
a4030d5ca449e7e384bc699cd249ee704faaeab0Chris Morgan# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99