roralsorom / PyTerm

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

Home Page:http://vu.fr/rca-discord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“‚ 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

http://vu.fr/rca-discord

License:MIT License


Languages

Language:Python 100.0%