2008/3/14, Leo Carbajal <[EMAIL PROTECTED]>:
> What I'm looking for is some advice as to how to tighten the scope of a
> module so that only the exposed hooks of my API are available. What I mean
> to say is, those API hooks are already visible, what bothers me is that I
> can type a couple of import statements into a script and do things like
> inspect the file system and manipulate those files, etc. After poking at the
> source I did something really inelegant, I made it so the parser did not
> recognize the import keyword, but I can't help but think there has to be a
> better way (as well as unseen consequences I haven't run into yet).

What you are describing is usually called "sandboxing", not "scoping".
Searching for "sandboxing Python" should give you some useful results.
Unfortunately, there is no simple and complete solution yet, as far as
I know.

Can you use .NET's application domain to isolate IronPython codes?

-- 
Seo Sanghyeon
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to