Python snips
Memory aid to remember how I did stuff in Python, C++, Linux and Windows.
Showing posts with label
thread
.
Show all posts
Showing posts with label
thread
.
Show all posts
Tuesday, January 4, 2011
Thread
import os
import thread
def run_vlc():
os.chdir("C:\Program Files\VideoLAN\VLC")
os.system("vlc")
def close_vlc():
#code to close vlc
thread.start_new_thread(run_vlc, ())
t=threading.Timer(120.0,close_vlc)
t.start()
Home
Subscribe to:
Posts (Atom)