A simple debugging tool for Python
Project description
DebugMode
Overview
DebugMode is a class that provides functionality for debugging, logging, and printing messages with different colors.
Methods
__init__(self, debugMode=True, logFile=None)
Initializes the DebugMode instance.
- Args:
debugMode(bool): A flag to enable or disable debug mode. Default is True.logFile(str): The path to a log file. If provided, logs will be written to this file. Default is None.
setDebugMode(self, debugMode)
Sets the debug mode.
- Args:
debugMode(bool): A flag to enable or disable debug mode.
getDebugMode(self)
Returns the current debug mode.
- Returns:
bool: The current debug mode.
debugPrint(self, message=None, fonction=None)
Prints a debug message or executes a function if provided.
- Args:
message(str): The message to print. Default is None.fonction(callable): A function to execute. Default is None.
warningPrint(self, message)
Prints a warning message.
- Args:
message(str): The warning message to print.
logPrint(self, message)
Logs a message to the log file if it is open.
- Args:
message(str): The message to log.
- Raises:
ValueError: If the log file is not open.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mydebug-0.1.1.tar.gz.
File metadata
- Download URL: mydebug-0.1.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f879357c2fd1463495f56c221c449f9c299cf59c6b83bd6c05b1b2566c8b8af
|
|
| MD5 |
f76013d85fcfc8e218b333cc5c787af0
|
|
| BLAKE2b-256 |
1ac36950c42e8a022fa4ade0f0cc3738391414b13e1350ecfd6d395896b94615
|
File details
Details for the file mydebug-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mydebug-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b301a67a14d89f41ecbd7347caa26a37a70cf77806e2f5615e7b5e72e5a890b
|
|
| MD5 |
32d44b285a275d0a25cd5fbe8d00c03f
|
|
| BLAKE2b-256 |
8b3f42736e6ef3677a4d3f92a3c617e817b6f618c30a0eca09e20f749b597453
|