Re: Difference between Popen and open() for reading a file

2010-04-30 Thread Aahz
In article mailman.2142.1271960906.23598.python-l...@python.org, J dreadpiratej...@gmail.com wrote: Say I had a file, foo.txt that I wanted to read from, only one time and only read. So what's the difference between this: mylist = Popen([cat,foo.txt], stdout=PIPE).communicate()[0].splitlines()

Difference between Popen and open() for reading a file

2010-04-22 Thread J
I was reading something from a code review a little while ago and saw something that's got my curiosity up... Say I had a file, foo.txt that I wanted to read from, only one time and only read. So what's the difference between this: mylist = Popen([cat,foo.txt],

Re: Difference between Popen and open() for reading a file

2010-04-22 Thread Chris Rebert
On Thu, Apr 22, 2010 at 11:28 AM, J dreadpiratej...@gmail.com wrote: I was reading something from a code review a little while ago and saw something that's got my curiosity up... Say I had a file, foo.txt that I wanted to read from, only one time and only read. So what's the difference

Re: Difference between Popen and open() for reading a file

2010-04-22 Thread MRAB
J wrote: I was reading something from a code review a little while ago and saw something that's got my curiosity up... Say I had a file, foo.txt that I wanted to read from, only one time and only read. So what's the difference between this: mylist = Popen([cat,foo.txt],

Re: Difference between Popen and open() for reading a file

2010-04-22 Thread Dave Angel
J wrote: I was reading something from a code review a little while ago and saw something that's got my curiosity up... Say I had a file, foo.txt that I wanted to read from, only one time and only read. So what's the difference between this: mylist = Popen([cat,foo.txt],

Re: Difference between Popen and open() for reading a file

2010-04-22 Thread J
On Thu, Apr 22, 2010 at 15:18, Dave Angel da...@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