Thanks Scott. I found a very complete example based on that: http://www.ragestorm.net/samples/empython.zip
Alan Baljeu ----- Original Message ---- From: Scott VanSickle <[EMAIL PROTECTED]> To: Development of Python/C++ integration <cplusplus-sig@python.org> Sent: Monday, November 24, 2008 3:02:20 PM Subject: Re: [C++-sig] console I/O Alan, We execute Python code in our integration to redirect its stdout; sys.stdout is the where the output of its print method goes by default. We use a wrapped Python object on Windows that sends output via OutputDebugString; but you can send your output wherever you want. You basically just need a Python object with a write method to accomplish this. Create your Python object, then just reassign sys.stdout early in your implementation code like this: sys.stdout = YourClass() Scott V Lead Software Architect Canfield Imaging Systems Fairfield, NJ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stefan Seefeld Sent: Monday, November 24, 2008 2:49 PM To: Development of Python/C++ integration Subject: Re: [C++-sig] console I/O Alan Baljeu wrote: > I followed the directions there, but that is incomplete. I can printf from C > to the console, but print from Python does nothing. Something in the Python > API must be employed. But perhaps I should take this to the main Python list. > Definitely. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig __________________________________________________________________ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig