PyFile_FromFile() is used by c apps to map a libc FILE object to a Python file object. The implementation make use of the pypy-specific file.fdopen function. PySys_SetArgv is used to set sys.argv. Both Tested with latest uWSGI tip. PyThreadState_New is only a prototype, i suspect the different internal threading usage in PyPy will require a bigger effort.