Skip to content

This libre centers text in the terminal just download the python file import it into your file and there is examples on how to use it

License

Notifications You must be signed in to change notification settings

EvanRunnerGames/pycenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pycenter

This libre centers text in the terminal just download the python file import it into your file and there is examples on how to use it
there is a time.sleep(ammount of time)/ time.sleep(8) this is for basically the update/fps you can change this this is here incase someone wants to resize the terminal so it keep redrawing the terminal like 0.0001 to update to the rezie of a termianl window but if you are fine without it and are fine with a locked terminal then just remove everything about time.sleep(8) or anything with time.sleep()

EXAMPLE ONE

##you store the text you want to center in a variable
#text_to_center = "Hello, World!"

##then you make a variable that is going to center the text then do center_text(your variable)
#centered_text = center.center_text(text_to_center)

##then print your text and it will center
#print(centered_text)

EXAMPLE TWO

#text_to_center = "I like apples"
#centered_text = center.center_text(text_to_center)
#print(centered_text)

YOU CAN ALSO CENTER MORE THAN ONE TEXT

#text_to_center = "oh and oranges to"
#centered_text = center.center_text(text_to_center)
#print(centered_text)

EXAMPLE THREE

##you can also change the refresh rate by doing
#center.refresh_rate = 5 or whatever value you want and that is how many times
##the center libre refreshs the terminal so thats why you put everything in a while loop

alt alt

About

This libre centers text in the terminal just download the python file import it into your file and there is examples on how to use it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages