MD Python Library
Project description
MD Python Library
This package contains high level functions for common Python use cases.
Compare Directories
from mdpython.fileutils import compare
cmp = compare.compare_dirs(r"C:\Users\Dell\OneDrive\Desktop\result_9th",
r"C:\Users\Dell\OneDrive\Desktop\result_9th_v2")
cmp.gen_html_report(r"C:\Users\Dell\OneDrive\Desktop\out.html", ["py", "txt",
"json"])
for fl in cmp.files_only_in_right:
if fl.name.endswith("py"):
print(fl.absolute())
Menu based app
from datetime import datetime
from random import randint, choice
from mdpython.uiutils import menu_based_app
def show_date():
print(datetime.now().strftime("%Y-%m-%d"))
def show_time():
print(datetime.now().strftime("%H:%M:%S"))
def show_date_and_time():
print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
def show_random_number():
print(randint(1, 100))
def show_random_color():
print(choice(['red', 'blue', 'green']))
ar = [
["Random", "Random Integer", show_random_number],
["Random", "Random Color", show_random_color],
["Date", "Show Date", show_date],
["Date", "Show Time", show_time],
["Date", "Show Date and Time", show_date_and_time]
]
menu_based_app.start(ar)
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
mdpython-0.0.3.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file mdpython-0.0.3.tar.gz
.
File metadata
- Download URL: mdpython-0.0.3.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63cd6c9daa260e06299e5b32295c808c2207161a93b9fc980578bf463396ef04 |
|
MD5 | fc75c38e04ab9d6bfc8f9b28570e08af |
|
BLAKE2b-256 | 4044e1552764bf29316f0ab76ce02f444f2ae1e2ce17e015e682f55d01538bc2 |
File details
Details for the file mdpython-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: mdpython-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d02a3247237f01565d6245879ab812421f7badb7ef57ce3eb2102f71f0ed116 |
|
MD5 | d150f7ed8c7acfed2a54fa740c44c189 |
|
BLAKE2b-256 | 05a88a52fac830966466b442bd3ccd840e02375d4219cd495d40531617ee8400 |