Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #!/usr/bin/python3
  2. import subprocess
  3.  
  4. print("Start recording...")
  5. p = subprocess.Popen(("rec", "-q", "out.ogg"))
  6.  
  7. input("Enter to stop: ")
  8. p.terminate()
  9. try:
  10. p.wait(timeout=1)
  11. except subprocess.TimeoutExpired:
  12. p.kill()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement