how to write-protect names

Peter Hansen peter at engcorp.com
Wed Sep 17 16:37:32 EDT 2003


Gregor Lingl wrote:
> 
> is it possible to "write-protect" a definite
> set of names of a module, especially of the
> __main__ module?
> If so, how?

Almost anything is possible at some level in Python, although,
likewise, almost anything can be broken at another level.

What exactly do you need this for?  If you describe the purpose
you have in mind for it we can provide the best approach, or 
tell you that we don't think you should bother. ;-)

-Peter




More information about the Python-list mailing list