Re: Popen in main and subprocess

2012-01-28 Thread Thomas Rachel
Am 28.01.2012 11:19 schrieb pistacchio: the following code (in the main thread) works well, I grep some files and the search until the first 100 results are found (writing the results to a file), then exit: command = 'grep -F "%s" %s*.txt' % (search_string, DATA_PATH) p = Popen(['/bin

Popen in main and subprocess

2012-01-28 Thread pistacchio
the following code (in the main thread) works well, I grep some files and the search until the first 100 results are found (writing the results to a file), then exit: command = 'grep -F "%s" %s*.txt' % (search_string, DATA_PATH) p = Popen(['/bin/bash', '-c', command], stdout = PIPE) f