3 ms·
https://twitter.com/SDisPater/status/1521932867214921728 https://twitter.com/SDisPater/status/1521932867214921728 poetry shell is also not a term emulator, it'
by wyuenho 4y ago
https://twitter.com/SDisPater/status/1521932867214921728 https://twitter.com/SDisPater/status/1521932867214921728
poetry shell is also not a term emulator, it's just a subshell with some environment variables setup for your project. Once you are in, it's just a regular shell. If anything is slow, it's where you add or remove a dependency, but it's probably faster than you editing requirements.txt, clearing out your virtualenv and then reinstalling everything again.
- ak217 4y agohttps://github.com/python-poetry/poetry/blob/master/src/poetry/utils/shell.py https://github.com/python-poetry/poetry/blob/master/src/poet... The process spawned by `poetry shell` is a terminal emulator driven by the pexpect and cleo packages. It hijacks and proxies the user's keystrokes before sending them to the underlying terminal.
- wyuenho 4y agoCleo creates "subcommands" in a git like manner, whereas pexpect spawns a subshell. That cleo Terminal class you see is only a viewport. A terminal emulator will be something substantially more complex such as libvterm. If it ain't handling terminfo, it ain't a terminal emulator. https://launchpad.net/libvterm https://launchpad.net/libvterm
- ak217 4y agoThat is the point I was making. It's not a proper terminal emulator, instead it's a half-assed one. If it gets between the user's keystrokes and the host shell, it should be a proper emulator. Otherwise it should set up the environment and get out of the way.