Guest User

Untitled

a guest
May 26th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import subprocess
  2. subprocess.call("firefox")
  3.  
  4. import threading
  5. import subprocess
  6.  
  7. class RunCommandThread(threading.Thread):
  8. """
  9. Класс для запуска команды в отдельном потоке
  10. """
  11. def __init__(self, command):
  12. self.command = command
  13. threading.Thread.__init__(self)
  14.  
  15. def run(self):
  16. subprocess.call(self.command)
  17.  
  18. RunCommandThread("firefox").start()
Add Comment
Please, Sign In to add comment