Skip to content
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

Could this be Linux only ? #1

Open
sander76 opened this issue Oct 28, 2013 · 11 comments
Open

Could this be Linux only ? #1

sander76 opened this issue Oct 28, 2013 · 11 comments
Labels

Comments

@sander76
Copy link

Getting all kinds of import errors. Possibly because I am on Win7 ?

@AnthonyDiGirolamo
Copy link
Owner

Hey sander76, I'm actively developing it now on a Mac. It uses VT100 escape sequences and won't work in windows. Should work in Mac and Linux for now.

@AnthonyDiGirolamo
Copy link
Owner

screenshot1

Here is what it looks like currenty.

AnthonyDiGirolamo pushed a commit that referenced this issue Aug 18, 2014
@simonvanderveldt
Copy link

@AnthonyDiGirolamo Small question: Is there anything that can be done about this? Really like todotxt-machine, but I still have 1 Windows machine :)
There are VT100 compatible terminal emulators for Windows, so that shouldn't be the problem.

I've got it working in Cygwin, but that's quiet a huge workaround ;)

@AnthonyDiGirolamo
Copy link
Owner

I would like to get it working in windows. The UI library I'm using urwid
works in windows I believe. What terminals would be easy to install for
users?

@simonvanderveldt
Copy link

That's great!

I'm using cmder which is a good-looking and easy to install prepackaged version of ConEmu.

@AnthonyDiGirolamo
Copy link
Owner

I'll give it a shot!

@simonvanderveldt
Copy link

Cool! If you need some help let me know!

@AnthonyDiGirolamo
Copy link
Owner

So I gave it a try in windows7 with cmder but hit a road block with urwid.

C:\cygwin64\home\anthony\todotxt-machine
λ python todotxt-machine.py todobackup.txt
Traceback (most recent call last):
  File "todotxt-machine.py", line 5, in <module>
    todotxt_machine.cli.main()
  File "C:\cygwin64\home\anthony\todotxt-machine\todotxt_machine\cli.py", line 113, in main
    view.main()
  File "C:\cygwin64\home\anthony\todotxt-machine\todotxt_machine\urwid_ui.py", line 856, in main
    self.loop = urwid.MainLoop(self.view, self.palette, unhandled_input=self.keystroke)
  File "C:\Python27\lib\site-packages\urwid\main_loop.py", line 111, in __init__
    screen = raw_display.Screen()
  File "C:\Python27\lib\site-packages\urwid\raw_display.py", line 89, in __init__
    fcntl.fcntl(self._resize_pipe_rd, fcntl.F_SETFL, os.O_NONBLOCK)
NameError: global name 'fcntl' is not defined

The only thing I changed in my code is in terminal_operations.py

try:
    import tty
    import termios
    import fcntl
except:
    pass # windows

I don't think urwid supports windows like I thought. Despite the mention in the changelog

@simonvanderveldt
Copy link

Seems like there's nothing we can do :(

urwid itself supports both ncurses and raw display modules http://urwid.org/manual/displaymodules.html.
I tried both:

  • the raw one needs fcntl which is a POSIX API
  • the curses one obviously needs ncurses which is POSIX only, but using UniCurses you can get curses on Windows. Unfortunately it also uses termios, which agian is a POSIX API

I guess the mentioned support is for Windows using Cygwin.

Anyway, it was a nice exercise, but back to Cygwin it is :)
Thx for trying!

@AnthonyDiGirolamo
Copy link
Owner

No problem, thanks for trying as well. Before switching to urwid I had a raw escape sequence GUI implementation. It only used termios to set raw output and get the screen size but those might be rewritten to work on windows better. The UI isn't as functional as the urwid. Here is the code: https://github.com/AnthonyDiGirolamo/todotxt-machine/blob/1.1.8/todotxt_machine/screen.py

@AnthonyDiGirolamo
Copy link
Owner

Would it be possible to package a standalone cygwin installer that includes python and pip?

xxxserxxx pushed a commit to xxxserxxx/todotxt-machine that referenced this issue Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants