Skip to content

Instantly share code, notes, and snippets.

Created November 24, 2013 20:00
Show Gist options
  • Save anonymous/7631688 to your computer and use it in GitHub Desktop.
Save anonymous/7631688 to your computer and use it in GitHub Desktop.
test
import sublime
import sublime_plugin
import subprocess
import threading
class OpenNotepadCommand(sublime_plugin.TextCommand):
def run(self, edit, filename=None):
th = NotepadThread(filename)
th.start()
class NotepadThread(threading.Thread):
def __init__(self, filename=None):
self.filename = filename
threading.Thread.__init__(self)
def run(self):
if self.filename is not None:
subprocess.call("notepad.exe %s" % self.filename)
else:
subprocess.call("notepad.exe")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment