Browse Source

python 3.2 compatible getChar

frabbit 11 years ago
parent
commit
4208d9d605
1 changed files with 1 additions and 1 deletions
  1. 1 1
      std/python/_std/Sys.hx

+ 1 - 1
std/python/_std/Sys.hx

@@ -75,7 +75,7 @@ class Sys {
 	public static function getChar( echo : Bool ) : Int {
 	public static function getChar( echo : Bool ) : Int {
 		trace(python.lib.Sys.platform);
 		trace(python.lib.Sys.platform);
 		var ch = switch (python.lib.Sys.platform) {
 		var ch = switch (python.lib.Sys.platform) {
-			case "linux" | "darwin":
+			case x if (StringTools.startsWith(x, "linux") || x =="darwin"):
 				var fd = python.lib.Sys.stdin.fileno();
 				var fd = python.lib.Sys.stdin.fileno();
 				var old = python.lib.Termios.tcgetattr(fd);
 				var old = python.lib.Termios.tcgetattr(fd);