jrh
unread,Jun 19, 2008, 5:44:05 PM6/19/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PyScripter
Hello, I am interested in knowing where stdout (e g printf statements
in c code) ends up in pyscripter.
Example:
A c function, compiled into a python module..
int add(int x, int y) {
int z = x + y;
printf("add will return %d\n",z);
return z;
}
..and a python script using the module:
# file: demo.py
import example
z = example.add(2,3)
print "function add was called from python, and returned %d" % (z)
- Running at the command prompt with python.exe - the c printf comes
directly
C:\Program Files\swigwin-1.3.35\Examples\python\simple>python
demo.py
add will return 5
function add was called from python, and returned 5
- Running in pyscripter using external run - the c printf comes
afterwards
function add was called from python, and returned 5
add will return 5
- Running in pyscripter, internal engine - the c printf does not show
>>>
function add was called from python, and returned 5
>>>
(- but if pyscripter is invoked as "C:\Program Files
\PyScripter>pyscripter > myoutput.txt" I get "add will return 5" into
myoutput.txt once pyscripter is closed.)
- Running in pyscripter remote engine c printf does not show and,
myoutput.txt remains empty.
Does anyone know if there is a way I can get the c printf right into
the interpreter output in pyscripter, just as with python.exe from the
command line?
Thanks alot!