El 20 de junio de 2011 07:07, Javier Collado <[email protected]>escribió:

> Hola,
>
> El día 20 de junio de 2011 12:46, Douglas Jiménez <[email protected]>
> escribió:
>
> > De mis tiempos con Pascal recuerdo la función ReadKey:
>
> En C la  función equivalente a ReadKey se llama getch. En python tenemos:
> - curses.window.getch (linux)
> - msvcrt.getch (windows)
>

Gracias, Javier. Sin embargo, por terminal intenté esto:

 >>> import curses
 >>> tecla = ''
 >>> while tecla == '':
...   tecla = curses.window.getch()

pero me da un error:

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
AttributeError: 'module' object has no attribute 'window'
_______________________________________________
Python-es mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a