[issue38000] importlib can not handle module file names with periods

2019-09-09 Thread Brett Cannon
Brett Cannon added the comment: This works as expected as nothing is inherently injected into your global namespace in any of the other code that you are executing. Otherwise the fact that the imported module is not being put into sys.modules also doesn't help if you're trying to get access

[issue38000] importlib can not handle module file names with periods

2019-09-01 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue38000] importlib can not handle module file names with periods

2019-09-01 Thread Andrey
New submission from Andrey : ``` import os, sys def import_module(dir_path, module_name, ref_module_name = None): module_file_path = os.path.join(dir_path, module_name).replace('\\', '/') if sys.version_info[0] > 3 or sys.version_info[0] == 3 and sys.version_info[1] >= 4: import import