TP schrieb: > Hi everybody, > > I would like to prevent the loading of modules in the current directory. > For example, if I have a personal module in the current directory > named "os", when I do "import os", I would like Python to import os > standard module, not my personal module of the current directory. > Is this possible?
Do you have the 'os' module inside your 'personal' package? If you add from __future__ import absolute_import then import os imports the right 'os' module. With from . import os you can import the 'personal.os' module from a module inside 'personal'. Christian -- http://mail.python.org/mailman/listinfo/python-list