> Something like that should work though: > > try: > reimported = imported > raise Exception, "already imported!" > catch NameError: > imported = True > >
Sorry, if __name__ is different, this won't help, too. The python interpreter thinks that there are two different modules. One is called 'settings' and the other is called 'myproj_foo.settings'. That's why I store the variable not in my module, but in the logging module. Because this is the same (exception you have an own module called logging). My solution is at the bottom of this snippet: http://www.djangosnippets.org/snippets/16/ Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---