Clodoaldo Pinto Neto <[EMAIL PROTECTED]> wrote:
>Fredrik Lundh wrote:
>> this works for me:
>>
>>  >>> f = subprocess.Popen("set | grep IFS", shell=True,
>> stdout=subprocess.PIPE)
>>  >>> f.stdout.readlines()
>> ["IFS=$' \\t\\n'\n"]
>>
>> what does the above return on your machine?
>
>>>> f = subprocess.Popen("set | grep IFS", shell=True, stdout=subprocess.PIPE)
>>>> f.stdout.readlines()
>["BASH_EXECUTION_STRING='set | grep IFS'\n", "IFS=' \t\n"]
>
>I'm on FC5

OK, there's something going on here:
$ set | grep IFS
IFS=$' \t\n'
$ python
Python 2.4.1 (#2, May  5 2005, 11:32:06)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> f = subprocess.Popen("set | grep IFS", shell=True, stdout=subprocess.PIPE)
>>> f.stdout.readlines()
["IFS=' \t\n"]
>>>

(Hmph, I don't have any other non-Windows boxes with >=2.4 to hand.)

-- 
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to