Skip to content
Snippets Groups Projects
Commit 6495af88 authored by Christoph Groth's avatar Christoph Groth
Browse files

include more names into the top level namespace

parent 876dd1a6
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ From `kwant.builder`
.. autosummary::
Builder
HoppingKind
.. currentmodule:: kwant.lattice
......@@ -34,8 +35,11 @@ From `kwant.plotter`
.. currentmodule:: kwant.solvers.default
From ``kwant.solvers.default``
------------------------------
From `kwant.solvers.default`
----------------------------
.. autosummary::
greens_function
ldos
smatrix
wave_function
......@@ -13,15 +13,14 @@ for module in __all__:
from .version import version as __version__
from .builder import Builder
__all__.append('Builder')
from .lattice import TranslationalSymmetry
__all__.append('TranslationalSymmetry')
# Make kwant.solvers.default.smatrix available as kwant.smatrix.
smatrix = solvers.default.smatrix
__all__.append('smatrix')
# Make selected functionality available directly in the root namespace.
available = [('builder', ['Builder', 'HoppingKind']),
('lattice', ['TranslationalSymmetry']),
('solvers.default',
['smatrix', 'greens_function', 'ldos', 'wave_function'])]
for module, names in available:
exec 'from .{0} import {1}'.format(module, ', '.join(names))
__all__.extend(names)
# Importing plotter might not work, but this does not have to be a problem --
# only no plotting will be available.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment