|
cmkdir(path_to_dir)
Make a directory if it does not exist |
source code
|
|
|
|
|
|
string
|
|
|
|
|
|
|
|
|
file_hashes_are_valid(list_of_files,
fn)
Return true iff the old hashes in the file fn are valid for all of
the specified list of files. |
source code
|
|
|
find_dir(d)
Look upwards for a particular filesystem directory d as a
subdirectory of one of the ancestors. |
source code
|
|
|
|
string or list of strings
|
|
|
gcc_version_test(major,
minor,
rev,
gstr)
Return True if the specified gcc version string (gstr) is at or after
the specified major,minor,revision args |
source code
|
|
|
|
string
|
|
|
get_gcc_version(gcc)
Return the compressed version number of gcc |
source code
|
|
float
|
|
string
|
|
|
glob(s)
Run the normal glob.glob() on s but make sure all the slashes are
flipped forward afterwards. |
source code
|
|
|
|
|
hash_files(list_of_files,
fn)
Hash the files in the list of files and write the hashes to fn |
source code
|
|
|
hash_list(list_of_strings)
Compute a sha1 hash of a list of strings and return the hex digest |
source code
|
|
|
hash_string(s)
Compute a sha1 hash of a string and return the hex digest |
source code
|
|
string
|
join(*args)
join all the args supplied as arguments using a forward slash as the
separator |
source code
|
|
|
|
|
|
|
make_executable(fn)
Make the file or directory readable & executable by user/group,
writable by user |
source code
|
|
|
make_read_only(fn)
Make the file fn read-only |
source code
|
|
|
make_web_accessible(fn)
Make the file readable by all and writable by the current owner |
source code
|
|
|
make_web_accessible_dir(dir)
Make the directory readable and executable by all and writable by the
current owner |
source code
|
|
|
make_writable(fn)
Make the file or directory readable/writable/executable by me |
source code
|
|
|
modify_dir_tree(path,
dir_fn=None,
file_fn=None)
Walk the tree rooted at path and apply the function dir_fn to
directories and file_fn to files. |
source code
|
|
|
move_file(src,
tgt)
Move/Rename src to tgt. |
source code
|
|
string
|
myjoin(*args)
join all the args supplied as arguments using _mysep as the
separator. |
source code
|
|
|
peel_dir(s,
n)
Remove n trailing path components from s by calling os.path.dirname() |
source code
|
|
string or list of strings
|
|
string or list of strings
|
|
|
|
|
qdip(fn)
Add quotes to a string if there are spaces in the name |
source code
|
|
|
|
|
read_signatures(fn)
Return a dictionary of d[file]=hash from the specified file |
source code
|
|
|
|
|
|
|
remove_files_from_tree(dir,
file_patterns)
Remove files that match the re object compiled pattern provided |
source code
|
|
|
|
|
|
integer
|
run_cmd_io(cmd,
fn_i,
fn_o,
shell_executable=None,
directory=None)
Run a command string using the subprocess module. |
source code
|
|
tuple
|
run_command(cmd,
separate_stderr=False,
shell_executable=None,
directory=None,
osenv=None,
input_file_name=None,
**kwargs)
Run a command string using the subprocess module. |
source code
|
|
tuple
|
run_command_output_file(cmd,
output_file_name,
shell_executable=None,
directory=None,
osenv=None,
input_file_name=None,
**kwargs)
Run a command string using the subprocess module. |
source code
|
|
tuple return: (return code, list of stdout+stderr lines)
|
run_command_timed(cmd,
shell_executable=None,
directory=None,
osenv=None,
seconds=0,
input_file_name=None,
**kwargs)
Run a timed command. |
source code
|
|
tuple
|
run_command_unbufferred(cmd,
prefix_line=None,
shell_executable=None,
directory=None,
osenv=None,
input_file_name=None,
**kwargs)
Run a command string using the subprocess module. |
source code
|
|
string
|
|
|
|
|
|
|
write_signatures(fn,
d)
Write a dictionary of d[file]=hash to the specified file |
source code
|
|