home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Inkscape / Inkscape-0.48.2-1-win32.exe / share / extensions / launch_webbrowser.py < prev    next >
Text File  |  2011-07-08  |  713b  |  22 lines

  1. #!/usr/bin/env python
  2. import webbrowser, threading
  3. from optparse import OptionParser
  4.  
  5. class VisitWebSiteWithoutLockingInkscape(threading.Thread):
  6.     def __init__(self):
  7.         threading.Thread.__init__ (self)
  8.         parser = OptionParser()
  9.         parser.add_option("-u", "--url", action="store", type="string",
  10.                           default="http://www.inkscape.org/",
  11.                           dest="url", help="The URL to open in web browser")
  12.         (self.options, args) = parser.parse_args()
  13.  
  14.     def run(self):
  15.         webbrowser.open(self.options.url)
  16.  
  17. vwswli = VisitWebSiteWithoutLockingInkscape()
  18. vwswli.start()
  19.  
  20.  
  21. # vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 encoding=utf-8 textwidth=99
  22.