mani sabri wonueprjngmailcom original message necrjiabt57imetonepythonorg mailtopythonwin32 xddnvjgpythonorg behalf tim roberts mani sabri wrote want run python shell dllmain function isnt safe much processing dllmain thing called loader lock held dllmain called prevent loading dlls might try spinning thread real work wow thanksill difinitly use thread link sample code keywords google freopenconoutwstdout freopenconinwstdin freopenconerrwstderr really think w correct three file afile fopenconout w file bfile fopenconin w really think want w much writing stdin pysys_setobjectstdin pyfile_fromfilebfile coninwb fclose youre probably going want read stdin write thanks lot im sure ill never forget dont really need fopen pyfileobject xout pyfile_fromstring conout wb pyfileobject xin pyfile_fromstring conin rb pysys_setobject stdout xout pysys_setobject __stdout__ xout pysys_setobject stdin xin pysys_setobject __stdin__ xin able compile it1 changed little bit2 1 6 errors first seconed line kind expertsamplecpp85 error c2440 initializing convert pyobject pyfileobject types pointed unrelated conversion requires reinterpret_cast cstyle cast functionstyle cast remaining four kind expertsamplecpp87 error c2664 pysys_setobject convert parameter 2 pyfileobject pyobject types pointed unrelated conversion requires reinterpret_cast cstyle cast functionstyle cast 2 changed code pyfileobject xout pyfileobjectpyfile_fromstringconoutwb pyfileobject xin pyfileobjectpyfile_fromstring conin rb pysys_setobject stdout pyobjectxout pysys_setobject __stdout__ pyobjectxout pysys_setobject stdin pyobjectxin pysys_setobject __stdin__ pyobjectxin still output pyrun_simplestringprint hello pythonn tim roberts eqemprobocom providenza boekelheide inc best regards mani _______________________________________________ pythonwin32 mailing list kpitckaew45pythonorg httpmailpythonorgmailmanlistinfopythonwin32 wed 06 aug 2008 102120 0330 pythonwin32 embedding ipython windows dll