
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Advanced input for python, where you can read in just one character or have inputs priority ordered.
from advanced-input import get_advanced_input, PriorityOrder
from threading import Thread
from time import sleep
input_handler = get_advanced_input()
def thread_one():
user_input = input_handler.input(priority=PriorityOrder.High)
print(user_input)
def main():
backgroundThread = Thread(target=thread_one)
backgroundThread.start()
sleep(.1)
input_handler.read("Press any character to exit...", PriorityOrder.Low)
input_handler.stop()
This will result in a user input for thread_one
being created before the main
function's exit will be available. Normally, this would result in the program exiting, before accepting the user input of thread_one
. With this, thread one will be in a higher priority than main
, and that will be the first to be served the user's input. Additionally, Read()
returns when one character is pressed.
If there are multiple inputs with the same priority, it will return them in a first come last serve method.
Due to how Windows works with new line (\r\n), on Windows it is not possible to read the "Carriage Return" (\r) character. It will always return "Line Feed" (\n) instead. Due to how Windows console works, the default (utf-8) encoding input will not work with some special character. For it to work, please specify the encoding of your system.
FAQs
IO Extention
We found that advanced-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.