Printing returned object in embedded app
Conrad Steenberg
conrad at srl.caltech.edu
Fri Jul 9 20:34:04 EDT 1999
More information about the Python-list mailing list
Fri Jul 9 20:34:04 EDT 1999
- Previous message (by thread): Printing returned object in embedded app
- Next message (by thread): Printing returned object in embedded app
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi I'm trying to construct an interactive front-end for Python, using GTK. My C program passes strings to PyRun_String, and obtains the returned object. Now in the normal interactive Python on a terminal, a command like 1+1 would print out the value, but using my method it does not. Using print(1+1) works like a charm. However, when I try to have the returned object printed using eg. PyObject_CallMethod(object,"print","") I get an error, "AttributeError: print". Can anybody tell me what I'm doing wrong? Or how to get the result printed automatically like in interactive Python? Thanks! Conrad --
- Previous message (by thread): Printing returned object in embedded app
- Next message (by thread): Printing returned object in embedded app
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list