Python y curses

ciriso en retena.com ciriso en retena.com
Mar Feb 25 18:27:44 CET 2003


	Buenas
	Este es mi primer mensaje en la lista , así que lo primero
	un saludo para todos.

	Tengo un extraño problema con python y curses
	en Debian-Woody.

	kaesar en antioco ~/devel/python ;-) python
	Python 2.1.3 (#1, Sep  7 2002, 15:29:56) 
	[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
	Type "copyright", "credits" or "license" for more information.
	>>> import curses
	>>> dir(curses)
	['ALL_MOUSE_EVENTS', 'A_ALTCHARSET', 'A_ATTRIBUTES', 'A_BLINK', 'A_BOLD',
	 'A_CHARTEXT', 'A_COLOR', 'A_DIM', 'A_HORIZONTAL', 'A_INVIS', 'A_LEFT', 'A_LOW',
	 'A_NORMAL', 'A_PROTECT', 'A_REVERSE', 'A_RIGHT', 'A_STANDOUT', 'A_TOP',
	.....
	 'endwin', 'erasechar', 'error', 'filter', 'flash', 'flushinp', 'getmouse', 'getsyx', 'getwin', 'halfdelay',
	 'has_colors', 'has_ic', 'has_il', 'has_key', 'init_color', 'init_pair', 'initscr', 'intrflush', 'isendwin',
	 'keyname', 'killchar', 'longname', 'meta', 'mouseinterval', 'mousemask', 'napms', 'newpad', 'newwin', 'nl',
	 'nocbreak', 'noecho', 'nonl', 'noqiflush', 'noraw', 'pair_content', 'pair_number', 'putp', 'qiflush', 'raw',
 	'reset_prog_mode', 'reset_shell_mode', 'resetty', 'savetty', 'setsyx', 'setupterm', 'start_color', 'termattrs',
 	'termname', 'tigetflag', 'tigetnum', 'tigetstr', 'tparm', 'typeahead', 'unctrl', 'ungetch', 'ungetmouse',
	 'use_env', 'version', 'wrapper']
	>>>  Ctrl-D
	kaesar en antioco ~ ;-) cat curses.py

	import curses
	stdscr = curses.initscr()

	curses.noecho()
	curses.cbreak()
	curses.keypad(1)


	curses.nocbreak()
	curses.keypad(0)
	curses.echo()
	curses.endwin()
	
	kaesar en antioco ~ ;-) python curses.py
	Traceback (most recent call last):
	  File "curses.py", line 2, in ?
	    import curses
	  File "curses.py", line 3, in ?
	    stdscr = curses.initscr()
	AttributeError: 'curses' module has no attribute 'initscr'
	
	Y a partír de aquí en esta terminal el contenido de curses desaparece 
	python
	Python 2.1.3 (#1, Sep  7 2002, 15:29:56) 
	[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
	Type "copyright", "credits" or "license" for more information.
	>>> import curses
	Traceback (most recent call last):
	  File "<stdin>", line 1, in ?
	  File "curses.py", line 3, in ?
	    stdscr = curses.initscr()
	AttributeError: 'curses' module has no attribute 'initscr'
	

	Alguien me puede decir algo  al respecto ?
	Me dejo alguna cosa por el camino ?

	Perdón por el cacho pergamino ;-)
-- 
  Saludos

   		     César aka insallah
	            Powered by Debian Woody.
	   kernel 2.4.20 OpenMosix-2.4.20-2 patch applied.
            {Pentium 200MMX  Pentium 120 Pentium 200MMX }

main(){int i=0;char l[]="rfnqyt?%hnwnxtEwjyjsf3htr ";while( l[i]!=' ')putchar(l[i++]-'\05');}  




Más información sobre la lista de distribución Python-es