I am not have any success with this situation.
On Ubuntu 14 with Python 3.5.1, I want to pass sys.stdin to C/C++ with only ctypes and use libc.fscanf. I have tried libc.stdin as well. I believe this has to be done in binary because that is how Python 3 ctypes need things. Some posts suggest using libc.freopen but i still have the following problem.
I believe that the first argument to fscanf which is a file pointer (or file descriptor) gives me seg faults.
How do I go about doing this?