Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does "import __hello__" work?

Recently I've come across this "Hello world" Python program:

>>> import __hello__
Hello world!

I wonder how it works and how to view the source code of the __hello__ module.

like image 582
Eugene Yarmash Avatar asked Jun 02 '17 16:06

Eugene Yarmash


1 Answers

__hello__ is a frozen module intended as a test case for frozen module support. It's source code is automatically generated by the Python freeze utility.

like image 93
Michael Mior Avatar answered Sep 19 '22 18:09

Michael Mior