Răsfoiți Sursa

curses_tty_wrapper(): except keyword arguments

Fabian Peter Hammerle 9 ani în urmă
părinte
comite
c365aea81d
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      ioex/__init__.py

+ 2 - 2
ioex/__init__.py

@@ -1,7 +1,7 @@
 import os
 import sys
 
-def curses_tty_wrapper(function, *args):
+def curses_tty_wrapper(function, *args, **kwargs):
     stdin_fd = os.dup(sys.stdin.fileno())
     stdout_fd = os.dup(sys.stdout.fileno())
     # set stdin to tty
@@ -12,7 +12,7 @@ def curses_tty_wrapper(function, *args):
     os.dup2(tty_out.fileno(), sys.stdout.fileno())
     # os.system('ls -l /proc/self/fd/')
     import curses
-    result = curses.wrapper(function, *args)
+    result = curses.wrapper(function, *args, **kwargs)
     # reset stdin and stdout
     os.dup2(stdin_fd, sys.stdin.fileno())
     os.dup2(stdout_fd, sys.stdout.fileno())