progress: make determinate bar more like wget progress bar
foo [ ] 0/58
foo [> ] 1/58
foo [=> ] 2/58
...
foo [=======================================================> ] 56/58
foo [========================================================> ] 57/58
foo [=========================================================>] 58/58
The bar now has a '>' character at the end. This indicates the direction,
is consistent with the indeterminate '<=>' bar, and looks much nicer.
#!/usr/bin/env python
import errno, os, sys
for f in sys.argv[1:]:
try:
print f, '->', os.readlink(f)
except OSError, err:
if err.errno != errno.EINVAL:
raise
print f, 'not a symlink'
sys.exit(0)