File names can only have one extension. Your file has extension py
. The base name is default.properties
.
You want to write
import default.properties
That is possible, but it requires that you make a package named default
and a submodule of that package named properties
.
Note that this involves making a directory named default
containing files named __init__.py
and properties.py
.
You cannot import, using the import statement, a module in a file whose base name contains a period. That's because the file's base name must be a valid Python identifier.
In other words, you can't name your file default.properties.py
but you can use the package mechanism to allow you to write
import default.properties