Skip to content

chinue/Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Some basic function for Printing and Timing

two function for colorful printing, a class for timing.

Requirements

Function list

  • printf(print_text, *args, textColor='white', end=' ')
    The usage of this function is similer to 'printf' in C/C++ but you could set your own text color.
       printf("i=%d\n", 10, textColor='green')
       printf("i=%d\n" % 10, textColor='red')
       printf("i=%d\n", 10)
       printf("i=%d\n" % 10)
  • print2(print_text, *args, textColor='white', end='\n')
    The usage of this function is similer to 'print' in Python but with a key parameter 'textColor' more
       print2("i=%d" % 10, textColor='green')
       print2("i=%d" % 10, [1, 2, 3], textColor='red')
       print2("i=%d" % 10, [1, 2, 3])

Class list

  • class Timer
       T=Timer()
       T.begin()
       # some function
       T.end("Func")

Author

Chen Yu / @Chen Yu

About

some python function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages