diff --git a/tdir b/tdir index ecbcec1..88d5850 100755 --- a/tdir +++ b/tdir @@ -4,11 +4,18 @@ Copyright (c) 2001, TundraWare Inc., All Rights Reserved. """ +# python Library Imports + import getopt import os import string import sys +# Version info + +VERSION = "$Id: tdir,v 1.52 2001/06/24 00:54:18 tundra Exp $" + + # Booleans FALSE = 0 @@ -19,8 +26,7 @@ OWIDTH = 80 # Output width COLWIDTH = 19 # Width of each column TWIDTH = COLWIDTH - 1 # Text width -MAXCOL = OWIDTH/COLWIDTH # Number of output columns -INDENT = OWIDTH%COLWIDTH # Indentation of main listing +MAXCOL, INDENT = divmod(OWIDTH, COLWIDTH) # No of output cols & indent PAD = " " # Padding character SEP = "." # Filename "extension" separator TRUNC = "^" # Character indicating name truncation @@ -28,7 +34,7 @@ # Misc. RECURSE = FALSE # No recursion is the default -VERSION = "tdir Version 1.51 - Released 2001-06-20" + def OrderByExtension(list): ExtList = {} @@ -140,8 +146,7 @@ sys.exit(2) TWIDTH = COLWIDTH - 1 # Text width -MAXCOL = OWIDTH/COLWIDTH # Number of output columns -INDENT = OWIDTH%COLWIDTH # Indentation of main listing +MAXCOL, INDENT = divmod(OWIDTH, COLWIDTH) # No of output cols & indent if len(args) == 0: # Default to local directory if none given args = ["./"]