Another collection of utilities
Project description
logging
logging consists of the following classes and functions to help with the burden of logging
RelativePathRotatingFileHandler
Not sure if this is working properly
get_logger()
This function retrieves a logger for your file and function/method. This should be called first. For example:
logger = get_logger()
logger.debug("Hello world")
start_function(logger, **kwargs)
This function tags the log file with the entry of a function/method. You may turn it on or off in your logging configuration
def my_function()
logger = get_logger()
start_function("You may optionally add information in the kwarks here")
end_function(logger, **kwargs)
This function tags the log file with the exit of a function/method. You may turn it on or off in your logging configuration
def my_function()
logger = get_logger()
a = 1 + 2
end_function("the value of a is {}".format(a))
os
os consists of the following classes and functions
UnhandledOs
This is raised when the library does not recognize the operating system
list_timezones()
This function returns all known timezones
get_timezone()
This function returns the timezone selected by the operating system
kill_process(name)
This function kills the specified process name
is_running(name)
This function returns whether the specified process name is currently running
os_type()
This function returns the operating system type
get_ip_addresses()
This function returns all IP addresses on this hardware
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for thompcoutils-0.0.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22a70d106aeb16983fe15f148d4eaf764bfeebb6c8ac4c22e7868352fd6e68aa |
|
MD5 | 1c45da6ab73cb14fa7ac9708a986bf61 |
|
BLAKE2b-256 | 634609d736a593e5582bcdef0bbe463f05adb7004b8448dd7b416ac4524d28f3 |