getting output from a command into a list to work with
Anthony Irwin
nospam at noemailhere.nowhere
Mon May 21 02:49:09 EDT 2007
Hi All,
I would like to run the command below and have each line from the
output stored as an element in a list.
find /some/path/ -maxdepth 1 -type f -size +100000k -exec ls -1 '{}' \
The reason for this is so I can then work on each file in the
following manner
var = command
for i in var:
# do stuff to file code here
not sure the best way to get the output of the command so each line of
output is one element in the list.
--
Kind Regards,
Anthony Irwin
http://www.irwinresources.com
http://www.makehomebusiness.com
email: anthony at above domains, - www.
More information about the Python-list
mailing list