miscset¶
Main module and public API.
Version¶
The library version can be identified by the version object.
Example code:
import miscset
print(miscset.version)
Result:
0.2.3
Direct Imports¶
The module imports to all submodules relevant for public usage, so that a direct import is not necessary. This allows:
Example code:
import miscset
print(miscset.sh.run)
Result:
<function run at 0x7f83dd7d0ef0>
Logging¶
Defines a default logging handler as a
logging.NullHandler to allow usage of loggers
in methods of this package.
The handler can be redefined by a custom python module
importing methods from miscset and to custom logs:
Example code:
import logging
import miscset
handler = logging.StreamHandler()
logger = logging.getLogger()
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
# this command prints now any debug messages using the log handler specified above
out = miscset.sh.run("echo hello")
print(out)
Result:
CompletedProcess(args='bash -s', returncode=0, stdout='hello\n', stderr='')
shell stdin is echo hello
shell runner is ['bash -s']
shell stdout is
hello
shell stderr is
shell return code is 0
Submodules¶
Date and time methods. |
|
Methods to work on file systems. |
|
File and other stream i/o methods. |
|
Shell subprocesses. |
|
Methods to convert data to and from tables (DataFrames). |