trajoptlib.io package

Submodules

trajoptlib.io.argument module

argument.py

Easy arguments

trajoptlib.io.argument.get_onoff_args(*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.

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