1
SFML projects / Re: SFML Python console
« on: December 27, 2015, 01:38:32 pm »
indeed I just noticed that my python shell works as you described when I try to enter a function definition for instance.
However I have no idea how it's done, from the C-Api point of view. The command line that is sent to python C Api uses the flag Py_single_input , so that it evaluates in shell-mode and prints the last result statement in some case (like when I type 'a' and not when I type 'a=2'). I have no idea how to tell it that in some cases it should wait for an empty line before processing (because I don't want to have to type an extra empty line for all comands)
However I have no idea how it's done, from the C-Api point of view. The command line that is sent to python C Api uses the flag Py_single_input , so that it evaluates in shell-mode and prints the last result statement in some case (like when I type 'a' and not when I type 'a=2'). I have no idea how to tell it that in some cases it should wait for an empty line before processing (because I don't want to have to type an extra empty line for all comands)