Original Post
I've got python embedded in my game to provide scripting for a number of different uses, not the least of which is the game logic. Eventually I expect users to be able to create mods by modifying these python scripts -- however I want to limit the modules that can be loaded in these scripts, eg only a few standard python modules such as string and maybe the file i/o stuff in addition to my game/engine modules, but definately not modules such as sockets... How do I go about blocking unwanted modules, (or including only modules that I want). Can I do it with the standard python library or will I have to hack it a bit to stop sys.path changes etc?