On Sunday, March 27, 2011 11:06:47 PM UTC-4, Eric Frederich wrote: > I'm not sure that I know how to run this function in such a way that > it gives me an interactive session. > I passed in stdin as the first parameter and NULL as the second and > I'd get seg faults when running exit() or even imnport sys.
Passing NULL as the 2nd parameter causes the segfault. Do this instead: FILE* fp = stdin; char *filename = "Embedded"; PyRun_InteractiveLoop(fp, filename); See here regarding the segfault: http://bugs.python.org/issue5121 -- http://mail.python.org/mailman/listinfo/python-list