-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows support #58
Comments
This is interesting, and definitely useful! The difficult thing to make this work outside of the Linux subsystem is probably that there's no PTY available, and we need to emulate a native console. It's also on my wish list, but probably rather complex. |
Ahh. Yes. I see the issue there. I think I read somewhere that the WSL team had such a task on their backlog. But still having having PTK support full VT100 on Windows would be nice, at least for the 24bit color. I will try to figure if there is a way to detect if the console supports the new features. |
It is not msys or cygwin at all. As I understand they are Unix stuff built for windows. I was running the 'Windows subsystem for Linux', which is a new feature in windows 10. It allows you to run the real user-mode binaries in a ubuntu subsystem on windows. I am no expert so you must read up on it yourself. Basically, it is is the real linux version of python, prompt_toolkit, xonsh and pymux I was using. However, it was the Windows console that rendered it. It worked well showing that a windows version is also possible. |
If you run this under msys2 on Windows there is a |
Given that vim8 and neovim now have terminal seems like this could be possible using winpty. Here is an equivalent issue in tmux tmux/tmux#1029. But there are other things besides just pty that needs to be ported to windows. |
Seems like someone has already written a python bindings for winpty at https://github.com/spyder-ide/pywinpty |
Hi @prabirshrestha and @melund, I'm working on this, but there are still a couple of things to be done. If you have some time available, feel free to test the prompt-toolkit-2.0 branch from this repository, install ptterm (https://github.com/jonathanslenders/ptterm ), and install winpty.
|
Quite impressive. I think @astronouth7303 may have some good input for this. He has mucked quite a bit with this for https://github.com/xonsh/slug |
@jonathanslenders This is awesome. Can't wait to use replace Few things I noticed.
Here is the config
Here is the log
|
Thanks for pointing out. That's a bug, which is unrelated to Windows. I can fix that. I'll add pywin32 as well (I didn't realize I used an external package for that, actually.) edit: I'll probably rewrite it using |
@jonathanslenders any updates? Would like to give it a try again. |
|
Hi all, I managed to create a pure Python win32 pipe server/client using overlapped I/O. Hopefully, I have some time next weekend to complete the integration. |
Hi all, Windows support is improving. The client/server model using Windows pipes and overlapped I/O seems to work fine. I can have two clients connected to the same server.
Spawning the server in the background still needs to be done (using the DETACHED flag for Popen). @prabirshrestha: the unbind bug has been fixed. If you seriously want to try it on Windows, I suggest to use Finally, I'm using yawinpty for the Python Winpty bindings. However this repository disappeared very recently... https://github.com/PSoWin/yawinpty Also worth noting that Microsoft is working hard on improving the Windows Console lately. I think there's a good chance that we don't need this winpty anymore soon. Cheers, |
I guess this is another feature request for prompt-toolkit, but it would be fantastic if the VT100 backend could be forced on windows. Having a terminal multiplexor in windows could be great.
Here is an example of pymux running in the windows terminal (conhost). It works great and really fast. It is not really Windows since it runs in the 'Windows subsystem for linux'. So it is the linux versions of pymux, xonsh and PTK that are running. But the windows console handles the VT100 output quite nicely.
The text was updated successfully, but these errors were encountered: