CRLF when doing os.system("ls -l") while using curses !!!

Emile van Sebille emile at fenx.com
Fri May 29 16:56:06 EDT 2009


On 5/29/2009 1:34 PM lkennedy5 at gmail.com said...
> Here is the code and as you can see for yourself, the output is not
> coming out on the screen with CRLF like it should. 

Mine did:

[root at falcon]# python2
Python 2.3.3 (#1, May 11 2004, 14:44:08)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import curses, os
 >>> screen = curses.initscr()
 >>> os.system("ls -l")
total 8
drwxr-xr-x    4 root     root         4096 Apr 28 14:42 fal
drwxr-xr-x    4 root     root         4096 Apr 28 14:43 home


> How do I fix this?

Provide details on your environment so others can duplicate the error.

Emile

> 
> 
> 
> import curses, os
> screen = curses.initscr()
> os.system("ls -l")
> curses.endwin()




More information about the Python-list mailing list