{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[Python for Developers](http://ricardoduarte.github.io/python-for-developers/#content)\n",
"===================================\n",
"First Edition\n",
"-----------------------------------\n",
"\n",
"Chapter 10: Packages\n",
"=============================\n",
"_____________________________\n",
"Packages are folders that are identified by the interpreter by the presence of a file named `__init__.py`. Packages work as collections to organize hierarchically modules.\n",
"\n",
"![Package](files/bpyfd_diags8.png)\n",
"\n",
"You can import all package modules using the statement `from packagename import *`.\n",
"\n",
"The `__init__.py` file can be empty or contain package initialization code or define a variable called `__all__`, a list of modules of the package that will be imported when using \"*\". Without the file, Python does not recognize the folder as a valid packet."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"\n",
""
],
"output_type": "pyout",
"prompt_number": 1,
"text": [
""
]
}
],
"prompt_number": 1
}
],
"metadata": {}
}
]
}