A fancy text and logging tool for console applications
Project description
consoleTools
A python module made for server applications for formatting and logging
consoleTools: v0.1.10 (non-stable)
Packaged: Yes
OS Support: OS Independant
What am I?
We needed a logging tool and console display tool with a fancy output with colours, so we quickly whipped this together. Other features will be implemented to this over-time as we need more things in our console apps (main feature is logging).
All logs are stored in logs/
date-log.txt
Usage
#Logging and displaying console output
from consoleTools import consoleDisplay as cd
cd.log('e','I am an error')
cd.log('w','I am a warning')
cd.log('i','I am an informational message')
cd.log('n',"I am a notice and therefore have no formatting as I'm not that important")
cd.log('s','Woo-hoo! Your thing worked')
Other non-major items: cd.clear() - clear console cd.printFile() - print file contents
Questions people asked when making this (but not in their words)
q) B... b... but I don't want it to log to a file Brendan!
a) Well the #### you, we added that:
cd.log('s','I will not log to a file',True)
Add the boolean flag False
and nothing will be logged to a file
q) I don't want to log to logs/
. Why are you making me do this
a) By adding the simple flag file=x
you can set whatever you want there
cd.log('s','I will log to a custom file',file="thisfilecontainsthe.log")
q) I know what happened, but when? a) The log files contain dates and times - just keeping the console nice and clean
Getting Console Tools
Stable
Console tools is easy to install via pip:
pip install Console-Tools
Nightly
Grab this version (may not function at all/function correctly)
git clone https://github.com/dudeisbrendan03/consoleTools.git
pip install -r requirements.txt
(Optional) - Access the module globally:
Move the consoleTools
folder to Python37\Lib\site-packages
Beta
We upload a beta (partially stable) version to PyPI test.
python -m pip install --index-url https://test.pypi.org/simple/ Console-Tools
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 Console_Tools-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8ad954e9f87cf199710936a2035730845ba8984b2585d04fc9085685ca070bc |
|
MD5 | 10c1865edc7e194aea85da2441e133c8 |
|
BLAKE2b-256 | abf275ed7114731d3830aa71661bb9d38420e7175da51849d2b68c5da899532e |