Open sander76 opened 10 years ago
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.
Here is what it looks like currenty.
@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 ;)
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?
I'll give it a shot!
Cool! If you need some help let me know!
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
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:
fcntl
which is a POSIX APIncurses
which is POSIX only, but using UniCurses you can get curses on Windows. Unfortunately it also uses termios
, which agian is a POSIX APII guess the mentioned support is for Windows using Cygwin.
Anyway, it was a nice exercise, but back to Cygwin it is :) Thx for trying!
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
Would it be possible to package a standalone cygwin installer that includes python and pip?
Getting all kinds of import errors. Possibly because I am on Win7 ?