Utilities to make it easy to do in python what you can easily do in bash.
def ctime(file):
Returns the creation time of the file
Returns the modification time of the file
Returns the last access 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 newer than file1, returns false if
either file doesn't exist or file1 is newer or has the same mtime.
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.
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.
mtime(file)
def mtime(file):
atime(file)
def atime(file):
fmttime(fstr, timeval)
def fmttime(fstr, timeval):
nt(file0, file1)
def nt(file0, file1):
ot(file0, file1)
def ot(file0, file1):
xl(str, pat)
def xl(str, pat):
xt(str, pat)
def xt(str, pat):