python Programming Glossary: do_more_things
Does python officially support reusing a loop-variable after the loop? http://stackoverflow.com/questions/10563613/does-python-officially-support-reusing-a-loop-variable-after-the-loop code bad practice for i in some_values do_whatever i do_more_things i Somehow it feels to me like the variable i should remain in..
Is there any way to pass 'stdin' as an argument to another process in python? http://stackoverflow.com/questions/8976962/is-there-any-way-to-pass-stdin-as-an-argument-to-another-process-in-python text sys.stdin.readline print hello text time.sleep 3 def do_more_things while True # some code here time.sleep 60 5 if __name__ '__main__'.. '__main__' p1 Process target get_input args p1.start do_more_things so I really need to run get_input function parallelly with main.. question The simplest thing is to swap get_input and do_more_things i.e. read sys.stdin in the parent process def get_input stdin..
|