Other sources

Controller

Uses to connect the UI with the Core

class odin.source.controller.Controller(ui: callable(QMainWindow), parent: Optional[QApplication] = None)

UI Controller.

Common

Common methods used anywhere

Concat

common.concat(**kwargs: Any) str

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

Parameters
  • *args – multiple input except None

  • **kwargs=separator – only accept separator input

Returns

concatenated text

Return type

str

Safe make dirs

common.make_dirs() bool

Safe make dirs return bool if created of exists :param path: directories to create :type path: str

Returns

True if path is created, False if path exists

Return type

bool

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.

odin.source.logger.log(name: str) logging.Logger
Parameters

name (str) – name to the log

Returns

Logger object to interact with the logger

Return type

logging.Logger