software design question

Josiah Carlson jcarlson at nospam.uci.edu
Thu Feb 12 15:49:47 EST 2004


> A quick data point:
> 
>  >>> import os
>  >>> wc = os.popen(r'wc D:\Python23\Lib\*py').readlines()
>  >>> sum([int(x.split()[0]) for x in wc[:-1] if x])/float(len(wc)-1)
>  412.61621621621623
>  >>> print wc[-1]
>        76334     250898    2657018       Totals
> 
> Gotta go...

I'm going to have to remember wc.  That is sweet.

  - Josiah



More information about the Python-list mailing list