Difference between Popen and open() for reading a file

J dreadpiratejeff at gmail.com
Thu Apr 22 15:54:47 EDT 2010

On Thu, Apr 22, 2010 at 15:18, Dave Angel <davea at ieee.org> wrote:

> The same difference as between handing the paper boy three bucks, versus
> flying to London to open an account, making a deposit, going to a branch in
> Sydney and asking for a bank check, then flying back home and taking the
> paper boy with you to the bank to cash it.
> When you use subprocess, you're creating a whole new process in order the
> copy the file into another one, which you then read.  Takes much more
> resources, time, and is much more likely to break.  For example, what if
> this program runs on a system without "cat" ?
> DaveA

Thanks for this (and the other responses everyone)...  I'm still
really in the "learning" process and the reasons to NOT do it that way
make perfect sense to me (and I love DaveA's explanation)...

Learning something every day...

Though, if I could afford it, I wouldn't mind a trip to London and
then Sydney...

More information about the Python-list mailing list