Re: Question about importlib

2015-03-07 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmrXp4MSO9f=xb_brupnrz7xrksktkbfvo-e5n7lr_m...@mail.gmail.com... > On Sun, Mar 8, 2015 at 6:30 PM, Frank Millman wrote: >> Actually, as I write this, I realise that there is a more important >> question >> that had not occurred to me before. Is this

Re: Question about importlib

2015-03-07 Thread Chris Angelico
On Sun, Mar 8, 2015 at 6:30 PM, Frank Millman wrote: > Actually, as I write this, I realise that there is a more important question > that had not occurred to me before. Is this a potential security risk? My > intention is that the caller would only call functions within my own > modules, but this

Question about importlib

2015-03-07 Thread Frank Millman
Hi all It is well known that if you import a module more than once, the overhead for the subsequent imports is negligible. Does anyone happen to know if the same is true of the following? module_name, func_name = func_name.rsplit('.', 1) module = importlib.import_module(module_n