Re: naive misuse? (of PyThreadState_SetAsyncExc)

2006-08-28 Thread johan2sson
[EMAIL PROTECTED] wrote: > The documentation for PyThreadState_SetAsyncExc says "To prevent naive > misuse, you must write your own C extension to call this". Anyone care > to list a few examples of such naive misuse? No? I'll take that then as proof that it's impossible to misuse the function.

naive misuse?

2006-08-27 Thread johan2sson
The documentation for PyThreadState_SetAsyncExc says "To prevent naive misuse, you must write your own C extension to call this". Anyone care to list a few examples of such naive misuse? Johan -- http://mail.python.org/mailman/listinfo/python-list

Interrupting a running python thread

2006-08-25 Thread johan2sson
I have embedded a python console in a plugin to a Windows application. I do not control the application, but the plugin is mine. Since the application is not thread-safe, I am push()-ing each line onto a code.InteractiveConsole on the GUI thread. This has the downside that a silly mistake that crea

Re: Subtyping a non-builtin type in C/C++

2006-08-13 Thread johan2sson
[EMAIL PROTECTED] wrote: > > > I am trying to create a subclass of a python class, defined in python, > > > in C++, but I am having some problems. Note to future news group archeologists: I have since learned that that's because it "can't be done", in the sense that there's no defined way that i

Re: Subtyping a non-builtin type in C/C++

2006-08-07 Thread johan2sson
Martin v. Löwis wrote: > [EMAIL PROTECTED] schrieb: > > I am trying to create a subclass of a python class, defined in python, > > in C++, but I am having some problems. > > Is the base class a classic class or a new-style class? Depending on > the answer, the code you should write varies significa

Subtyping a non-builtin type in C/C++

2006-08-05 Thread johan2sson
Hi I am trying to create a subclass of a python class, defined in python, in C++, but I am having some problems. It all boils down to a problem of finding the base class' type object and according to the PEP (253) I would also need to figure out the size of the base class instance structure, but I