How naa3141/win-unicode-console-reborn works
This is a compatibility library for Unicode console I/O on Windows, with an optional script runner and interactive REPL. Its stream layer wraps Windows UTF-16 console calls in Python text streams; Python 2 also has dedicated input and argv compatibility modules. The README describes enable()/disable() as the main workflow, but the sampled package initializer’s enable() is a no-op; its disable() does call the console, readline, and stream shutdown functions. The graph reflects that source evidence. Several supporting modules were not sampled, so their internal wiring is omitted.
Main entry points: __init__.py Package API · runner.py Script runner · streams.py Stream setup · console.py Interactive console
Components 18
Console streams
- Package API
win_unicode_console/__init__.py - Stream setup
win_unicode_console/streams.py - Console raw I/O
win_unicode_console/streams.py - Buffer access
win_unicode_console/buffer.py - Platform checks
win_unicode_console/info.py - Python 2 file adapter
win_unicode_console/file_object.py - Windows patch hook
win_unicode_console/platformpatches/windows.py
Input compatibility
- Readline hook
win_unicode_console/readline_hook.py - Python 2 input
win_unicode_console/raw_input.py - Unicode arguments
win_unicode_console/unicode_argv.py
Script and REPL
- Source decoding
win_unicode_console/tokenize_open.py - Script runner
win_unicode_console/runner.py - Module launcher
run.py - Startup hook
sitecustomize.py - Interactive console
win_unicode_console/console.py
Other components
- Python application
- Python runtime
- Windows console
Connections 23
- Python application → Package API: calls enable
- Startup hook → Package API: calls enable
- Package API → Windows patch hook: executes on import
- Package API → Interactive console: disables
- Package API → Readline hook: disables
- Package API → Stream setup: disables
- Stream setup → Console raw I/O: builds wrappers
- Console raw I/O → Buffer access: gets buffer
- Console raw I/O → Windows console: reads and writes
- Stream setup → Platform checks: checks platform
- Stream setup → Python 2 file adapter: uses on Python 2
- Script runner → Package API: initializes
- Script runner → Interactive console: starts custom REPL
- Script runner → Source decoding: reads source on Python 2
- Module launcher → Script runner: dispatches
- Script runner → Python runtime: executes script
- Interactive console → Python runtime: runs statements
- Interactive console → Python application: prompts
- Readline hook → Python runtime: hooks readline
- Python 2 input → Readline hook: uses readline
- Python 2 input → Platform checks: checks TTY
- Package API → Python 2 input: disables on Python 2
- Package API → Unicode arguments: disables on Windows Python 2