The situation is complicated because dots mean the subpackage structure for python. However, this is still possible with imp:
import imp
my_module = imp.load_source('my_module', '.test.py')
Note: this is unorthodox, and you are advised to simply rename your modules.
source
share