On May 29, 6:35 pm, Piet van Oostrum <p...@cs.uu.nl> wrote:
> >>>>> lkenne...@gmail.com (l) wrote:
> >l> Here is the code and as you can see for yourself, the output is not
> >l> coming out on the screen with CRLF like it should.  How do I fix this?
>
> Don't use curses.
>
> Curses puts the terminal in raw mode (more or less) which doesn't
> translate the newline character into CRLF. If you use curses you are
> supposed to do all output through curses. But the os.system goes
> directly to the screen, outside of curses (because it is another
> process).
> You could catch the output of ls -l with a PIPE and then write the
> output to the curses screen with addstr. But a curses screen has a
> limited length, whereas your ls -l output may be larger so then you must
> implement some form of scrolling.
>
> >l> import curses, os
> >l> screen = curses.initscr()
> >l> os.system("ls -l")
> >l> curses.endwin()
>
> --
> Piet van Oostrum <p...@cs.uu.nl>
> URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4]
> Private email: p...@vanoostrum.org

Can you provide me with some sort of example possibly--I have been
fighting this for a while and I wouldn't be using curses but I have
designed the program with the extended ascii characters thereby making
a nice UI...?

Thanks in advance,
Lee
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to