ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
Re: [C++-sig] Displaying PyErr_Print() error
by Ralf W. Grosse-Kunstleve other posts by this author
Nov 27 2003 9:23AM messages near this date
Re: [C++-sig] Displaying PyErr_Print() error | [C++-sig] Re: Exposing C++ objects to Python at runtime
--- Benjamin Collar <collar@[...].com>  wrote:
>  'write(self, stuff)' . Anything written is kept in an instance string. 
>  Instantiate that class in the interpreter and replace sys.stderr with it. In 
>  your catch, query that object for its string. 

A minor remark: you can use StringIO or cStringIO for this purpose. I.e. you
don't have to write a class with a write method yourself.
Ralf


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Paul Grenyer
Daryle Walker
Niall Douglas
Benjamin Collar
Ralf W. Grosse-Kunstleve

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved