<br><div class="gmail_quote">On Thu, Jun 10, 2010 at 4:52 AM, Nobody <span dir="ltr"><<a href="mailto:nobody@nowhere.com">nobody@nowhere.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Also, "ls | grep" may provide a useful tutorial for the subprocess module,<br>
but if you actually need to enumerate files, use e.g. os.listdir/os.walk()<br>
and re.search/fnmatch, or glob. Spawning child processes to perform tasks<br>
which can easily be performed in Python is inefficient (and often creates<br>
unnecessary portability issues).</blockquote><div> </div><div>I agree with you about the portability issue.</div><div><br></div><div>However, *ix shell is turning out pretty prescient in the area of performance - there are few languages that parallelize as well if you code to minimize exec's, or that stay as simple when parallelizing - and with multicore processors taking off...</div>
<div><br></div></div>