safer ctype? (was GUIs - A modest Proposal)

Martin P. Hellwig martin.hellwig at dcuktec.org
Sat Jun 12 03:56:22 EDT 2010


On 06/12/10 08:21, Martin v. Loewis wrote:
<cut>
> The issue is not that you may mistakes in the ctypes code, thus allowing
> users to crash Python. The issue is that if users remove ctypes (which
> they may want to do because it's not trustworthy), then your module will
> stop working (unless you have a fallback for the case that ctypes is
> unavailable).
<cut>
Got me thinking, is it perhaps doable to have a 'safe' ctype that is 
guaranteed to be in the stdlib? Perhaps crippling it in a sense that it 
only allows a known set of functions to be called?
My gut feeling is that you open a can of worms here but I would 
appreciate your opinion.

-- 
mph



More information about the Python-list mailing list