WindowsTerminal (version 0.0.1)
index
WindowsTerminal.html

This package implements tools to build python package and tools.
 
>>> from WindowsTerminal import *
>>> print("\x1b[32mabc\x1b[0m")
←[32mabc←[0m
>>> active_virtual_terminal()
True
>>> print("\x1b[32mabc\x1b[0m")
abc
>>> desactive_virtual_terminal()
True
>>> print("\x1b[32mabc\x1b[0m")
←[32mabc←[0m
>>> desactive_virtual_terminal()
False
>>> active_virtual_terminal()
True
>>> active_virtual_terminal()
False
>>> persistent_virtual_terminal()
>>> delete_persistent_virtual_terminal()
>>> persistent_terminal_transparency(0x4d)
>>> delete_persistent_terminal_transparency()
>>> set_terminal_transparency(0)
True
>>> set_terminal_transparency(255)
True
>>> set_color_transparency(0x00000000)
True
>>> set_color_transparency(0x000000FF)
True
>>>

 
Functions
       
active_virtual_terminal() -> bool
This function active terminal colors on Windows.
 
return True on success and False on fail.
 
doc: https://docs.microsoft.com/fr-fr/windows/console/console-virtual-terminal-sequences#code-try-1
 
>>> print("\x1b[32mabc\x1b[0m")
←[32mabc←[0m
>>> active_virtual_terminal()
True
>>> print("\x1b[32mabc\x1b[0m")
abc
>>> active_virtual_terminal()
False
>>>
delete_persistent_terminal_transparency() -> None
This function deletes the terminal transparency
persistent configuration using the registry.
 
>>> delete_persistent_terminal_transparency()
>>>
delete_persistent_virtual_terminal() -> None
This function deletes the virtual terminal persistent
configuration using the registry.
 
>>> delete_persistent_virtual_terminal()
>>>
desactive_virtual_terminal() -> bool
This function desactive terminal colors on Windows.
 
>>> print("\x1b[32mabc\x1b[0m")
←[32mabc←[0m
>>> active_virtual_terminal()
True
>>> print("\x1b[32mabc\x1b[0m")
abc
>>> desactive_virtual_terminal()
True
>>> print("\x1b[32mabc\x1b[0m")
←[32mabc←[0m
>>> desactive_virtual_terminal()
False
>>>
persistent_terminal_transparency(level: int) -> None
This function adds a terminal transparency persistent
configuration using the registry.
 
'level' argument should be an integer between 77-255
(77 (0x4D) is the most transparent level and 255
(0xFF) is the most opaque level)
 
>>> persistent_terminal_transparency(0x4d)
>>>
persistent_virtual_terminal() -> None
This function adds a virtual terminal persistent
configuration using the registry.
 
>>> persistent_virtual_terminal()
>>>
set_color_transparency(color: int) -> bool
This function sets the transparent color of the window.
 
'level' argument should be an integer between 0-4294967295
(0 (0x00000000) is black, 16777215 (0x00FFFFFF) is white,
255 (0x000000FF) is blue, 65280 (0x0000FF00) is green and
16711680 (0x00FF0000) is red)
 
>>> set_color_transparency(0x00000000)
True
>>> set_color_transparency(0x000000FF)
True
>>>
set_terminal_transparency(level: int) -> bool
This function sets the terminal transparency on Windows.
 
'level' argument should be an integer between 0-255
(0 is the most transparent level and
255 is the most opaque level)
 
>>> set_terminal_transparency(0)
True
>>> set_terminal_transparency(255)
True
>>>

 
Data
        __all__ = ['desactive_virtual_terminal', 'active_virtual_terminal', 'persistent_virtual_terminal', 'delete_persistent_virtual_terminal', 'persistent_terminal_transparency', 'delete_persistent_terminal_transparency', 'set_terminal_transparency', 'set_color_transparency']
__annotations__ = {'GetConsoleMode': <class 'ctypes.CDLL.__init__.<locals>._FuncPtr'>, 'GetStdHandle': <class 'ctypes.CDLL.__init__.<locals>._FuncPtr'>, 'IN_ENABLE_VIRTUAL_TERMINAL_INPUT': <class 'int'>, 'LWA_ALPHA': <class 'ctypes.c_ulong'>, 'LWA_COLORKEY': <class 'ctypes.c_ulong'>, 'OUT_DISABLE_NEWLINE_AUTO_RETURN': <class 'int'>, 'OUT_ENABLE_VIRTUAL_TERMINAL_PROCESSING': <class 'int'>, 'STDERR': <class 'int'>, 'STDIN': <class 'int'>, 'STDOUT': <class 'int'>, ...}
__author_email__ = 'mauricelambert434@gmail.com'
__copyright__ = '\nPythonToolsKit Copyright (C) 2022 Maurice Lam...ome to redistribute it\nunder certain conditions.\n'
__description__ = '\nThis package implements tools to build python package and tools.\n'
__license__ = 'GPL-3.0 License'
__maintainer__ = 'Maurice Lambert'
__maintainer_email__ = 'mauricelambert434@gmail.com'
__url__ = 'https://github.com/mauricelambert/PythonToolsKit'

 
Author
        Maurice Lambert