Skip to content

Instantly share code, notes, and snippets.

@barn
Created February 19, 2015 23:55
Show Gist options
  • Save barn/1dcb75f0b476294e59f2 to your computer and use it in GitHub Desktop.
Save barn/1dcb75f0b476294e59f2 to your computer and use it in GitHub Desktop.
Simple pyinstaller failure demo script
#!/usr/bin/env python
import re
import sys
import time
import signal
import subprocess
import multiprocessing
# from xml.dom import minidom
# Try and use the C version, otherwise use the python version.
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
def waiter():
time.sleep(10)
if __name__ == '__main__':
"""
Throw this in ty_launch too, just before we start while 1-ing
"""
queue = multiprocessing.Queue()
p = multiprocessing.Process(target=waiter)
p.start()
# getinput(queue)
# So everything beyond here never happens...
print "whee"
# Wait for the worker to finish
queue.close()
queue.join_thread()
p.join()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment