newbie: strange python problem

maxx nospam at somedomain.com
Thu Apr 10 09:07:59 EDT 2003


On Thu, 10 Apr 2003 08:57:04 -0400, Peter Hansen wrote:

> Check the output of "ls -la /" manually... the first line does
> *not* have more than two items in it...  if you were to change
> the first line above to this, it would work, though I suspect
> there is another option to "ls" which would also suppress
> that extra output.
> 
>> for line in os.popen('ls -la /').readlines()[1:]:
> 
> -Peter

Right! A simple mistake, but those are the ones you make taking your
first steps in a new programming language.

maxx




More information about the Python-list mailing list