factory.py: add new stdin_loop()
factory.py: rewrite run(): move std* processing to another threads; add global sys.stdin processing: now work with interactive tasks