trajOptLib.io package

Submodules

trajOptLib.io.argument module

argument.py

Easy arguments

trajOptLib.io.argument.getOnOffArgs(*args)[source]

Get on-off arguments

trajOptLib.io.fileio module

fileio.py

Useful functions for file io, especially dict of dict type. This type is heavily used for clustered training.

trajOptLib.io.fileio.assignModule(module, dct)[source]

Assign values in dict to the module

trajOptLib.io.fileio.assignModuleByJson(module, fnm)[source]

Change contents of a module by json file

trajOptLib.io.fileio.ddctParse(fnm, thekey=None)[source]

Parse a file that is dict of dict. I wish this is faster than pickle

trajOptLib.io.fileio.ddctSave(fnm, arr, pklmode=False)[source]

Save a dict of dict

trajOptLib.io.fileio.dumpJson(obj, fnm)[source]
trajOptLib.io.fileio.getJson(fnm)[source]

Parse a json file as a dict

trajOptLib.io.fileio.getLogPath(fnm, debug=False)[source]

trajOptLib.io.printio module

printio.py

Control print

class trajOptLib.io.printio.Mute(mute=True, record=False)[source]

Bases: list

Capture std.output.

__init__(mute=True, record=False)[source]
getOutput()[source]

trajOptLib.io.stringio module

stringio.py

Provides subroutines to extract numbers from string

trajOptLib.io.stringio.getNumber(string, mapfun=None)[source]

Parse all numbers from a string

Module contents