Utilities to make it easy to do in python what you can easily do in bash.
def xt(str, pat):
Deletes the trailing substring that matches the pattern pat. pat can contain shell wildcards "*" and "?".
XXX at this time, pattern matching has a problem with other regular
expression metacharacters. They will be used as the would in a regular
expression.
Returns the modification time of the file
Returns true if file0 is newer than file1, returns false if
either file doesn't exist or file1 is newer or has the same mtime.
Returns the creation time of the file
Formats a unix timeval (seconds since the epoch) as a string according
to the rules defined by the format string fstr.
fstr follows the same formatting conventions as strftime. Time zone
is always assumed to be the local timezone.
Returns true if file0 is older than file1, returns false if
either file doesn't exist or file1 is newer or has the same mtime.
Deletes the leading substring that matches the pattern pat.
pat can contain shell wildcards "*" and "?".
XXX at this time, pattern matching has a problem with other regular
expression metacharacters. They will be used as the would in a regular
expression.
Returns the last access time of the file
mtime(file)
def mtime(file):
nt(file0, file1)
def nt(file0, file1):
ctime(file)
def ctime(file):
fmttime(fstr, timeval)
def fmttime(fstr, timeval):
ot(file0, file1)
def ot(file0, file1):
xl(str, pat)
def xl(str, pat):
atime(file)
def atime(file):