Skip to main content

This is a lib to improove native fonction, and some usefull one for everyone.

Project description

This is a lib to improove input() fonction.

DOCS:
cls() fonction :

-> clear console

Binput() fonction:
take multiple arguments :

Input_message : By default it’s “”. This is the message which is going to be with the input() ex : Binput(Input_message = “Hey :”) >>> Hey : (<- input)

Input_type : By default it’s “str”. Ths is the type of answer you’re waiting in your input() This is the same things as doing this : Binput(Input_message = “Hey :”, Input_type = “int”) <=> int(input(“Hey :”))

error_message : By default it’s “”. This is the message which is going to be print in case of an error with the input, like if you write a string but you’re waiting for an int. By default the message is : “You didn’t write an {Input_type.__name__} !” ex: Binput(Input_message = “Hey :”, Input_type = “int”, error_message = “You had to write a integer !”) >>> Hey : hello >>> You had to write a integer !

clear : By default it’s False. This is if you want to clear the console after an error in an input()

delay : By default it’s 0. This the time between the error message and the callback fonction

func : By default it’s False. This is the function you want to callback after an error on the Binput.

kwargs : Are all the arguments you want to use for the callback function You have to write the var name before the argument ! ex: Binput(Input_message=”test :”, … ,clear=True, delay=1, func=function, First_Arg=”yes”, Second_Arg=”an other one” …)

Change Log :

-> 13/01/2022

First version

Add cls() function, and Binput(Input_message, Input_type, error_message, clear, delay , func, kwargs) with all these args

-> 13/01/2022

0.0.2

Fix little probleme

-> 13/01/2022

0.0.3

Fix Change Log probleme

-> 15/01/2022

0.0.4

Add Btype(var) which return the name only name of a var like: int, not “class ‘int’”

Add p(text) and i(text) like print() and input() but faster to write

-> 15/01/2022

0.0.5

Fix little probleme with lib

And add print argument to Btype() to automatically print it if True, or if False (by default) return it

-> 15/01/2022

0.0.6

Fix p() probleme, and add all normal print() function arguments into p(), like end=””, sep=”” etc

Add loading() function, which create a loading print. Usefull for for loops.

-> 15/01/2022

0.0.7

Fix other stuff

-> 15/01/2022

0.0.8

Improove p()

-> 15/01/2022

0.0.9

Add Bprint(), can write text with specific speed, replace previous words just printed using this function, and more :)

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

BetterTools-0.0.9.5.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file BetterTools-0.0.9.5.tar.gz.

File metadata

  • Download URL: BetterTools-0.0.9.5.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.5.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.0

File hashes

Hashes for BetterTools-0.0.9.5.tar.gz
Algorithm Hash digest
SHA256 0a5929c8af979b2f55757a4e850cbb32a611dbd2af903e88b720724052176538
MD5 418eb47a7f67273c616131aeab314de4
BLAKE2b-256 baaa5aee9e5881cb003d86970daad7035bbd1c3411a8bc0ab9b7c3e5ad9348a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page