dtTimeFrame is a module that pack time track functions and subprocess call functions into one single class.
Project description
dtTimeFrame
dtTimeFrame is a module that pack time track functions and subprocess call functions into one single class.
- Homepage: https://github.com/SotongDJ/dtTimeFrame
Example codes
# import submodule
from dtTimeFrame import timeFrame as timeframe # type: ignore
# Initiation
Tool = libTimeTag.tag()
Tool.log.name = "log.txt" # filename of the log file, store stdout info
Tool.error.name = "err.txt" # filename of the err file, store stderr info
Tool.extra.name = "log.json" # filename of the extra command record, store time stamp, commands and others info
# start logging and write header into log/err files
Tool.start()
# > your code insert here <
# print time stamp with personalized msg
Tool.timeStamp("PREVIEW: show something you want to info")
# command runner, base on subprocess.call()
phrase_str = F"echo this command line"
Tool.runCommand(phrase_str)
# command runner with specific output file
phrase_str = F"echo this command line into specific output file: test.txt"
Tool.runCommand(phrase_str,export_file="test.txt")
# > your code insert here <
# end logging and write footer into log/err files
Tool.stop()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dttimeframe-3.6.0.tar.gz
(16.7 kB
view hashes)
Built Distribution
Close
Hashes for dttimeframe-3.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aace05d981a1a794b89dfbbb4ac63325e72b99f466c47e550d32bf9ed8db6f3 |
|
MD5 | 7c7d1f4e509d210cdb7d05a0455fa142 |
|
BLAKE2b-256 | 399bfd3ef6175885dc6532012ca28cbb5ff64d879aa0002548fcd988871ffe08 |