The __init__.py files are required to make Python treat the
directories as containing packages; this is done to prevent
directories with a common name, such as string, from unintentionally
hiding valid modules that occur later on the module search path. In
the simplest case, __init__.py can just be an empty file, but it can
also execute initialization code for the package or set the __all__
variable.
将名为
__init__.py
的文件添加到soapbar/
文件夹中。留为空白。在来源:http://docs.python.org/2/tutorial/modules.html
相关问题 更多 >
编程相关推荐