Andre van der Vlies said: > > Hoi, > Is er een 'diskusage' (du ...) thingy in python? Voordat ik weer > 'ingewikkeld' ga doen...... >
Sorry, Te vroeg geschreeuwd, dit is (ongeveer) wat ik wil: #!/usr/local/bin/python import os total = 0 def visit(arg, top, files): global total for file in files: arg += os.lstat("%s/%s" % (top,file))[6] total += arg os.path.walk('.', visit, total) print "Total %d" % total -- Andre van der Vlies <[EMAIL PROTECTED]> Certifiable UNIX engineer Homepage: http://vandervlies.xs4all.nl/~andre Key fingerprint = 397C 7479 67DB 9306 23DC B423 7B58 CD5A 6EFF 5CF8 -- () ascii ribbon campaign - against html e-mail /\ - against microsoft attachments ^[^#] -- _______________________________________________ Python-nl mailing list Python-nl@python.org http://mail.python.org/mailman/listinfo/python-nl