Is it only possible if I rename the file? Or is there a __module__ variable to the file to define what\'s its name?
__module__
Yes, you should rename the file. Best would be after you have done that to remove the oldname.pyc and oldname.pyo compiled files (if present) from your system, otherwise the module will be importable under the old name too.
oldname.pyc
oldname.pyo