How can I get a character in Python similar to Pascal readkey -


in pascal can execute code character keyboard input:

uses crt; var ch: char; begin     ch := '.';     while ch <> '\'     begin         ch := readkey;         writeln( ch );     end; end; 

is there similar 1 in python? :)

import sys      def prog():         char = ""          while char != "/":             char = sys.stdin.read(1)             print char prog() 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -