pudb icon indicating copy to clipboard operation
pudb copied to clipboard

Cross-platform

Open Doxly opened this issue 10 years ago • 20 comments

This module dosn't work on Windows, because it use some special code from linux. It must be written in system requements.

Doxly avatar Dec 03 '15 06:12 Doxly

Supposedly urwid works in cygwin (I don't have Windows to test). Is there stuff specifically in pudb that assumes posix?

asmeurer avatar Dec 03 '15 20:12 asmeurer

Don't think so.

inducer avatar Dec 03 '15 22:12 inducer

Port to https://github.com/nsf/termbox API?

techtonik avatar Dec 27 '15 10:12 techtonik

Termbox would be something to consider at the urwid level, not at pudb's. A quick and dirty solution would be an ssh server (like pudb.remote), at which point we could make use , say, Putty's terminal emulation.

inducer avatar Dec 27 '15 11:12 inducer

Whoops.

inducer avatar Dec 27 '15 11:12 inducer

What high-level API is needed for pudb? I see that uses 'loop' that is provided by any TUI framework. Is urwid strictly necessary? Maybe it is possible to replace its API calls with something that could be easily implemented on top of existing termbox or even curses modules.

techtonik avatar Dec 27 '15 11:12 techtonik

Urwid isn't strictly necessary for pudb in the same way that Qt isn't strictly necessary for KDE.

inducer avatar Dec 27 '15 12:12 inducer

Urwid is a GUI framework. It provides abstractions like dialogue boxes and input cells and handles things like resizing and arrowing automatically.

asmeurer avatar Dec 27 '15 14:12 asmeurer

@asmeurer dialog box abstraction that is POSIX-only seems very weird. Are there any abstractions that can work across different low level TUI backends?

techtonik avatar Dec 28 '15 01:12 techtonik

@techtonik I think what you are basically looking for is urwid support in Windows. I would contact them about it (I did find that thread I linked to above, but it's from 2006). If urwid supported Windows pudb support would be basically automatic at that point.

asmeurer avatar Dec 28 '15 07:12 asmeurer

@asmeurer not sure guys want to mess with Windows internals - they have to port their inner loop and use Windows API. It is more effective to just build a system where event loop is decoupled from widget library.

techtonik avatar Dec 28 '15 10:12 techtonik

As this was never fixed, can the documentation please be updated to make it clear that this is a linux only tool out of the box?

CMcNaughty avatar Aug 12 '20 23:08 CMcNaughty

this is a linux only tool out of the box?

It isn't. Works on Macs for sure. WSL1/2 also. Might work on Windows by using a Telnet client with the remote debugging support.

inducer avatar Aug 13 '20 00:08 inducer

this is a linux only tool out of the box?

It isn't. Works on Macs for sure. WSL1/2 also. Might work on Windows by using a Telnet client with the remote debugging support.

Apologies, you're correct. As a Windows user I can sometimes be a bit biased, sorry :/ I guess what I was trying to say was that I found it a little misleading trying to use this on Windows and couldn't find anything in the docs as to why a simple import pudb; pudb.set_trace() wasn't working. Requiring Windows users to either use telenet or cygwin rather than "just working out of the box" could at least be flagged in the documentation. This looks like a really cool tool and I was excited to use it but I can't see myself having the time to test and set it up correctly anytime soon. If I ever get around to that, I'd be happy to help you out with some Windows-specific documentation!

CMcNaughty avatar Aug 13 '20 00:08 CMcNaughty

https://en.wikipedia.org/wiki/Windows_Terminal says it supports ANSI escape sequences, which IMO should be all that's needed to support Urwid. (Note that "Windows Terminal" is different from the "Command Prompt" app (cmd.exe) that ships with Windows.)

inducer avatar Aug 13 '20 18:08 inducer

I suspect pudb is doing other things that won't work right on Windows. For example, the xdg stuff for the config is wrong for Windows.

asmeurer avatar Aug 13 '20 18:08 asmeurer

urwid might be getting closer to Windows support if this PR gets merged: https://github.com/urwid/urwid/pull/448 See also: https://github.com/urwid/urwid/issues/447

daviewales avatar Jul 31 '23 03:07 daviewales

urwid obtained basic Windows support (tested on example applications) in master branch and soon should have new release. During test run, pudb UI stuck and ignored keyboard input.

penguinolog avatar Dec 19 '23 13:12 penguinolog

I still don't have a Windows machine (nor the time/inclination to troubleshoot Windows), so someone else would need to spearhead this.

inducer avatar Dec 19 '23 15:12 inducer

Any issues with the UI or things like keyboard input would most likely be upstream urwid bugs. If there's problems with the debugger itself or things like saving settings that would be an issue in pudb.

asmeurer avatar Dec 20 '23 07:12 asmeurer