newbie: strange python problem

Steve Holden sholden at holdenweb.com
Mon Apr 14 10:07:33 EDT 2003


"maxx" <nospam at somedomain.com> wrote in message
news:pan.2003.04.10.13.07.59.235430 at somedomain.com...
> 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.
>
Sure. But the subject line should really have been "Python: strange newbie
problem" :-)

Welcome to c.l.py, maxx.

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Did you miss PyCon DC 2003?            Would you come to PyCOn DC 2004?







More information about the Python-list mailing list