[Python-ideas] synatx sugar for quickly run shell command and return stdout of shell command as string result

2021-08-26 Thread Evan Greenup via Python-ideas
Currently, when what to execute external command, either os.system() or subprocess functions should be invoked. However, it is not so convenient, it would be nice to use "``" symbol to brace the shell command inside. like: stdout_result_str = `cat file.txt | sort | grep hello` Its is enhanced

[Python-ideas] Complete recursive pickle dump

2021-08-27 Thread Evan Greenup via Python-ideas
Currently, pickle can only save some very simple data types into bytes. And the object itself contains reference to some builtin data or variable, only reference will be saved. I am wondering if it is possible recursively persist all the data into pickle representation. Even if some data might

[Python-ideas] open functions in dbm submodule need to support path-like object

2021-09-07 Thread Evan Greenup via Python-ideas
Currently, in Python 3.9, `dbm.open()`, `dbm.gnu.open()` and `dbm.ndbm.open()` doesn't support path-like object, class defined in `pathlib`. It would be nice to add support with it. Sent with ProtonMail Secure Email. ___ Python-ideas mailing list -- py

[Python-ideas] socketserver StreamRequestHandler non-blocking read__

2021-10-10 Thread Evan Greenup via Python-ideas
For StreamRequetHandler's rfile attribute, it will block when the read readline readlines reach the end. It would be nice to add non-blocking read because the seek() is unavailable for rfile. and there is no other way to detect if it is ended. When the stream is empty and waiting for new input,

[Python-ideas] Print and eval

2021-11-01 Thread Evan Greenup via Python-ideas
It would be nice to add the following syntax sugar in Python "Print and Eval" like `ptev a == b` It is same as `statement = "a == b"; print(f"{statement} ? {eval(statement)}")`. It would super nice for debugging and other research project. ___ Python

[Python-ideas] pickling decorated function

2021-11-08 Thread Evan Greenup via Python-ideas
Currently pickling decorated function is impossible due to name collision. Because the decorated function is what we want, so it would be nice to add syntax sugar in Python to automatically rename original function with random generated prefix or suffix. This can greatly help the application of

[Python-ideas] request for new Executor in `concurrent.futures`

2021-11-08 Thread Evan Greenup via Python-ideas
Currently, There is two types of Executor in `concurrent.futures`. They are `ThreadPoolExecutor` and `ProcessPoolExecutor`, there is GIL limitation of `ThreadPoolExecutor` and `ProcessPoolExecutor` need to use `pickle` which have limitation on decorated function. It would be nice to add new Exe

[Python-ideas] Recursive submit in concurrent.future.ProcessPoolExecutor

2021-11-18 Thread Evan Greenup via Python-ideas
Hi, Currrently, is it allowed for process worker to submit new task to its parent executor? Considering the following Python script: ```python3 import concurrent.futures with concurrent.futures.ProcessPoolExecutor(max_workers=12) as ppe: def hello(n: int) -> int: if n == 0:

[Python-ideas] new PEP: implementation independent native code invocation and data exchange ABI standard (not sure if accurate)

2023-04-23 Thread Evan Greenup via Python-ideas
Dear All Python is a "glue" language, its dynamic nature has programming advantage and performance disadvantage. The best way to use Python is write Python code for high-level stuff and use native programming language like C, Rust, Zig, V for low level stuff. Currently, there is library like P