how to send file as stream from python to a c library,main()