diff --git a/tercontrol.c b/tercontrol.c index 6f51c44..d3519e7 100644 --- a/tercontrol.c +++ b/tercontrol.c @@ -1381,10 +1381,12 @@ static const char __pyx_k__45[] = "\014"; static const char __pyx_k__46[] = "\004"; static const char __pyx_k__47[] = "\003"; static const char __pyx_k_cid[] = "cid"; +static const char __pyx_k_end[] = "end"; static const char __pyx_k_raw[] = "raw"; static const char __pyx_k_res[] = "res"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_tty[] = "tty"; +static const char __pyx_k_val[] = "val"; static const char __pyx_k_5_sm[] = ";5;%sm"; static const char __pyx_k_ECHO[] = "ECHO"; static const char __pyx_k_HHHH[] = "HHHH"; @@ -1447,10 +1449,10 @@ static const char __pyx_k_height[] = "height"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_setraw[] = "setraw"; static const char __pyx_k_stdout[] = "stdout"; -static const char __pyx_k_string[] = "string"; static const char __pyx_k_struct[] = "struct"; static const char __pyx_k_tc_rgb[] = "tc_rgb"; static const char __pyx_k_unpack[] = "unpack"; +static const char __pyx_k_values[] = "values"; static const char __pyx_k_TCSANOW[] = "TCSANOW"; static const char __pyx_k_TC_BLNK[] = "TC_BLNK"; static const char __pyx_k_TC_FRMF[] = "TC_FRMF"; @@ -1701,6 +1703,7 @@ static PyObject *__pyx_n_s_ch; static PyObject *__pyx_n_s_cid; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_decode; +static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_endswith; static PyObject *__pyx_n_s_fcntl; static PyObject *__pyx_n_s_fd; @@ -1739,7 +1742,6 @@ static PyObject *__pyx_n_s_settings; static PyObject *__pyx_n_s_stdin; static PyObject *__pyx_n_s_stdout; static PyObject *__pyx_n_s_stdout_2; -static PyObject *__pyx_n_s_string; static PyObject *__pyx_n_s_struct; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_s_tc_canon_off; @@ -1778,6 +1780,8 @@ static PyObject *__pyx_n_s_tty; static PyObject *__pyx_n_s_tw; static PyObject *__pyx_n_s_unpack; static PyObject *__pyx_kp_s_utf_8; +static PyObject *__pyx_n_s_val; +static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_width; static PyObject *__pyx_n_s_wp; static PyObject *__pyx_n_s_write; @@ -1808,7 +1812,7 @@ static PyObject *__pyx_pf_10tercontrol_42tc_clear_entire_line(CYTHON_UNUSED PyOb static PyObject *__pyx_pf_10tercontrol_44tc_clear_line_till_cursor(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_10tercontrol_46tc_clear_line_from_cursor(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_10tercontrol_48getkey(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ -static PyObject *__pyx_pf_10tercontrol_50puts(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string); /* proto */ +static PyObject *__pyx_pf_10tercontrol_50puts(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_end, PyObject *__pyx_v_values); /* proto */ static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_4; @@ -6386,92 +6390,232 @@ static PyObject *__pyx_pf_10tercontrol_48getkey(CYTHON_UNUSED PyObject *__pyx_se /* "tercontrol.pyx":214 * ################################# * - * def puts(string): sys.stdout.write(string); sys.stdout.flush() # <<<<<<<<<<<<<< + * def puts(*values, end=""): # <<<<<<<<<<<<<< + * for val in values: + * sys.stdout.write(val) */ /* Python wrapper */ -static PyObject *__pyx_pw_10tercontrol_51puts(PyObject *__pyx_self, PyObject *__pyx_v_string); /*proto*/ -static PyMethodDef __pyx_mdef_10tercontrol_51puts = {"puts", (PyCFunction)__pyx_pw_10tercontrol_51puts, METH_O, 0}; -static PyObject *__pyx_pw_10tercontrol_51puts(PyObject *__pyx_self, PyObject *__pyx_v_string) { +static PyObject *__pyx_pw_10tercontrol_51puts(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10tercontrol_51puts = {"puts", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10tercontrol_51puts, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10tercontrol_51puts(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_end = 0; + PyObject *__pyx_v_values = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("puts (wrapper)", 0); - __pyx_r = __pyx_pf_10tercontrol_50puts(__pyx_self, ((PyObject *)__pyx_v_string)); + if (PyTuple_GET_SIZE(__pyx_args) > 0) { + __pyx_v_values = PyTuple_GetSlice(__pyx_args, 0, PyTuple_GET_SIZE(__pyx_args)); + if (unlikely(!__pyx_v_values)) { + __Pyx_RefNannyFinishContext(); + return NULL; + } + __Pyx_GOTREF(__pyx_v_values); + } else { + __pyx_v_values = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); + } + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_end,0}; + PyObject* values[1] = {0}; + values[0] = ((PyObject *)__pyx_kp_s__2); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + default: + case 0: break; + } + kw_args = PyDict_Size(__pyx_kwds); + if (kw_args == 1) { + const Py_ssize_t index = 0; + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]); + if (value) { values[index] = value; kw_args--; } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "puts") < 0)) __PYX_ERR(0, 214, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) < 0) { + goto __pyx_L5_argtuple_error; + } else { + } + __pyx_v_end = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("puts", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 214, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_DECREF(__pyx_v_values); __pyx_v_values = 0; + __Pyx_AddTraceback("tercontrol.puts", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10tercontrol_50puts(__pyx_self, __pyx_v_end, __pyx_v_values); /* function exit code */ + __Pyx_XDECREF(__pyx_v_values); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_10tercontrol_50puts(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string) { +static PyObject *__pyx_pf_10tercontrol_50puts(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_end, PyObject *__pyx_v_values) { + PyObject *__pyx_v_val = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("puts", 0); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) + + /* "tercontrol.pyx":215 + * + * def puts(*values, end=""): + * for val in values: # <<<<<<<<<<<<<< + * sys.stdout.write(val) + * sys.stdout.write(end) + */ + __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + for (;;) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 215, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); + __pyx_t_3 = 0; + + /* "tercontrol.pyx":216 + * def puts(*values, end=""): + * for val in values: + * sys.stdout.write(val) # <<<<<<<<<<<<<< + * sys.stdout.write(end) + * sys.stdout.flush() + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_stdout); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_val) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_val); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "tercontrol.pyx":215 + * + * def puts(*values, end=""): + * for val in values: # <<<<<<<<<<<<<< + * sys.stdout.write(val) + * sys.stdout.write(end) + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "tercontrol.pyx":217 + * for val in values: + * sys.stdout.write(val) + * sys.stdout.write(end) # <<<<<<<<<<<<<< + * sys.stdout.flush() + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stdout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_string) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_string); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_end) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_end); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) + + /* "tercontrol.pyx":218 + * sys.stdout.write(val) + * sys.stdout.write(end) + * sys.stdout.flush() # <<<<<<<<<<<<<< + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stdout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_flush); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /* "tercontrol.pyx":214 + * ################################# + * + * def puts(*values, end=""): # <<<<<<<<<<<<<< + * for val in values: + * sys.stdout.write(val) + */ + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("tercontrol.puts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -6683,6 +6827,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_cid, __pyx_k_cid, sizeof(__pyx_k_cid), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, + {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1}, {&__pyx_n_s_fcntl, __pyx_k_fcntl, sizeof(__pyx_k_fcntl), 0, 0, 1, 1}, {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1}, @@ -6721,7 +6866,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_stdin, __pyx_k_stdin, sizeof(__pyx_k_stdin), 0, 0, 1, 1}, {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1}, {&__pyx_n_s_stdout_2, __pyx_k_stdout_2, sizeof(__pyx_k_stdout_2), 0, 0, 1, 1}, - {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1}, {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_tc_canon_off, __pyx_k_tc_canon_off, sizeof(__pyx_k_tc_canon_off), 0, 0, 1, 1}, @@ -6760,6 +6904,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_tw, __pyx_k_tw, sizeof(__pyx_k_tw), 0, 0, 1, 1}, {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1}, {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, + {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, + {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1}, {&__pyx_n_s_wp, __pyx_k_wp, sizeof(__pyx_k_wp), 0, 0, 1, 1}, {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1}, @@ -7068,12 +7214,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { /* "tercontrol.pyx":214 * ################################# * - * def puts(string): sys.stdout.write(string); sys.stdout.flush() # <<<<<<<<<<<<<< + * def puts(*values, end=""): # <<<<<<<<<<<<<< + * for val in values: + * sys.stdout.write(val) */ - __pyx_tuple__50 = PyTuple_Pack(1, __pyx_n_s_string); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_tuple__50 = PyTuple_Pack(3, __pyx_n_s_end, __pyx_n_s_values, __pyx_n_s_val); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tercontrol_pyx, __pyx_n_s_puts, 214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(0, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tercontrol_pyx, __pyx_n_s_puts, 214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -8626,7 +8774,9 @@ if (!__Pyx_RefNanny) { /* "tercontrol.pyx":214 * ################################# * - * def puts(string): sys.stdout.write(string); sys.stdout.flush() # <<<<<<<<<<<<<< + * def puts(*values, end=""): # <<<<<<<<<<<<<< + * for val in values: + * sys.stdout.write(val) */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10tercontrol_51puts, NULL, __pyx_n_s_tercontrol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2);