On 1/26/07, Manish Singh <[EMAIL PROTECTED]> wrote: > I have this sample snippet, which works find when run from command line
Unless I misunderstand how Python handles imports, they're added to sys.modules, a dict, and keyed by the module name. You're repeatedly importing modules named "parse" and abusing sys.path and reload to do it. I guess you're counting on side-effects of module initialization to do something useful? Wow, that's a tremendous hack. I think you'd be much better off resolving the given paths into python "module.naming", adding common root dirs to sys.path as needed, and using __import__. That could still be dangerous, unless the given dirs are sandboxes, so you might want to use imp.find_module instead. http://docs.python.org/lib/module-imp.html If this has something to do with Django, I'd be surprised. You're lucky you blew of your leg early. :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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-users?hl=en -~----------~----~----~----~------~----~------~--~---