Other sources

Controller

Uses to connect the UI with the Core

class odin.source.controller.Controller(ui, parent=None)

UI Controller.

Parameters
  • ui (callable(QMainWindow)) –

  • parent (Optional[QApplication]) –

Return type

NoReturn

Common

Common methods used anywhere

Concat

common.concat(**kwargs)

Safe string concatenation. Do not accept None for the moment.

Parameters
  • *args – multiple input except None

  • **kwargs=separator – only accept separator input

  • kwargs (Any) –

Return type

str

Returns

concatenated text

Safe make dirs

common.make_dirs()

Safe make dirs return bool if created of exists.

Parameters

path – directories to create

Return type

bool

Returns

True if path is created, False if path exists

Logger

Note

Logger is still in development and will be upgraded to be used like an API.

class odin.source.logger.StreamToLogger(logger, stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, log_level=20)

Fake file-like stream object that redirects writes to a logger instance.

Parameters
  • logger (logging.Logger) –

  • stream (TextIO) –

  • log_level (int) –

Return type

None

odin.source.logger.log(name)

.

Parameters

name (str) – name to the log

Return type

Logger

Returns

Logger object to interact with the logger