Skip to content
forked from Its-Vichy/PyTerm

PyTerm is cross-platform utility package to to avoid repetition of basic code

License

Notifications You must be signed in to change notification settings

roralsorom/PyTerm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📂 Installation:

🛑 Lasted:
  pip install git+https://github.com/Its-Vichy/PyTerm.git

✅ Stable from pypi:
  pip install PyTerms==0.0.3

📝 Basic example:

from PyTerm import Console, Concurrencies
import time

def printFunction(text: str):
    
    # print-secure with Rlock in multiple thread
    Concurrencies.print_s(text)
    time.sleep(1)

if __name__ == '__main__':
    # clear the console
    Console.clear()
    
    # set console title
    Console.set_title("Basic example | PyTerm Work on windows and linux !")
    
    # start 5 threads with 2 max concurent worker:
    Concurrencies.start_threads(5, printFunction, ["uwu"], False, 2)
from PyTerm import Console, Concurrencies
import time

def printLine(line: str):
    Concurrencies.print_s(line)

if __name__ == '__main__':
    # This function will be executed on each line send into the STDIN.
    # Ex: cat file.txt | python3 script.py

    Console.forward_stdin(printLine)

Downloads Downloads Downloads

About

PyTerm is cross-platform utility package to to avoid repetition of basic code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%