|
print_timing(msg=None)
Decorator for printing execution time (in mins) of a function
Optionally takes a user-friendly msg as argument. |
source code
|
|
|
is_valid_device(dev)
Checks that dev matches the following regular expression:
/dev/sd[a-z]$ |
source code
|
|
|
is_valid_partition(part)
Checks that part matches the following regular expression:
/dev/sd[a-z][1-9][0-9]?$ |
source code
|
|
|
|
|
|
|
|
|
is_url(url)
Returns True if the provided string is a valid url |
source code
|
|
|
is_iso_time(iso)
Returns True if provided time can be parsed in iso format to a
datetime tuple |
source code
|
|
|
iso_to_datetime_tuple(iso)
Converts an iso time string to a datetime tuple |
source code
|
|
|
datetime_tuple_to_iso(tup)
Converts a datetime tuple to iso time string |
source code
|
|
|
|
|
|
|
|
|
has_required(programs)
Same as check_required but returns False if not all commands exist |
source code
|
|
|
|
|
which(program)
Returns the path to the program provided it exists and is on the
system's PATH |
source code
|
|
|
tailf(filename)
Constantly displays the last lines in filename Similar to 'tail -f'
unix command |
source code
|
|
|
|
|
version_to_float(v)
Convert a Mozilla-style version string into a floating-point number
1.2.3.4, 1.2a5, 2.3.4b1pre, 3.0rc2, etc |
source code
|
|
|
program_version_greater(ver1,
ver2)
Return True if ver1 > ver2 using semantics of comparing version
numbers |
source code
|
|
|
|