浏览代码

python 3.2 compatible getChar

frabbit 11 年之前
父节点
当前提交
4208d9d605
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 {
 		trace(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 old = python.lib.Termios.tcgetattr(fd);