sasnets.util package¶
Submodules¶
sasnets.util.logsql module¶
sasnets.util.p2sql module¶
Utility script that uploads data files to a python script.
Reads files generated by sasmodels and uploads the individual data sessions to a postgres database running on localhost. Slow.
sasnets.util.rnames module¶
-
sasnets.util.rnames.
rnames
(path, p='_all_')[source]¶ Method to collect all filenames of models from a directory.
rnames reads all files contained in path that match the regex p, and outputs the model name to a new file named name. If name exists, it is overwritten.
Parameters: - path – A string representing a filepath.
- p – A regex to match files to.
Returns: None
sasnets.util.tosql module¶
Utility script that uploads data files to a python script.
Reads files generated by sasmodels and uploads the individual data sessions to data.db in a table specified from a command line. Slow.
sasnets.util.utils module¶
Various small utility functions that are reused throughout the program.
-
sasnets.util.utils.
inepath
(pathname)[source]¶ Returns a normalised path given a path. Checks if the path exists and creates the path if it does not. If a directory is specified, appends the current time as the filename.
Parameters: pathname – The pathname to process. Returns: A normalised path, or None.