Exceptions in C that apply to multiple types?

Elf M. Sternberg elf at drizzle.com
Tue May 20 15:58:14 EDT 2003


On Tue, 20 May 2003, "Martin v. Löwis" wrote:

> Elf M. Sternberg wrote:
> 
> > I would like to have a base class of unique exceptions that apply to all
> > kernel modules that I'm manipulating.  Is in as easy as writing a core
> > of exceptions and making sure they get instantiated into the running
> > python process when __init__.py is called, and then simply referring to
> > them by name when needed?

> I think you want PyErr_NewException.

I know how to make PyErr_NewException work.  That's not the question.  The 
question is, when I write a NewException, how do I make that NewException 
availble to multiple modules?

Elf


-- 
Elf M. Sternberg, Proud to be an Extinctionist
http://www.drizzle.com/~elf/  
"The apocalypse may be closer at hand than even John Derbyshire thinks:
what the hell is Elf Sternberg doing reading Derb's columns?"
		-- Charles Murtaugh






More information about the Python-list mailing list