May I embed IDLE into my Windows application?

Adrian Eyre a.eyre at optichrome.com
Mon Sep 27 11:30:37 EDT 1999


> When I use _tkinter_d.pyd, it doesn't crash, but IDLE still
> doesn't work.  I want Python as an extension  language embedded
> in my application, I have to embed an editor. Do you have any
> suggestion?

I found that if sys.argv is empty, then IDLE will not run. Use:

PyObject* tmp = Py_BuildValue("[s]", "dummy");
PySys_SetObject("argv", tmp);
Py_DECREF(tmp);

You also need to trap stderr to see why it doesn't work. Set
sys.stderr to be something else.

--------------------------------------------
Adrian Eyre <mailto:a.eyre at optichrome.com>
Optichrome Computer Solutions Ltd
Maybury Road, Woking, Surrey, GU21 5HX, UK
Tel: +44 1483 740 233  Fax: +44 1483 760 644
http://www.optichrome.com 
--------------------------------------------





More information about the Python-list mailing list