Newbie question...

Ken D'Ambrosio ken at jots.org
Tue Sep 30 04:04:12 CEST 2008


First, apologies for such a newbie question; if there's a better forum 
(I've poked around, some) feel free to point it out to me.  Anyway, a 
mere 25-odd years after first hearing about OOP, I've finally decided to 
go to it, by way of Python.  But this puzzles me:

import commands
free = commands.getoutput("free")
for line in free:
    print line,

Gives:
                           t o t a l               u s e d 
  f r e e
          s h a r e d         b u f f e r s           c a c h e d
M e m :                 5 1 5 9 9 2           4 6 0 4 5 2             5 
5 5 4 0
                    0             7 7 5 1 6             9 1 8 8 4
- / +   b u f f e r s / c a c h e :           2 9 1 0 5 2           2 2 
4 9 4 0

Why are there spaces between everything?  And how do I keep it from 
happening?  *confused*

Thanks much,

-Ken
** Posted from http://www.teranews.com **



More information about the Python-list mailing list