Full Code of ngr-t/SublimeHermes for AI

master 0feec81caa12 cached
114 files
624.0 KB
148.4k tokens
1072 symbols
1 requests
Download .txt
Showing preview only (660K chars total). Download the full file or copy to clipboard to get everything.
Repository: ngr-t/SublimeHermes
Branch: master
Commit: 0feec81caa12
Files: 114
Total size: 624.0 KB

Directory structure:
gitextract_9beunihp/

├── .build
├── .codecov.yml
├── .flake8
├── .github/
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .python-version
├── CONTRIBUTORS.md
├── Default.sublime-commands
├── Default.sublime-keymap
├── Helium.sublime-settings
├── Helium.sublime-syntax
├── LICENSE.TXT
├── Main.sublime-menu
├── README.md
├── dependencies.json
├── helium.py
├── lib/
│   ├── __init__.py
│   ├── client/
│   │   ├── __init__.py
│   │   ├── decorator.py
│   │   ├── decorator_version
│   │   ├── ipython_genutils/
│   │   │   ├── __init__.py
│   │   │   ├── _version.py
│   │   │   ├── encoding.py
│   │   │   ├── importstring.py
│   │   │   ├── ipstruct.py
│   │   │   ├── path.py
│   │   │   ├── py3compat.py
│   │   │   ├── tempdir.py
│   │   │   └── text.py
│   │   ├── jupyter_client/
│   │   │   ├── __init__.py
│   │   │   ├── _version.py
│   │   │   ├── adapter.py
│   │   │   ├── blocking/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── channels.py
│   │   │   │   └── client.py
│   │   │   ├── channels.py
│   │   │   ├── channelsabc.py
│   │   │   ├── client.py
│   │   │   ├── clientabc.py
│   │   │   ├── connect.py
│   │   │   ├── consoleapp.py
│   │   │   ├── ioloop/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── manager.py
│   │   │   │   └── restarter.py
│   │   │   ├── jsonutil.py
│   │   │   ├── kernelapp.py
│   │   │   ├── kernelspec.py
│   │   │   ├── kernelspecapp.py
│   │   │   ├── launcher.py
│   │   │   ├── localinterfaces.py
│   │   │   ├── manager.py
│   │   │   ├── managerabc.py
│   │   │   ├── multikernelmanager.py
│   │   │   ├── restarter.py
│   │   │   ├── runapp.py
│   │   │   ├── session.py
│   │   │   ├── threaded.py
│   │   │   └── win_interrupt.py
│   │   ├── jupyter_core/
│   │   │   ├── __init__.py
│   │   │   ├── __main__.py
│   │   │   ├── application.py
│   │   │   ├── command.py
│   │   │   ├── migrate.py
│   │   │   ├── paths.py
│   │   │   ├── troubleshoot.py
│   │   │   ├── utils/
│   │   │   │   ├── __init__.py
│   │   │   │   └── shutil_which.py
│   │   │   └── version.py
│   │   ├── traitlets/
│   │   │   ├── __init__.py
│   │   │   ├── _version.py
│   │   │   ├── config/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── application.py
│   │   │   │   ├── configurable.py
│   │   │   │   ├── loader.py
│   │   │   │   └── manager.py
│   │   │   ├── log.py
│   │   │   ├── traitlets.py
│   │   │   └── utils/
│   │   │       ├── __init__.py
│   │   │       ├── bunch.py
│   │   │       ├── getargspec.py
│   │   │       ├── importstring.py
│   │   │       ├── sentinel.py
│   │   │       └── tests/
│   │   │           ├── __init__.py
│   │   │           ├── test_bunch.py
│   │   │           └── test_importstring.py
│   │   ├── update_decorator.sh
│   │   ├── update_ipython_genutils.sh
│   │   ├── update_jupyter_client.sh
│   │   ├── update_jupyter_core.sh
│   │   └── update_traitlets.sh
│   ├── kernel.py
│   └── utils.py
├── messages/
│   ├── 0.3.1.txt
│   ├── 0.3.2.txt
│   ├── 0.3.3.txt
│   ├── 0.3.4.txt
│   ├── 0.3.5.txt
│   ├── 0.3.6.txt
│   ├── 0.4.0.txt
│   ├── 0.4.1.txt
│   ├── 0.4.2.txt
│   ├── 0.4.3.txt
│   ├── 0.5.0.txt
│   ├── 0.5.1.txt
│   ├── 0.6.0.txt
│   ├── 0.6.1.txt
│   ├── 0.6.2.txt
│   └── 0.6.3.txt
├── messages.json
├── pyproject.toml
└── tests/
    ├── _helpers.py
    ├── test_cell_handling.py
    └── test_tests_running.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .build
================================================
{
	"automatic_order": false,
	"iterations": 1,
	"mods_load_order":
	[
		"tests/test_tests_running.py",
		"lib/utils.py",
		"lib/kernel.py",
		"helium.py",
		"lib/__init__.py",
		"lib/client/__init__.py",
		"lib/client/decorator.py",
		"lib/client/jupyter_client/channelsabc.py",
		"lib/client/jupyter_client/threaded.py",
		"lib/client/jupyter_client/restarter.py",
		"lib/client/jupyter_client/__init__.py",
		"lib/client/jupyter_client/client.py",
		"lib/client/jupyter_client/managerabc.py",
		"lib/client/jupyter_client/adapter.py",
		"lib/client/jupyter_client/localinterfaces.py",
		"lib/client/jupyter_client/win_interrupt.py",
		"lib/client/jupyter_client/_version.py",
		"lib/client/jupyter_client/connect.py",
		"lib/client/jupyter_client/kernelspec.py",
		"lib/client/jupyter_client/launcher.py",
		"lib/client/jupyter_client/session.py",
		"lib/client/jupyter_client/multikernelmanager.py",
		"lib/client/jupyter_client/jsonutil.py",
		"lib/client/jupyter_client/manager.py",
		"lib/client/jupyter_client/kernelspecapp.py",
		"lib/client/jupyter_client/runapp.py",
		"lib/client/jupyter_client/consoleapp.py",
		"lib/client/jupyter_client/channels.py",
		"lib/client/jupyter_client/clientabc.py",
		"lib/client/jupyter_client/blocking/__init__.py",
		"lib/client/jupyter_client/blocking/client.py",
		"lib/client/jupyter_client/blocking/channels.py",
		"lib/client/jupyter_client/ioloop/restarter.py",
		"lib/client/jupyter_client/ioloop/__init__.py",
		"lib/client/jupyter_client/ioloop/manager.py",
		"lib/client/jupyter_client/tests/__init__.py",
		"lib/client/jupyter_client/tests/signalkernel.py",
		"lib/client/jupyter_client/tests/test_multikernelmanager.py",
		"lib/client/jupyter_client/tests/test_client.py",
		"lib/client/jupyter_client/tests/test_connect.py",
		"lib/client/jupyter_client/tests/test_session.py",
		"lib/client/jupyter_client/tests/test_adapter.py",
		"lib/client/jupyter_client/tests/test_kernelspec.py",
		"lib/client/jupyter_client/tests/test_public_api.py",
		"lib/client/jupyter_client/tests/test_localinterfaces.py",
		"lib/client/jupyter_client/tests/test_jsonutil.py",
		"lib/client/jupyter_client/tests/test_kernelmanager.py",
		"lib/client/jupyter_client/tests/utils.py",
		"lib/client/jupyter_client/tests/test_kernelapp.py",
		"lib/client/jupyter_core/__init__.py",
		"lib/client/jupyter_core/__main__.py",
		"lib/client/jupyter_core/migrate.py",
		"lib/client/jupyter_core/troubleshoot.py",
		"lib/client/jupyter_core/application.py",
		"lib/client/jupyter_core/paths.py",
		"lib/client/jupyter_core/version.py",
		"lib/client/jupyter_core/command.py",
		"lib/client/jupyter_core/utils/__init__.py",
		"lib/client/jupyter_core/utils/shutil_which.py",
		"lib/client/jupyter_core/tests/__init__.py",
		"lib/client/jupyter_core/tests/test_paths.py",
		"lib/client/jupyter_core/tests/test_application.py",
		"lib/client/jupyter_core/tests/test_migrate.py",
		"lib/client/jupyter_core/tests/mocking.py",
		"lib/client/jupyter_core/tests/test_command.py",
		"lib/client/jupyter_core/tests/dotipython_empty/profile_default/ipython_notebook_config.py",
		"lib/client/jupyter_core/tests/dotipython_empty/profile_default/ipython_kernel_config.py",
		"lib/client/jupyter_core/tests/dotipython_empty/profile_default/ipython_console_config.py",
		"lib/client/jupyter_core/tests/dotipython_empty/profile_default/ipython_config.py",
		"lib/client/jupyter_core/tests/dotipython_empty/profile_default/ipython_nbconvert_config.py",
		"lib/client/jupyter_core/tests/dotipython/profile_default/ipython_notebook_config.py",
		"lib/client/jupyter_core/tests/dotipython/profile_default/ipython_kernel_config.py",
		"lib/client/jupyter_core/tests/dotipython/profile_default/ipython_console_config.py",
		"lib/client/jupyter_core/tests/dotipython/profile_default/ipython_config.py",
		"lib/client/jupyter_core/tests/dotipython/profile_default/ipython_nbconvert_config.py",
		"lib/client/traitlets/log.py",
		"lib/client/traitlets/traitlets.py",
		"lib/client/traitlets/__init__.py",
		"lib/client/traitlets/_version.py",
		"lib/client/traitlets/utils/getargspec.py",
		"lib/client/traitlets/utils/__init__.py",
		"lib/client/traitlets/utils/importstring.py",
		"lib/client/traitlets/utils/bunch.py",
		"lib/client/traitlets/utils/sentinel.py",
		"lib/client/traitlets/utils/tests/__init__.py",
		"lib/client/traitlets/utils/tests/test_bunch.py",
		"lib/client/traitlets/utils/tests/test_importstring.py",
		"lib/client/traitlets/config/__init__.py",
		"lib/client/traitlets/config/configurable.py",
		"lib/client/traitlets/config/application.py",
		"lib/client/traitlets/config/loader.py",
		"lib/client/traitlets/config/manager.py",
		"lib/client/traitlets/config/tests/test_configurable.py",
		"lib/client/traitlets/config/tests/__init__.py",
		"lib/client/traitlets/config/tests/test_loader.py",
		"lib/client/traitlets/config/tests/test_application.py",
		"lib/client/traitlets/tests/_warnings.py",
		"lib/client/traitlets/tests/__init__.py",
		"lib/client/traitlets/tests/test_traitlets_enum.py",
		"lib/client/traitlets/tests/test_traitlets.py",
		"lib/client/traitlets/tests/utils.py",
		"lib/client/ipython_genutils/__init__.py",
		"lib/client/ipython_genutils/importstring.py",
		"lib/client/ipython_genutils/ipstruct.py",
		"lib/client/ipython_genutils/path.py",
		"lib/client/ipython_genutils/_version.py",
		"lib/client/ipython_genutils/py3compat.py",
		"lib/client/ipython_genutils/encoding.py",
		"lib/client/ipython_genutils/tempdir.py",
		"lib/client/ipython_genutils/text.py",
		"lib/client/ipython_genutils/tests/__init__.py",
		"lib/client/ipython_genutils/tests/test_text.py",
		"lib/client/ipython_genutils/tests/test_tempdir.py",
		"lib/client/ipython_genutils/tests/test_path.py",
		"lib/client/ipython_genutils/tests/test_importstring.py",
		"lib/client/ipython_genutils/testing/__init__.py",
		"lib/client/ipython_genutils/testing/decorators.py",
		".venv/lib/python3.8/site-packages/mypy_extensions.py",
		".venv/lib/python3.8/site-packages/flake8_docstrings.py",
		".venv/lib/python3.8/site-packages/filelock.py",
		".venv/lib/python3.8/site-packages/flake8_eradicate.py",
		".venv/lib/python3.8/site-packages/typing_extensions.py",
		".venv/lib/python3.8/site-packages/easy_install.py",
		".venv/lib/python3.8/site-packages/cfgv.py",
		".venv/lib/python3.8/site-packages/toml.py",
		".venv/lib/python3.8/site-packages/black.py",
		".venv/lib/python3.8/site-packages/nodeenv.py",
		".venv/lib/python3.8/site-packages/pycodestyle.py",
		".venv/lib/python3.8/site-packages/flake8_blind_except.py",
		".venv/lib/python3.8/site-packages/appdirs.py",
		".venv/lib/python3.8/site-packages/eradicate.py",
		".venv/lib/python3.8/site-packages/_black_version.py",
		".venv/lib/python3.8/site-packages/blackd.py",
		".venv/lib/python3.8/site-packages/flake8_comprehensions.py",
		".venv/lib/python3.8/site-packages/mccabe.py",
		".venv/lib/python3.8/site-packages/six.py",
		".venv/lib/python3.8/site-packages/entrypoints.py",
		".venv/lib/python3.8/site-packages/mypy/nodes.py",
		".venv/lib/python3.8/site-packages/mypy/fastparse2.py",
		".venv/lib/python3.8/site-packages/mypy/errorcodes.py",
		".venv/lib/python3.8/site-packages/mypy/gclogger.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_typeddict.py",
		".venv/lib/python3.8/site-packages/mypy/stubgenc.py",
		".venv/lib/python3.8/site-packages/mypy/message_registry.py",
		".venv/lib/python3.8/site-packages/mypy/__init__.py",
		".venv/lib/python3.8/site-packages/mypy/literals.py",
		".venv/lib/python3.8/site-packages/mypy/tvar_scope.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_shared.py",
		".venv/lib/python3.8/site-packages/mypy/applytype.py",
		".venv/lib/python3.8/site-packages/mypy/ipc.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_infer.py",
		".venv/lib/python3.8/site-packages/mypy/__main__.py",
		".venv/lib/python3.8/site-packages/mypy/stats.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_newtype.py",
		".venv/lib/python3.8/site-packages/mypy/errors.py",
		".venv/lib/python3.8/site-packages/mypy/expandtype.py",
		".venv/lib/python3.8/site-packages/mypy/checker.py",
		".venv/lib/python3.8/site-packages/mypy/meet.py",
		".venv/lib/python3.8/site-packages/mypy/build.py",
		".venv/lib/python3.8/site-packages/mypy/constraints.py",
		".venv/lib/python3.8/site-packages/mypy/fscache.py",
		".venv/lib/python3.8/site-packages/mypy/git.py",
		".venv/lib/python3.8/site-packages/mypy/stubdoc.py",
		".venv/lib/python3.8/site-packages/mypy/api.py",
		".venv/lib/python3.8/site-packages/mypy/traverser.py",
		".venv/lib/python3.8/site-packages/mypy/fswatcher.py",
		".venv/lib/python3.8/site-packages/mypy/main.py",
		".venv/lib/python3.8/site-packages/mypy/fastparse.py",
		".venv/lib/python3.8/site-packages/mypy/modulefinder.py",
		".venv/lib/python3.8/site-packages/mypy/find_sources.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_pass1.py",
		".venv/lib/python3.8/site-packages/mypy/plugin.py",
		".venv/lib/python3.8/site-packages/mypy/infer.py",
		".venv/lib/python3.8/site-packages/mypy/scope.py",
		".venv/lib/python3.8/site-packages/mypy/typestate.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_enum.py",
		".venv/lib/python3.8/site-packages/mypy/mixedtraverser.py",
		".venv/lib/python3.8/site-packages/mypy/bogus_type.py",
		".venv/lib/python3.8/site-packages/mypy/semanal.py",
		".venv/lib/python3.8/site-packages/mypy/argmap.py",
		".venv/lib/python3.8/site-packages/mypy/options.py",
		".venv/lib/python3.8/site-packages/mypy/visitor.py",
		".venv/lib/python3.8/site-packages/mypy/stubutil.py",
		".venv/lib/python3.8/site-packages/mypy/binder.py",
		".venv/lib/python3.8/site-packages/mypy/typeanal.py",
		".venv/lib/python3.8/site-packages/mypy/strconv.py",
		".venv/lib/python3.8/site-packages/mypy/typeops.py",
		".venv/lib/python3.8/site-packages/mypy/freetree.py",
		".venv/lib/python3.8/site-packages/mypy/config_parser.py",
		".venv/lib/python3.8/site-packages/mypy/parse.py",
		".venv/lib/python3.8/site-packages/mypy/suggestions.py",
		".venv/lib/python3.8/site-packages/mypy/sitepkgs.py",
		".venv/lib/python3.8/site-packages/mypy/checkstrformat.py",
		".venv/lib/python3.8/site-packages/mypy/dmypy_util.py",
		".venv/lib/python3.8/site-packages/mypy/dmypy_server.py",
		".venv/lib/python3.8/site-packages/mypy/stubgen.py",
		".venv/lib/python3.8/site-packages/mypy/indirection.py",
		".venv/lib/python3.8/site-packages/mypy/type_visitor.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_main.py",
		".venv/lib/python3.8/site-packages/mypy/renaming.py",
		".venv/lib/python3.8/site-packages/mypy/types.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_classprop.py",
		".venv/lib/python3.8/site-packages/mypy/checkmember.py",
		".venv/lib/python3.8/site-packages/mypy/erasetype.py",
		".venv/lib/python3.8/site-packages/mypy/reachability.py",
		".venv/lib/python3.8/site-packages/mypy/state.py",
		".venv/lib/python3.8/site-packages/mypy/report.py",
		".venv/lib/python3.8/site-packages/mypy/maptype.py",
		".venv/lib/python3.8/site-packages/mypy/subtypes.py",
		".venv/lib/python3.8/site-packages/mypy/metastore.py",
		".venv/lib/python3.8/site-packages/mypy/fixup.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_typeargs.py",
		".venv/lib/python3.8/site-packages/mypy/messages.py",
		".venv/lib/python3.8/site-packages/mypy/checkexpr.py",
		".venv/lib/python3.8/site-packages/mypy/sametypes.py",
		".venv/lib/python3.8/site-packages/mypy/split_namespace.py",
		".venv/lib/python3.8/site-packages/mypy/join.py",
		".venv/lib/python3.8/site-packages/mypy/memprofile.py",
		".venv/lib/python3.8/site-packages/mypy/exprtotype.py",
		".venv/lib/python3.8/site-packages/mypy/util.py",
		".venv/lib/python3.8/site-packages/mypy/lookup.py",
		".venv/lib/python3.8/site-packages/mypy/semanal_namedtuple.py",
		".venv/lib/python3.8/site-packages/mypy/solve.py",
		".venv/lib/python3.8/site-packages/mypy/sharedparse.py",
		".venv/lib/python3.8/site-packages/mypy/moduleinspect.py",
		".venv/lib/python3.8/site-packages/mypy/moduleinfo.py",
		".venv/lib/python3.8/site-packages/mypy/dmypy_os.py",
		".venv/lib/python3.8/site-packages/mypy/typetraverser.py",
		".venv/lib/python3.8/site-packages/mypy/treetransform.py",
		".venv/lib/python3.8/site-packages/mypy/mro.py",
		".venv/lib/python3.8/site-packages/mypy/version.py",
		".venv/lib/python3.8/site-packages/mypy/typevars.py",
		".venv/lib/python3.8/site-packages/mypy/defaults.py",
		".venv/lib/python3.8/site-packages/mypy/typeshed/tests/mypy_selftest.py",
		".venv/lib/python3.8/site-packages/mypy/typeshed/tests/mypy_test.py",
		".venv/lib/python3.8/site-packages/mypy/typeshed/tests/check_consistent.py",
		".venv/lib/python3.8/site-packages/mypy/typeshed/tests/pytype_test.py",
		".venv/lib/python3.8/site-packages/mypy/test/testmoduleinfo.py",
		".venv/lib/python3.8/site-packages/mypy/test/testgraph.py",
		".venv/lib/python3.8/site-packages/mypy/test/testsamples.py",
		".venv/lib/python3.8/site-packages/mypy/test/__init__.py",
		".venv/lib/python3.8/site-packages/mypy/test/testfinegrained.py",
		".venv/lib/python3.8/site-packages/mypy/test/testerrorstream.py",
		".venv/lib/python3.8/site-packages/mypy/test/testdaemon.py",
		".venv/lib/python3.8/site-packages/mypy/test/testinfer.py",
		".venv/lib/python3.8/site-packages/mypy/test/testmerge.py",
		".venv/lib/python3.8/site-packages/mypy/test/testpep561.py",
		".venv/lib/python3.8/site-packages/mypy/test/collect.py",
		".venv/lib/python3.8/site-packages/mypy/test/testmodulefinder.py",
		".venv/lib/python3.8/site-packages/mypy/test/testdiff.py",
		".venv/lib/python3.8/site-packages/mypy/test/visitors.py",
		".venv/lib/python3.8/site-packages/mypy/test/testcmdline.py",
		".venv/lib/python3.8/site-packages/mypy/test/testsubtypes.py",
		".venv/lib/python3.8/site-packages/mypy/test/data.py",
		".venv/lib/python3.8/site-packages/mypy/test/testcheck.py",
		".venv/lib/python3.8/site-packages/mypy/test/testtransform.py",
		".venv/lib/python3.8/site-packages/mypy/test/config.py",
		".venv/lib/python3.8/site-packages/mypy/test/testformatter.py",
		".venv/lib/python3.8/site-packages/mypy/test/testsemanal.py",
		".venv/lib/python3.8/site-packages/mypy/test/testdeps.py",
		".venv/lib/python3.8/site-packages/mypy/test/testpythoneval.py",
		".venv/lib/python3.8/site-packages/mypy/test/testtypes.py",
		".venv/lib/python3.8/site-packages/mypy/test/testreports.py",
		".venv/lib/python3.8/site-packages/mypy/test/typefixture.py",
		".venv/lib/python3.8/site-packages/mypy/test/update.py",
		".venv/lib/python3.8/site-packages/mypy/test/testfinegrainedcache.py",
		".venv/lib/python3.8/site-packages/mypy/test/helpers.py",
		".venv/lib/python3.8/site-packages/mypy/test/testapi.py",
		".venv/lib/python3.8/site-packages/mypy/test/teststubgen.py",
		".venv/lib/python3.8/site-packages/mypy/test/testsolve.py",
		".venv/lib/python3.8/site-packages/mypy/test/testparse.py",
		".venv/lib/python3.8/site-packages/mypy/test/testargs.py",
		".venv/lib/python3.8/site-packages/mypy/test/testipc.py",
		".venv/lib/python3.8/site-packages/mypy/test/testtypegen.py",
		".venv/lib/python3.8/site-packages/mypy/test/testmypyc.py",
		".venv/lib/python3.8/site-packages/mypy/server/mergecheck.py",
		".venv/lib/python3.8/site-packages/mypy/server/deps.py",
		".venv/lib/python3.8/site-packages/mypy/server/__init__.py",
		".venv/lib/python3.8/site-packages/mypy/server/target.py",
		".venv/lib/python3.8/site-packages/mypy/server/astdiff.py",
		".venv/lib/python3.8/site-packages/mypy/server/trigger.py",
		".venv/lib/python3.8/site-packages/mypy/server/aststrip.py",
		".venv/lib/python3.8/site-packages/mypy/server/update.py",
		".venv/lib/python3.8/site-packages/mypy/server/objgraph.py",
		".venv/lib/python3.8/site-packages/mypy/server/subexpr.py",
		".venv/lib/python3.8/site-packages/mypy/server/astmerge.py",
		".venv/lib/python3.8/site-packages/mypy/plugins/attrs.py",
		".venv/lib/python3.8/site-packages/mypy/plugins/__init__.py",
		".venv/lib/python3.8/site-packages/mypy/plugins/common.py",
		".venv/lib/python3.8/site-packages/mypy/plugins/dataclasses.py",
		".venv/lib/python3.8/site-packages/mypy/plugins/enums.py",
		".venv/lib/python3.8/site-packages/mypy/plugins/ctypes.py",
		".venv/lib/python3.8/site-packages/mypy/plugins/default.py",
		".venv/lib/python3.8/site-packages/mypy/dmypy/__init__.py",
		".venv/lib/python3.8/site-packages/mypy/dmypy/client.py",
		".venv/lib/python3.8/site-packages/mypy/dmypy/__main__.py",
		".venv/lib/python3.8/site-packages/pkg_resources/__init__.py",
		".venv/lib/python3.8/site-packages/pkg_resources/py31compat.py",
		".venv/lib/python3.8/site-packages/pkg_resources/extern/__init__.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/__init__.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/appdirs.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/six.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/__init__.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/_compat.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/__about__.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/_structures.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/requirements.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/utils.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/specifiers.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py",
		".venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/markers.py",
		".venv/lib/python3.8/site-packages/pre_commit/__init__.py",
		".venv/lib/python3.8/site-packages/pre_commit/hook.py",
		".venv/lib/python3.8/site-packages/pre_commit/staged_files_only.py",
		".venv/lib/python3.8/site-packages/pre_commit/__main__.py",
		".venv/lib/python3.8/site-packages/pre_commit/envcontext.py",
		".venv/lib/python3.8/site-packages/pre_commit/output.py",
		".venv/lib/python3.8/site-packages/pre_commit/git.py",
		".venv/lib/python3.8/site-packages/pre_commit/error_handler.py",
		".venv/lib/python3.8/site-packages/pre_commit/main.py",
		".venv/lib/python3.8/site-packages/pre_commit/make_archives.py",
		".venv/lib/python3.8/site-packages/pre_commit/xargs.py",
		".venv/lib/python3.8/site-packages/pre_commit/color.py",
		".venv/lib/python3.8/site-packages/pre_commit/five.py",
		".venv/lib/python3.8/site-packages/pre_commit/logging_handler.py",
		".venv/lib/python3.8/site-packages/pre_commit/prefix.py",
		".venv/lib/python3.8/site-packages/pre_commit/parse_shebang.py",
		".venv/lib/python3.8/site-packages/pre_commit/store.py",
		".venv/lib/python3.8/site-packages/pre_commit/constants.py",
		".venv/lib/python3.8/site-packages/pre_commit/util.py",
		".venv/lib/python3.8/site-packages/pre_commit/repository.py",
		".venv/lib/python3.8/site-packages/pre_commit/clientlib.py",
		".venv/lib/python3.8/site-packages/pre_commit/color_windows.py",
		".venv/lib/python3.8/site-packages/pre_commit/file_lock.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/__init__.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/docker.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/python.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/rust.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/docker_image.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/pcre.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/ruby.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/python_venv.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/script.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/conda.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/pygrep.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/helpers.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/node.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/golang.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/all.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/fail.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/system.py",
		".venv/lib/python3.8/site-packages/pre_commit/languages/swift.py",
		".venv/lib/python3.8/site-packages/pre_commit/resources/__init__.py",
		".venv/lib/python3.8/site-packages/pre_commit/resources/empty_template_setup.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/hook_impl.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/run.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/__init__.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/clean.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/try_repo.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/sample_config.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/install_uninstall.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/autoupdate.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/gc.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/init_templatedir.py",
		".venv/lib/python3.8/site-packages/pre_commit/commands/migrate_config.py",
		".venv/lib/python3.8/site-packages/pre_commit/meta_hooks/identity.py",
		".venv/lib/python3.8/site-packages/pre_commit/meta_hooks/__init__.py",
		".venv/lib/python3.8/site-packages/pre_commit/meta_hooks/check_hooks_apply.py",
		".venv/lib/python3.8/site-packages/pre_commit/meta_hooks/check_useless_excludes.py",
		".venv/lib/python3.8/site-packages/virtualenv/error.py",
		".venv/lib/python3.8/site-packages/virtualenv/info.py",
		".venv/lib/python3.8/site-packages/virtualenv/pyenv_cfg.py",
		".venv/lib/python3.8/site-packages/virtualenv/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/__main__.py",
		".venv/lib/python3.8/site-packages/virtualenv/session.py",
		".venv/lib/python3.8/site-packages/virtualenv/dirs.py",
		".venv/lib/python3.8/site-packages/virtualenv/report.py",
		".venv/lib/python3.8/site-packages/virtualenv/version.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/via_template.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/activator.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/batch/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/fish/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/powershell/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/cshell/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/python/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/python/activate_this.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/bash/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/activation/xonsh/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/zipapp.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/lock.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/six.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/subprocess/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/subprocess/_win_subprocess.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/path/_sync.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/path/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/path/_permission.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/path/_pathlib/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/util/path/_pathlib/via_os_path.py",
		".venv/lib/python3.8/site-packages/virtualenv/run/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/run/plugin/discovery.py",
		".venv/lib/python3.8/site-packages/virtualenv/run/plugin/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/run/plugin/seeders.py",
		".venv/lib/python3.8/site-packages/virtualenv/run/plugin/activators.py",
		".venv/lib/python3.8/site-packages/virtualenv/run/plugin/creators.py",
		".venv/lib/python3.8/site-packages/virtualenv/run/plugin/base.py",
		".venv/lib/python3.8/site-packages/virtualenv/discovery/discover.py",
		".venv/lib/python3.8/site-packages/virtualenv/discovery/py_info.py",
		".venv/lib/python3.8/site-packages/virtualenv/discovery/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/discovery/builtin.py",
		".venv/lib/python3.8/site-packages/virtualenv/discovery/cached_py_info.py",
		".venv/lib/python3.8/site-packages/virtualenv/discovery/py_spec.py",
		".venv/lib/python3.8/site-packages/virtualenv/discovery/windows/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/discovery/windows/pep514.py",
		".venv/lib/python3.8/site-packages/virtualenv/config/convert.py",
		".venv/lib/python3.8/site-packages/virtualenv/config/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/config/ini.py",
		".venv/lib/python3.8/site-packages/virtualenv/config/env_var.py",
		".venv/lib/python3.8/site-packages/virtualenv/config/cli/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/config/cli/parser.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/seeder.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/via_app_data/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/via_app_data/via_app_data.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/via_app_data/pip_install/symlink.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/via_app_data/pip_install/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/via_app_data/pip_install/copy.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/via_app_data/pip_install/base.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/embed/base_embed.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/embed/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/embed/pip_invoke.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/embed/wheels/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/seed/embed/wheels/acquire.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/debug.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/describe.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/creator.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/venv.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/api.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/via_global_self_do.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/ref.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/builtin_way.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/cpython/cpython2.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/cpython/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/cpython/common.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/cpython/cpython3.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/pypy/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/pypy/pypy2.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/pypy/common.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/pypy/pypy3.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/python2/__init__.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/python2/site.py",
		".venv/lib/python3.8/site-packages/virtualenv/create/via_global_ref/builtin/python2/python2.py",
		".venv/lib/python3.8/site-packages/yaml/nodes.py",
		".venv/lib/python3.8/site-packages/yaml/error.py",
		".venv/lib/python3.8/site-packages/yaml/representer.py",
		".venv/lib/python3.8/site-packages/yaml/__init__.py",
		".venv/lib/python3.8/site-packages/yaml/scanner.py",
		".venv/lib/python3.8/site-packages/yaml/serializer.py",
		".venv/lib/python3.8/site-packages/yaml/resolver.py",
		".venv/lib/python3.8/site-packages/yaml/reader.py",
		".venv/lib/python3.8/site-packages/yaml/events.py",
		".venv/lib/python3.8/site-packages/yaml/emitter.py",
		".venv/lib/python3.8/site-packages/yaml/composer.py",
		".venv/lib/python3.8/site-packages/yaml/loader.py",
		".venv/lib/python3.8/site-packages/yaml/parser.py",
		".venv/lib/python3.8/site-packages/yaml/tokens.py",
		".venv/lib/python3.8/site-packages/yaml/cyaml.py",
		".venv/lib/python3.8/site-packages/yaml/constructor.py",
		".venv/lib/python3.8/site-packages/yaml/dumper.py",
		".venv/lib/python3.8/site-packages/pip/exceptions.py",
		".venv/lib/python3.8/site-packages/pip/__init__.py",
		".venv/lib/python3.8/site-packages/pip/status_codes.py",
		".venv/lib/python3.8/site-packages/pip/cmdoptions.py",
		".venv/lib/python3.8/site-packages/pip/__main__.py",
		".venv/lib/python3.8/site-packages/pip/basecommand.py",
		".venv/lib/python3.8/site-packages/pip/pep425tags.py",
		".venv/lib/python3.8/site-packages/pip/wheel.py",
		".venv/lib/python3.8/site-packages/pip/baseparser.py",
		".venv/lib/python3.8/site-packages/pip/locations.py",
		".venv/lib/python3.8/site-packages/pip/index.py",
		".venv/lib/python3.8/site-packages/pip/download.py",
		".venv/lib/python3.8/site-packages/pip/compat/__init__.py",
		".venv/lib/python3.8/site-packages/pip/compat/dictconfig.py",
		".venv/lib/python3.8/site-packages/pip/utils/__init__.py",
		".venv/lib/python3.8/site-packages/pip/utils/setuptools_build.py",
		".venv/lib/python3.8/site-packages/pip/utils/build.py",
		".venv/lib/python3.8/site-packages/pip/utils/deprecation.py",
		".venv/lib/python3.8/site-packages/pip/utils/ui.py",
		".venv/lib/python3.8/site-packages/pip/utils/logging.py",
		".venv/lib/python3.8/site-packages/pip/utils/outdated.py",
		".venv/lib/python3.8/site-packages/pip/utils/glibc.py",
		".venv/lib/python3.8/site-packages/pip/utils/encoding.py",
		".venv/lib/python3.8/site-packages/pip/utils/appdirs.py",
		".venv/lib/python3.8/site-packages/pip/utils/hashes.py",
		".venv/lib/python3.8/site-packages/pip/utils/packaging.py",
		".venv/lib/python3.8/site-packages/pip/utils/filesystem.py",
		".venv/lib/python3.8/site-packages/pip/operations/__init__.py",
		".venv/lib/python3.8/site-packages/pip/operations/freeze.py",
		".venv/lib/python3.8/site-packages/pip/operations/check.py",
		".venv/lib/python3.8/site-packages/pip/vcs/__init__.py",
		".venv/lib/python3.8/site-packages/pip/vcs/git.py",
		".venv/lib/python3.8/site-packages/pip/vcs/mercurial.py",
		".venv/lib/python3.8/site-packages/pip/vcs/bazaar.py",
		".venv/lib/python3.8/site-packages/pip/vcs/subversion.py",
		".venv/lib/python3.8/site-packages/pip/commands/install.py",
		".venv/lib/python3.8/site-packages/pip/commands/completion.py",
		".venv/lib/python3.8/site-packages/pip/commands/__init__.py",
		".venv/lib/python3.8/site-packages/pip/commands/help.py",
		".venv/lib/python3.8/site-packages/pip/commands/hash.py",
		".venv/lib/python3.8/site-packages/pip/commands/wheel.py",
		".venv/lib/python3.8/site-packages/pip/commands/search.py",
		".venv/lib/python3.8/site-packages/pip/commands/list.py",
		".venv/lib/python3.8/site-packages/pip/commands/show.py",
		".venv/lib/python3.8/site-packages/pip/commands/freeze.py",
		".venv/lib/python3.8/site-packages/pip/commands/check.py",
		".venv/lib/python3.8/site-packages/pip/commands/download.py",
		".venv/lib/python3.8/site-packages/pip/commands/uninstall.py",
		".venv/lib/python3.8/site-packages/pip/_vendor/__init__.py",
		".venv/lib/python3.8/site-packages/pip/models/__init__.py",
		".venv/lib/python3.8/site-packages/pip/models/index.py",
		".venv/lib/python3.8/site-packages/pip/req/__init__.py",
		".venv/lib/python3.8/site-packages/pip/req/req_set.py",
		".venv/lib/python3.8/site-packages/pip/req/req_install.py",
		".venv/lib/python3.8/site-packages/pip/req/req_file.py",
		".venv/lib/python3.8/site-packages/pip/req/req_uninstall.py",
		".venv/lib/python3.8/site-packages/mypyc/exceptions.py",
		".venv/lib/python3.8/site-packages/mypyc/emitfunc.py",
		".venv/lib/python3.8/site-packages/mypyc/prebuildvisitor.py",
		".venv/lib/python3.8/site-packages/mypyc/ops_tuple.py",
		".venv/lib/python3.8/site-packages/mypyc/ops.py",
		".venv/lib/python3.8/site-packages/mypyc/__init__.py",
		".venv/lib/python3.8/site-packages/mypyc/crash.py",
		".venv/lib/python3.8/site-packages/mypyc/genops.py",
		".venv/lib/python3.8/site-packages/mypyc/errors.py",
		".venv/lib/python3.8/site-packages/mypyc/common.py",
		".venv/lib/python3.8/site-packages/mypyc/sametype.py",
		".venv/lib/python3.8/site-packages/mypyc/build.py",
		".venv/lib/python3.8/site-packages/mypyc/emitwrapper.py",
		".venv/lib/python3.8/site-packages/mypyc/subtype.py",
		".venv/lib/python3.8/site-packages/mypyc/genops_for.py",
		".venv/lib/python3.8/site-packages/mypyc/options.py",
		".venv/lib/python3.8/site-packages/mypyc/ops_misc.py",
		".venv/lib/python3.8/site-packages/mypyc/ops_dict.py",
		".venv/lib/python3.8/site-packages/mypyc/ops_primitive.py",
		".venv/lib/python3.8/site-packages/mypyc/emitclass.py",
		".venv/lib/python3.8/site-packages/mypyc/ops_set.py",
		".venv/lib/python3.8/site-packages/mypyc/analysis.py",
		".venv/lib/python3.8/site-packages/mypyc/namegen.py",
		".venv/lib/python3.8/site-packages/mypyc/ops_str.py",
		".venv/lib/python3.8/site-packages/mypyc/emit.py",
		".venv/lib/python3.8/site-packages/mypyc/refcount.py",
		".venv/lib/python3.8/site-packages/mypyc/emitmodule.py",
		".venv/lib/python3.8/site-packages/mypyc/uninit.py",
		".venv/lib/python3.8/site-packages/mypyc/ops_exc.py",
		".venv/lib/python3.8/site-packages/mypyc/rt_subtype.py",
		".venv/lib/python3.8/site-packages/mypyc/ops_int.py",
		".venv/lib/python3.8/site-packages/mypyc/ops_list.py",
		".venv/lib/python3.8/site-packages/mypyc/cstring.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_external.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_refcount.py",
		".venv/lib/python3.8/site-packages/mypyc/test/testutil.py",
		".venv/lib/python3.8/site-packages/mypyc/test/__init__.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_namegen.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_emitfunc.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_genops.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_commandline.py",
		".venv/lib/python3.8/site-packages/mypyc/test/config.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_exceptions.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_analysis.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_run.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_tuplename.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_emit.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_serialization.py",
		".venv/lib/python3.8/site-packages/mypyc/test/test_emitwrapper.py",
		".venv/lib/python3.8/site-packages/pyflakes/__init__.py",
		".venv/lib/python3.8/site-packages/pyflakes/__main__.py",
		".venv/lib/python3.8/site-packages/pyflakes/checker.py",
		".venv/lib/python3.8/site-packages/pyflakes/api.py",
		".venv/lib/python3.8/site-packages/pyflakes/reporter.py",
		".venv/lib/python3.8/site-packages/pyflakes/messages.py",
		".venv/lib/python3.8/site-packages/pyflakes/scripts/__init__.py",
		".venv/lib/python3.8/site-packages/pyflakes/scripts/pyflakes.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_code_segment.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_builtin.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/__init__.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_api.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_return_with_arguments_inside_generator.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_checker.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_is_literal.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_doctests.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_other.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_imports.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_type_annotations.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_undefined_names.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/test_dict.py",
		".venv/lib/python3.8/site-packages/pyflakes/test/harness.py",
		".venv/lib/python3.8/site-packages/regex/__init__.py",
		".venv/lib/python3.8/site-packages/regex/test_regex.py",
		".venv/lib/python3.8/site-packages/regex/regex.py",
		".venv/lib/python3.8/site-packages/regex/_regex_core.py",
		".venv/lib/python3.8/site-packages/aspy/__init__.py",
		".venv/lib/python3.8/site-packages/aspy/yaml/__init__.py",
		".venv/lib/python3.8/site-packages/click/exceptions.py",
		".venv/lib/python3.8/site-packages/click/__init__.py",
		".venv/lib/python3.8/site-packages/click/testing.py",
		".venv/lib/python3.8/site-packages/click/_termui_impl.py",
		".venv/lib/python3.8/site-packages/click/formatting.py",
		".venv/lib/python3.8/site-packages/click/_compat.py",
		".venv/lib/python3.8/site-packages/click/core.py",
		".venv/lib/python3.8/site-packages/click/termui.py",
		".venv/lib/python3.8/site-packages/click/globals.py",
		".venv/lib/python3.8/site-packages/click/parser.py",
		".venv/lib/python3.8/site-packages/click/types.py",
		".venv/lib/python3.8/site-packages/click/decorators.py",
		".venv/lib/python3.8/site-packages/click/utils.py",
		".venv/lib/python3.8/site-packages/click/_unicodefun.py",
		".venv/lib/python3.8/site-packages/click/_winconsole.py",
		".venv/lib/python3.8/site-packages/click/_bashcomplete.py",
		".venv/lib/python3.8/site-packages/click/_textwrap.py",
		".venv/lib/python3.8/site-packages/distlib/scripts.py",
		".venv/lib/python3.8/site-packages/distlib/__init__.py",
		".venv/lib/python3.8/site-packages/distlib/compat.py",
		".venv/lib/python3.8/site-packages/distlib/metadata.py",
		".venv/lib/python3.8/site-packages/distlib/wheel.py",
		".venv/lib/python3.8/site-packages/distlib/index.py",
		".venv/lib/python3.8/site-packages/distlib/resources.py",
		".venv/lib/python3.8/site-packages/distlib/database.py",
		".venv/lib/python3.8/site-packages/distlib/manifest.py",
		".venv/lib/python3.8/site-packages/distlib/util.py",
		".venv/lib/python3.8/site-packages/distlib/locators.py",
		".venv/lib/python3.8/site-packages/distlib/version.py",
		".venv/lib/python3.8/site-packages/distlib/markers.py",
		".venv/lib/python3.8/site-packages/distlib/_backport/__init__.py",
		".venv/lib/python3.8/site-packages/distlib/_backport/shutil.py",
		".venv/lib/python3.8/site-packages/distlib/_backport/misc.py",
		".venv/lib/python3.8/site-packages/distlib/_backport/sysconfig.py",
		".venv/lib/python3.8/site-packages/distlib/_backport/tarfile.py",
		".venv/lib/python3.8/site-packages/pathspec/__init__.py",
		".venv/lib/python3.8/site-packages/pathspec/pattern.py",
		".venv/lib/python3.8/site-packages/pathspec/compat.py",
		".venv/lib/python3.8/site-packages/pathspec/pathspec.py",
		".venv/lib/python3.8/site-packages/pathspec/util.py",
		".venv/lib/python3.8/site-packages/pathspec/patterns/__init__.py",
		".venv/lib/python3.8/site-packages/pathspec/patterns/gitwildmatch.py",
		".venv/lib/python3.8/site-packages/pathspec/tests/__init__.py",
		".venv/lib/python3.8/site-packages/pathspec/tests/test_util.py",
		".venv/lib/python3.8/site-packages/pathspec/tests/test_pathspec.py",
		".venv/lib/python3.8/site-packages/pathspec/tests/test_gitwildmatch.py",
		".venv/lib/python3.8/site-packages/setuptools/__init__.py",
		".venv/lib/python3.8/site-packages/setuptools/site-patch.py",
		".venv/lib/python3.8/site-packages/setuptools/py33compat.py",
		".venv/lib/python3.8/site-packages/setuptools/py31compat.py",
		".venv/lib/python3.8/site-packages/setuptools/archive_util.py",
		".venv/lib/python3.8/site-packages/setuptools/launch.py",
		".venv/lib/python3.8/site-packages/setuptools/glob.py",
		".venv/lib/python3.8/site-packages/setuptools/namespaces.py",
		".venv/lib/python3.8/site-packages/setuptools/dep_util.py",
		".venv/lib/python3.8/site-packages/setuptools/config.py",
		".venv/lib/python3.8/site-packages/setuptools/msvc.py",
		".venv/lib/python3.8/site-packages/setuptools/windows_support.py",
		".venv/lib/python3.8/site-packages/setuptools/pep425tags.py",
		".venv/lib/python3.8/site-packages/setuptools/wheel.py",
		".venv/lib/python3.8/site-packages/setuptools/py36compat.py",
		".venv/lib/python3.8/site-packages/setuptools/glibc.py",
		".venv/lib/python3.8/site-packages/setuptools/extension.py",
		".venv/lib/python3.8/site-packages/setuptools/depends.py",
		".venv/lib/python3.8/site-packages/setuptools/ssl_support.py",
		".venv/lib/python3.8/site-packages/setuptools/unicode_utils.py",
		".venv/lib/python3.8/site-packages/setuptools/sandbox.py",
		".venv/lib/python3.8/site-packages/setuptools/build_meta.py",
		".venv/lib/python3.8/site-packages/setuptools/dist.py",
		".venv/lib/python3.8/site-packages/setuptools/package_index.py",
		".venv/lib/python3.8/site-packages/setuptools/py27compat.py",
		".venv/lib/python3.8/site-packages/setuptools/monkey.py",
		".venv/lib/python3.8/site-packages/setuptools/version.py",
		".venv/lib/python3.8/site-packages/setuptools/lib2to3_ex.py",
		".venv/lib/python3.8/site-packages/setuptools/command/install.py",
		".venv/lib/python3.8/site-packages/setuptools/command/install_lib.py",
		".venv/lib/python3.8/site-packages/setuptools/command/register.py",
		".venv/lib/python3.8/site-packages/setuptools/command/install_egg_info.py",
		".venv/lib/python3.8/site-packages/setuptools/command/upload.py",
		".venv/lib/python3.8/site-packages/setuptools/command/__init__.py",
		".venv/lib/python3.8/site-packages/setuptools/command/build_py.py",
		".venv/lib/python3.8/site-packages/setuptools/command/bdist_wininst.py",
		".venv/lib/python3.8/site-packages/setuptools/command/test.py",
		".venv/lib/python3.8/site-packages/setuptools/command/alias.py",
		".venv/lib/python3.8/site-packages/setuptools/command/easy_install.py",
		".venv/lib/python3.8/site-packages/setuptools/command/upload_docs.py",
		".venv/lib/python3.8/site-packages/setuptools/command/egg_info.py",
		".venv/lib/python3.8/site-packages/setuptools/command/build_clib.py",
		".venv/lib/python3.8/site-packages/setuptools/command/install_scripts.py",
		".venv/lib/python3.8/site-packages/setuptools/command/rotate.py",
		".venv/lib/python3.8/site-packages/setuptools/command/saveopts.py",
		".venv/lib/python3.8/site-packages/setuptools/command/py36compat.py",
		".venv/lib/python3.8/site-packages/setuptools/command/sdist.py",
		".venv/lib/python3.8/site-packages/setuptools/command/bdist_egg.py",
		".venv/lib/python3.8/site-packages/setuptools/command/dist_info.py",
		".venv/lib/python3.8/site-packages/setuptools/command/setopt.py",
		".venv/lib/python3.8/site-packages/setuptools/command/develop.py",
		".venv/lib/python3.8/site-packages/setuptools/command/bdist_rpm.py",
		".venv/lib/python3.8/site-packages/setuptools/command/build_ext.py",
		".venv/lib/python3.8/site-packages/setuptools/extern/__init__.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/__init__.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/pyparsing.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/six.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/__init__.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/_compat.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/__about__.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/_structures.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/requirements.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/utils.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/specifiers.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/version.py",
		".venv/lib/python3.8/site-packages/setuptools/_vendor/packaging/markers.py",
		".venv/lib/python3.8/site-packages/flake8/exceptions.py",
		".venv/lib/python3.8/site-packages/flake8/__init__.py",
		".venv/lib/python3.8/site-packages/flake8/style_guide.py",
		".venv/lib/python3.8/site-packages/flake8/__main__.py",
		".venv/lib/python3.8/site-packages/flake8/checker.py",
		".venv/lib/python3.8/site-packages/flake8/processor.py",
		".venv/lib/python3.8/site-packages/flake8/statistics.py",
		".venv/lib/python3.8/site-packages/flake8/utils.py",
		".venv/lib/python3.8/site-packages/flake8/defaults.py",
		".venv/lib/python3.8/site-packages/flake8/main/debug.py",
		".venv/lib/python3.8/site-packages/flake8/main/setuptools_command.py",
		".venv/lib/python3.8/site-packages/flake8/main/__init__.py",
		".venv/lib/python3.8/site-packages/flake8/main/git.py",
		".venv/lib/python3.8/site-packages/flake8/main/options.py",
		".venv/lib/python3.8/site-packages/flake8/main/application.py",
		".venv/lib/python3.8/site-packages/flake8/main/mercurial.py",
		".venv/lib/python3.8/site-packages/flake8/main/cli.py",
		".venv/lib/python3.8/site-packages/flake8/main/vcs.py",
		".venv/lib/python3.8/site-packages/flake8/options/__init__.py",
		".venv/lib/python3.8/site-packages/flake8/options/config.py",
		".venv/lib/python3.8/site-packages/flake8/options/manager.py",
		".venv/lib/python3.8/site-packages/flake8/options/aggregator.py",
		".venv/lib/python3.8/site-packages/flake8/formatting/__init__.py",
		".venv/lib/python3.8/site-packages/flake8/formatting/base.py",
		".venv/lib/python3.8/site-packages/flake8/formatting/default.py",
		".venv/lib/python3.8/site-packages/flake8/api/__init__.py",
		".venv/lib/python3.8/site-packages/flake8/api/legacy.py",
		".venv/lib/python3.8/site-packages/flake8/plugins/__init__.py",
		".venv/lib/python3.8/site-packages/flake8/plugins/pyflakes.py",
		".venv/lib/python3.8/site-packages/flake8/plugins/manager.py",
		".venv/lib/python3.8/site-packages/pydocstyle/__init__.py",
		".venv/lib/python3.8/site-packages/pydocstyle/wordlists.py",
		".venv/lib/python3.8/site-packages/pydocstyle/__main__.py",
		".venv/lib/python3.8/site-packages/pydocstyle/checker.py",
		".venv/lib/python3.8/site-packages/pydocstyle/config.py",
		".venv/lib/python3.8/site-packages/pydocstyle/parser.py",
		".venv/lib/python3.8/site-packages/pydocstyle/violations.py",
		".venv/lib/python3.8/site-packages/pydocstyle/cli.py",
		".venv/lib/python3.8/site-packages/pydocstyle/utils.py",
		".venv/lib/python3.8/site-packages/identify/__init__.py",
		".venv/lib/python3.8/site-packages/identify/identify.py",
		".venv/lib/python3.8/site-packages/identify/cli.py",
		".venv/lib/python3.8/site-packages/identify/interpreters.py",
		".venv/lib/python3.8/site-packages/identify/extensions.py",
		".venv/lib/python3.8/site-packages/identify/vendor/__init__.py",
		".venv/lib/python3.8/site-packages/identify/vendor/licenses.py",
		".venv/lib/python3.8/site-packages/attr/exceptions.py",
		".venv/lib/python3.8/site-packages/attr/validators.py",
		".venv/lib/python3.8/site-packages/attr/__init__.py",
		".venv/lib/python3.8/site-packages/attr/_version_info.py",
		".venv/lib/python3.8/site-packages/attr/filters.py",
		".venv/lib/python3.8/site-packages/attr/_compat.py",
		".venv/lib/python3.8/site-packages/attr/converters.py",
		".venv/lib/python3.8/site-packages/attr/_funcs.py",
		".venv/lib/python3.8/site-packages/attr/_config.py",
		".venv/lib/python3.8/site-packages/attr/_make.py",
		".venv/lib/python3.8/site-packages/blib2to3/__init__.py",
		".venv/lib/python3.8/site-packages/blib2to3/pytree.py",
		".venv/lib/python3.8/site-packages/blib2to3/pygram.py",
		".venv/lib/python3.8/site-packages/blib2to3/pgen2/__init__.py",
		".venv/lib/python3.8/site-packages/blib2to3/pgen2/literals.py",
		".venv/lib/python3.8/site-packages/blib2to3/pgen2/grammar.py",
		".venv/lib/python3.8/site-packages/blib2to3/pgen2/conv.py",
		".venv/lib/python3.8/site-packages/blib2to3/pgen2/pgen.py",
		".venv/lib/python3.8/site-packages/blib2to3/pgen2/driver.py",
		".venv/lib/python3.8/site-packages/blib2to3/pgen2/parse.py",
		".venv/lib/python3.8/site-packages/blib2to3/pgen2/tokenize.py",
		".venv/lib/python3.8/site-packages/blib2to3/pgen2/token.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/swedish_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/basque_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/norwegian_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/__init__.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/english_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/finnish_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/portuguese_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/lithuanian_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/danish_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/romanian_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/catalan_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/greek_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/german_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/dutch_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/spanish_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/hungarian_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/italian_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/russian_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/french_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/turkish_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/irish_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/porter_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/indonesian_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/tamil_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/nepali_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/basestemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/arabic_stemmer.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/among.py",
		".venv/lib/python3.8/site-packages/snowballstemmer/hindi_stemmer.py",
		".venv/lib/python3.8/site-packages/toml/__init__.py",
		".venv/lib/python3.8/site-packages/toml/encoder.py",
		".venv/lib/python3.8/site-packages/toml/decoder.py",
		".venv/lib/python3.8/site-packages/toml/tz.py",
		".venv/lib/python3.8/site-packages/toml/ordered.py",
		".venv/lib/python3.8/site-packages/isort/pie_slice.py",
		".venv/lib/python3.8/site-packages/isort/__init__.py",
		".venv/lib/python3.8/site-packages/isort/pylama_isort.py",
		".venv/lib/python3.8/site-packages/isort/__main__.py",
		".venv/lib/python3.8/site-packages/isort/hooks.py",
		".venv/lib/python3.8/site-packages/isort/main.py",
		".venv/lib/python3.8/site-packages/isort/settings.py",
		".venv/lib/python3.8/site-packages/isort/isort.py",
		".venv/lib/python3.8/site-packages/isort/utils.py",
		".venv/lib/python3.8/site-packages/isort/finders.py",
		".venv/lib/python3.8/site-packages/isort/natural.py",
		".venv/lib/python3.8/site-packages/typed_ast/__init__.py",
		".venv/lib/python3.8/site-packages/typed_ast/ast3.py",
		".venv/lib/python3.8/site-packages/typed_ast/conversions.py",
		".venv/lib/python3.8/site-packages/typed_ast/ast27.py",
		".venv/lib/python3.8/site-packages/typed_ast/tests/test_basics.py",
		"tests/test_cell_handling.py",
		"tests/_helpers.py"
	]
}


================================================
FILE: .codecov.yml
================================================
ignore:
  - "lib/client"  # ignore folders and all its contents


================================================
FILE: .flake8
================================================
[flake8]
ignore =
    # whitespace before ':'
    E203,
    # missing docstrings
    D100,D101,D102,D103,D104,D105,D106,D107,
    D203,
    W503
exclude =
    .git,
    .venv,
    __pycache__,
    build,
    dist,
    docs/source/conf.py,
    lib,
    old
max-line-length= 88


================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.8]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install flake8 flake8-blind-except flake8-comprehensions flake8-docstrings flake8-eradicate
    - name: Lint with flake8
      run: |
        flake8 .


================================================
FILE: .gitignore
================================================
# Python Stuff
*.pyc
.venv/

# Sublime Stuff
*.sublime-project
*.sublime-workspace


================================================
FILE: .pre-commit-config.yaml
================================================
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [push]
default_language_version:
    python: python3.8
exclude: "lib/client"

repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.4.0
    hooks:
    -   id: check-added-large-files
    -   id: check-ast
    -   id: check-case-conflict
    -   id: check-merge-conflict
    -   id: check-toml
    -   id: check-yaml

-   repo: local
    hooks:
    -   id: black
        name: black
        entry: black
        language: system
        types: [python]
    -   id: flake8
        name: flake8
        entry: flake8
        language: system
        types: [python]
        args: [--config, pyproject.toml]
    -   id: isort
        name: isort
        entry: isort
        language: system
        types: [python]


================================================
FILE: .python-version
================================================
3.8


================================================
FILE: CONTRIBUTORS.md
================================================
This package would not exist without the original work done by NEGORO Tetsuya (https://github.com/ngr-t).


================================================
FILE: Default.sublime-commands
================================================
[
  {
    "caption": "Helium: Connect Kernel",
    "command": "helium_connect_kernel"
  },
  {
    "caption": "Helium: Start Kernel",
    "command": "helium_start_kernel"
  },
  {
    "caption": "Helium: Shutdown Kernel",
    "command": "helium_shutdown_kernel"
  },
  {
    "caption": "Helium: Restart Kernel",
    "command": "helium_restart_kernel"
  },
  {
    "caption": "Helium: Interrupt Kernel",
    "command": "helium_interrupt_kernel"
  },
  {
    "caption": "Helium: Execute Block",
    "command": "helium_execute_block"
  },
  {
    "caption": "Helium: Execute Cell",
    "command": "helium_execute_cell"
  },
  {
    "caption": "Helium: Execute Cell and Move",
    "command": "helium_execute_cell", "args":
    {
      "move_cursor": "True"
    }
  },
  {
    "caption": "Helium: List Kernels",
    "command": "helium_list_kernels"
  },
  {
    "caption": "Helium: Get Object Inspection",
    "command": "helium_get_object_inspection"
  },
  {
    "caption": "Helium: Clear All Cells",
    "command": "helium_clear_all_cells"
  },
  {
    "caption": "Helium: Settings",
    "command": "edit_settings", "args":
    {
      "base_file": "${packages}/Helium/Helium.sublime-settings",
      "default": "{\n  \"connections\": [\n    $0\n  ]\n}"
    }
  }
]


================================================
FILE: Default.sublime-keymap
================================================
[
    {"keys": ["ctrl+alt+enter"], "command": "helium_execute_cell", "args": {"move_cursor": "True"}}
]


================================================
FILE: Helium.sublime-settings
================================================
{
  "cell_delimiter_pattern": "^(#\\s?%%)|(# <codecell>)\\s*$",
  // Regex pattern to find code cell blocks delimiters
  // The default value hits the patterns below.
  // #%%
  // # %%
  // # <codecell>

  // Whether use Helium' autocomplete powered by Jupyter kernel.
  "complete": true,

  // Timeout to get completion (in seconds).
  "complete_timeout": 0.5,

  // Set to true to show output in current view, like Jupyter
  "inline_output": false,

  // Set true to show the executed code in the output
  "output_code": false,

  // "image_size" controls the size of the image. It can take one three values:
  //     "original":         The image is displayed with its original size.
  //     "resize_to_window": The image is rescaled to match the size of the window.
  //     "optimal":          The image is either resized or has its original size,
  //                         whichever is smaller.
  // The default is "optimal".
  "image_size": "optimal",

  // If you use kernels located in the directory other than default search path
  // (see http://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs),
  // set their path as below.
  // "jupyter_path": "/path/to/kernel"
}


================================================
FILE: Helium.sublime-syntax
================================================
%YAML 1.2
---
name: Helium IPython
scope: source.helium.output

variables:
  command_start: "In\\[\\d+\\]:"
  error_start:   "Error\\[[^\\]]+\\]:"   # Not sure what should go inside the brackets of Error
  streams:       "\\(stdout|display data|stderr\\):"

contexts:


  main:
    - match: |-
        \b({{command_start}})
      comment: Cell contents formatted in python
      name: cell.content
      embed:  scope:source.python
      escape: (?={{streams}}|{{command_start}}|{{error_start}}) # Outputs are formatted
      captures:
        1: markup.bold

    - match: |-
        ({{streams}})
      name: streams
      comment: Streams' names in bold
      captures:
        1: markup.italic 


================================================
FILE: LICENSE.TXT
================================================
Helium package is licensed under GNU GENERAL PUBLIC LICENSE Version 2.
YEAR: 2016-2018
COPYRIGHT HOLDER: NEGORO Tetsuya

This package includes libraries below.

  - ipython_genutils
  - jupyter_core
  - traitlets
  - decorator

This package includes a modified version of library below.

  - jupyter_client

ipython_genutils is licensed under the terms of the Modified BSD License (also known as New or Revised or 3-Clause BSD), as follows:

  - Copyright (c) 2001-, IPython Development Team

jupyter_core is licensed under the terms of the Modified BSD License (also known as New or Revised or 3-Clause BSD).

  - Copyright (c) 2015-, Jupyter Development Team

jupyter_client is licensed under the terms of the Modified BSD License (also known as New or Revised or 3-Clause BSD), as follows:

  - Copyright (c) 2001-2015, IPython Development Team
  - Copyright (c) 2015-, Jupyter Development Team

traitlets is licensed under the terms of the Modified BSD License (also known as New or Revised or 3-Clause BSD), as follows:

  - Copyright (c) 2001-, IPython Development Team

decorator is licensed under BSD 2-Clause "Simplified" License.

  - Copyright (c) 2005-2018, Michele Simionato


BSD 2-Clause License
----

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

  Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.
  Redistributions in bytecode form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in
  the documentation and/or other materials provided with the
  distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.


the Modified BSD License:
----

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the IPython Development Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: Main.sublime-menu
================================================
[
    {
        "caption": "Preferences",
        "mnemonic": "n",
        "id": "preferences",
        "children":
        [
            {
                "caption": "Package Settings",
                "mnemonic": "P",
                "id": "package-settings",
                "children":
                [
                    {
                        "caption": "Helium",
                        "children":
                        [
                            {
                                "command": "open_file", "args":
                                {
                                    "file": "${packages}/Helium/Helium.sublime-settings"
                                },
                                "caption": "Settings – Default"
                            },
                            {
                                "command": "open_file", "args":
                                {
                                    "file": "${packages}/User/Helium.sublime-settings"
                                },
                                "caption": "Settings – User"
                            },
                        ]
                    }
                ]
            }
        ]
    }
]


================================================
FILE: README.md
================================================
Helium package for Sublime Text
===

Helium is a package for Sublime Text, which provides in-editor code execution and autocomplete in interaction with Jupyter kernels.
The concept of an editor extension communicating Jupyter kernels is inspired by @nteract's splendid Atom package [Hydrogen](https://github.com/nteract/Hydrogen). I want something like it in Sublime Text, too.

Any feedback is highly welcome. I hope this package will help your life with ST3!

![Introduction image](raw/images/README/animated.gif)


## Installation

Now this package is under the package control channel!

You can install it with Package Control plugin, run `Package Control: Install Package`, then choose `Helium` from the package list.


## Usage


### Connecting to Jupyter kernels

#### 1. The most basic way, start a kernelspec installed locally, as a subprocess of ST3 (the process stops when Sublime stops)

  1. Run `Helium: connect kernel` command.
  2. Choose `New kernel`.
  3. Choose the kernelspec you want to run.


#### 2. Connect to the kernel already runnning and connected to Helium

  1. Run `Helium: connect kernel` command.
  2. Choose the kernel you want to connect.

#### 3. Connect to a kernel already running under some other Jupyter app (such as Notebook)

  1. Get connection info of the kernel. The way to get connection info differ among kernels, see the doc of each kernel (in ipython kernel, you can get it by `%connect_info` magic.)
  2. Run `Helium: connect kernel` command.
  3. Choose `New kernel`.
  4. Choose `(Enter connection info)`.
  5. Enter the connection info (Helium accepts a path or connection info itself).


#### Using Python kernel installed via Conda

Python kernel installed via Conda is not found by Jupyter by default. You should add the path to kernel into the `jupyter_path` entry of the config file.


### Execution

Execute code by `Helium: Execute Block` (whose command name is `helium_execute_block`).

#### Code cell

Regions surrounded by `# %%` or `# <codecell>` (you can configure it in `cell_delimiter_pattern` option item) are considered as "code cells".

You can execute a region by `Helium: Execute cell` (`helium_execute_cell`) or `Helium: Execute Cell and Move` command.
Each cell has a clickable "Run Cell" phantom that appears next to the cell markers to run the cell.

### Object inspection

Get Object Inspection by `Helium: Get Object Inspection` (whose command name is `helium_get_object_inspection`).

### Autocomplete

You should be able to get autocomplete from the kernel from the time you connected. If you don't want autocomplete, set `"complete"` as `false` in setting file.

### Other kernel manipulations

You can restart, shutdown, and interrupt process via `Helium: Restart Kernel`, `Helium: Shutdown Kernel`, `Helium: Interrupt Kernel` commands.

You can also run these command as a submenu of `Helium: List Kernels` command.


## Motivation of development

### Why using Jupyter?

We can execute code, retrieve results including images, get completions and object inspections by the Jupyter protocol regardless of the interpreter implementation of languages if it has Jupyter kernel.
If we try to do that by directly running interpreters there should be several interpreter-specific problems, but we can entrust the kernel maintainers on language-specific problems by using Jupyter.


### Why not using Jupyter Notebook?

I admit Jupyter Notebook is a powerful tool for instantly sharing small analysis work, exploring data or APIs, or making executable tutorials. Yes, I often use it, too.
However, in my opinion, it is not suited for projects with large code bases.
I want to jumpt across files instantly, make modules organized (not saved as `.ipynb`s), kick scripts with various parameters, and make project code more reusable and reproducible... but still I want to edit them with interactive feedback.


================================================
FILE: dependencies.json
================================================
{
	"windows": {
		"<4000": [
			"dateutil",
			"enum",
			"python-six",
			"pyzmq"
		],
		">=4000": [
			"dateutil",
			"python-six",
			"pyzmq",
			"tornado"
		]
	},
	"osx": {
		"<4000": [
			"dateutil",
			"enum",
			"pexpect",
			"ptyprocess",
			"python-six",
			"pyzmq"
		],
		">=4000": [
			"dateutil",
			"pexpect",
			"ptyprocess",
			"python-six",
			"pyzmq",
			"tornado"
		]
	},
	"linux": {
		"<4000": [
			"dateutil",
			"enum",
			"pexpect",
			"ptyprocess",
			"python-six",
			"pyzmq"
		],
		">=4000": [
			"dateutil",
			"pexpect",
			"ptyprocess",
			"python-six",
			"pyzmq",
			"tornado"
		]
	}
}

================================================
FILE: helium.py
================================================
"""Helium package for Sublime Text 3.

The package provides code execution and completion in interaction with Jupyter.

Copyright (c) 2016-2018, NEGORO Tetsuya (https://github.com/ngr-t)
"""

import json
import os
import re
import uuid
from functools import partial
from logging import INFO, StreamHandler, getLogger
from os.path import expanduser

import sublime
from sublime_plugin import EventListener, TextCommand, ViewEventListener

from .lib.kernel import MAX_PHANTOMS, KernelConnection
from .lib.utils import add_path, chain_callbacks, get_cell

with add_path(os.path.join(os.path.dirname(__file__), "lib/client")):
    # Import jupyter_client related functions and classes.
    # Temporarily insert `lib` into sys.path not to affect other packages.
    from jupyter_client.connect import tunnel_to_kernel
    from jupyter_client.kernelspec import find_kernel_specs
    from jupyter_client.manager import KernelManager


# Logger setting
HELIUM_LOGGER = getLogger(__name__)
HANDLER = StreamHandler()
HANDLER.setLevel(INFO)


if len(HELIUM_LOGGER.handlers) == 0:
    HELIUM_LOGGER.setLevel(INFO)
    HELIUM_LOGGER.addHandler(HANDLER)

# Regex patterns to extract code lines.
INDENT_PATTERN = re.compile(r"^([ \t]*)")


# TODO: move CSS into separate file
RUN_CELL_PHANTOM = """<body id="helium-runCell">
  <style>
    .runCell {
        text-decoration: none;
        color: color(var(--bluish) alpha(0.33));
        font-style: italic;
    }
  </style>
  <a class='runCell' href='runCell'>Run cell</a>
</body>
"""

RUN_CELL_PHANTOM_ID = "HeliumRunCell"


ORG_JUPYTER_PATH = os.environ.get("JUPYTER_PATH")


def _refresh_jupyter_path():
    additional_jupyter_path = sublime.load_settings("Helium.sublime-settings").get(
        "jupyter_path"
    )
    os.environ["JUPYTER_PATH"] = ":".join(
        [
            path
            for path in [ORG_JUPYTER_PATH, additional_jupyter_path]
            if path is not None
        ]
    )


class ViewManager(object):
    """Manage the relation of views and kernels."""

    view_kernel_table = {}

    def __new__(cls, *args, **kwargs):
        if not hasattr(cls, "__instance__"):
            cls.__instance__ = super(ViewManager, object).__new__(cls, *args, **kwargs)
        return cls.__instance__

    def __init__(self, *args, **kwargs):
        pass

    @classmethod
    def connect_kernel(cls, buffer_id, lang, kernel_id):
        """Connect view to kernel."""
        kernel = HeliumKernelManager.get_kernel(kernel_id)
        cls.view_kernel_table[buffer_id] = kernel
        inline_output = sublime.load_settings("Helium.sublime-settings").get(
            "inline_output"
        )
        if not inline_output:
            kernel.activate_view()

    @classmethod
    def remove_view(cls, buffer_id):
        """Remove view from manager."""
        if buffer_id in cls.view_kernel_table:
            del cls.view_kernel_table[buffer_id]

    @classmethod
    def get_kernel_for_view(cls, buffer_id) -> KernelConnection:
        """Get Kernel instance corresponding to the buffer_id."""
        return cls.view_kernel_table[buffer_id]


class HeliumKernelManager(object):
    """Manage Jupyter kernels."""

    # The key is a tuple consisted of the name of kernelspec and kernel ID,
    # the value is a KernelConnection instance correspond to it.
    kernels = {}
    logger = HELIUM_LOGGER

    def __new__(cls, *args, **kwargs):
        """Make this class a singleton."""
        if not hasattr(cls, "__instance__"):
            cls.__instance__ = super(HeliumKernelManager, object).__new__(
                cls, *args, **kwargs
            )
        return cls.__instance__

    @classmethod
    def list_kernelspecs(cls):
        """Get the kernelspecs."""
        _refresh_jupyter_path()
        return find_kernel_specs()

    @classmethod
    def list_kernels(cls):
        """Get the list of kernels."""
        return [
            {"name": cls.get_kernel(kernel_id).lang, "id": kernel_id}
            for kernel_id in cls.kernels.keys()
            if cls.get_kernel(kernel_id).is_alive()
        ]

    @classmethod
    def list_kernel_reprs(cls):
        """Get the list of representations of kernels."""

        def get_repr(kernel):
            key = (kernel["name"], kernel["id"])
            try:
                return cls.kernels[key].repr
            except KeyError:
                return "[{lang}] {kernel_id}".format(
                    lang=kernel["name"], kernel_id=kernel["id"]
                )

        return list(map(get_repr, cls.list_kernels()))

    @classmethod
    def get_kernel(cls, kernel_id, connection_name=None):
        """Get KernelConnection object."""
        return cls.kernels[kernel_id]

    @classmethod
    def start_kernel(
        cls, kernelspec_name=None, connection_info=None, connection_name=None, cwd=None
    ):
        """Start kernel and return a `Kernel` instance."""
        kernel_id = uuid.uuid4()
        if not cwd:
            cwd = expanduser("~")

        if kernelspec_name:
            kernel_manager = KernelManager(kernel_name=kernelspec_name)
            kernel_manager.start_kernel(cwd=cwd)
        elif connection_info:
            kernel_manager = KernelManager()
            kernel_manager.load_connection_info(connection_info)
            # `KernelManager.kernel_name` is not automatically set from connection info.
            kernel_manager.kernel_name = connection_info.get("kernel_name", "")
        else:
            raise Exception(
                "You must specify any of {`kernelspec_name`, `connection_info`}."
            )
        kernel = KernelConnection(
            kernel_id,
            kernel_manager,
            cls,
            connection_name=connection_name,
            logger=cls.logger,
        )
        cls.kernels[kernel_id] = kernel
        return kernel

    @classmethod
    def shutdown_kernel(cls, kernel_id):
        """Shutdown kernel."""
        cls.get_kernel(kernel_id).shutdown_kernel()

    @classmethod
    def restart_kernel(cls, kernel_id):
        """Restart kernel."""
        cls.get_kernel(kernel_id).restart_kernel()

    @classmethod
    def interrupt_kernel(cls, kernel_id):
        """Interrupt kernel."""
        cls.get_kernel(kernel_id).interrupt_kernel()


@chain_callbacks
def _enter_connection_info(window, continue_cb):
    connection_info_str = yield partial(
        window.show_input_panel,
        "Enter connection info or the path to connection file.",
        "",
        on_change=None,
        on_cancel=None,
    )
    try:
        continue_cb(json.loads(connection_info_str))
    except ValueError:
        try:
            with open(connection_info_str) as infs:
                continue_cb(json.loads(infs.read()))
        except FileNotFoundError:
            sublime.message_dialog(
                "The input string was neither a valid JSON string nor a file path."
            )
            raise


@chain_callbacks
def _start_kernel(window, view, continue_cb=lambda: None, *, logger=HELIUM_LOGGER):
    kernelspecs = HeliumKernelManager.list_kernelspecs()
    menu_items = list(kernelspecs.keys()) + [
        "(Enter connection info)",
    ]
    index = yield partial(window.show_quick_panel, menu_items)

    cwd = None

    if view:
        cwd = expanduser("~")
    if view and view.file_name():
        cwd = os.path.dirname(view.file_name())

    if index == -1:
        return
    elif index == len(kernelspecs):
        # Create a kernel from connection info.
        connection_info = yield partial(_enter_connection_info, window)
        connection_name = yield partial(
            window.show_input_panel,
            "connection name",
            "",
            on_change=None,
            on_cancel=None,
        )

        if connection_name == "":
            connection_name = None

        kernel = HeliumKernelManager.start_kernel(
            connection_info=connection_info, connection_name=connection_name, cwd=cwd
        )
    elif index == len(kernelspecs) + 1:
        # Create a kernel with SSH tunneling.
        servers = sublime.load_settings("Helium.sublime-settings").get("ssh_servers")
        if not servers:
            sublime.message_dialog(
                "Please set `ssh_servers` item of the config file via `Helium: ` "
                "to connect SSH servers."
            )
            return
        menu_items = list(servers.keys())
        server_index = yield partial(window.show_quick_panel, menu_items)
        server = servers[menu_items[server_index]]
        connection_info = yield partial(_enter_connection_info, window)
        shell_port, iopub_port, stdin_port, hb_port = tunnel_to_kernel(
            connection_info, server["server"], server.get("key", None)
        )
        new_ports = {
            "shell_port": shell_port,
            "iopub_port": iopub_port,
            "stdin_port": stdin_port,
            "hb_port": hb_port,
        }
        connection_info.update(new_ports)
        connection_name = yield partial(
            window.show_input_panel,
            "connection name",
            "",
            on_change=None,
            on_cancel=None,
        )
        kernel = HeliumKernelManager.start_kernel(
            connection_info=connection_info, connection_name=connection_name
        )
    else:
        # Create a kernel from the kernelspec name.
        selected_kernelspec = menu_items[index]
        connection_name = yield partial(
            window.show_input_panel,
            "connection name",
            "",
            on_change=None,
            on_cancel=None,
        )
        if connection_name == "":
            connection_name = None
        kernel = HeliumKernelManager.start_kernel(
            kernelspec_name=selected_kernelspec,
            connection_name=connection_name,
            cwd=cwd,
        )
    ViewManager.connect_kernel(view.buffer_id(), kernel.lang, kernel.kernel_id)
    if view.file_name():
        view_name = view.file_name()
    else:
        view_name = view.name()
    log_info_msg = (
        "Connected view '{view_name}(id: {buffer_id})'" "to kernel {kernel_id}."
    ).format(
        view_name=view_name, buffer_id=view.buffer_id(), kernel_id=kernel.kernel_id
    )
    logger.info(log_info_msg)

    continue_cb()


class HeliumStartKernel(TextCommand):
    """Start a kernel and connect view to it."""

    def run(self, edit, *, logger=HELIUM_LOGGER):
        """Command definition."""
        _start_kernel(sublime.active_window(), self.view)
        self.view.run_command("helium_clear_all_cells")


# TODO: Make this an enum
class ListKernelsSubcommands(object):

    connect = "Connect"
    rename = "Rename"
    interrupt = "Interrupt"
    restart = "Restart"
    shutdown = "Shutdown"
    back = "Back to the kernel list"


@chain_callbacks
def _list_kernels(window, view, *, logger=HELIUM_LOGGER):
    sc = ListKernelsSubcommands
    selected_kernel = yield partial(
        _show_kernel_selection_menu, window, view, add_new=True
    )
    subcommands = [
        sc.connect,
        sc.rename,
        sc.interrupt,
        sc.restart,
        sc.shutdown,
        sc.back,
    ]
    try:
        if (
            selected_kernel["id"]
            == ViewManager.get_kernel_for_view(view.buffer_id()).kernel_id
        ):
            subcommands = [sc.rename, sc.interrupt, sc.restart, sc.shutdown, sc.back]
    except KeyError:
        # No kernel is connected
        # `subcommands` includes "Connect"
        pass
    index = yield partial(window.show_quick_panel, subcommands)
    if index == -1:
        return
    elif subcommands[index] is sc.connect:
        # Connect
        ViewManager.connect_kernel(
            view.buffer_id(), selected_kernel["name"], selected_kernel["id"]
        )
        if view.file_name():
            view_name = view.file_name()
        else:
            view_name = view.name()
        log_info_msg = (
            "Connected view '{view_name}(id: {buffer_id})'" "to kernel {kernel_id}."
        ).format(
            view_name=view_name,
            buffer_id=view.buffer_id(),
            kernel_id=selected_kernel["id"],
        )
        logger.info(log_info_msg)
    elif subcommands[index] is sc.rename:
        # Rename
        conn = HeliumKernelManager.get_kernel(selected_kernel["id"])
        curr_name = conn.connection_name if conn.connection_name is not None else ""
        new_name = yield partial(
            window.show_input_panel,
            "New name",
            curr_name,
            on_change=None,
            on_cancel=None,
        )
        conn.connection_name = new_name
    elif subcommands[index] is sc.interrupt:
        # Interrupt
        HeliumKernelManager.interrupt_kernel(selected_kernel["id"])
        log_info_msg = ("Interrupted kernel {kernel_id}.").format(
            kernel_id=selected_kernel["id"]
        )
        logger.info(log_info_msg)
    elif subcommands[index] is sc.restart:
        # Restart
        HeliumKernelManager.restart_kernel(selected_kernel["id"])
        log_info_msg = ("Restarted kernel {kernel_id}.").format(
            kernel_id=selected_kernel["id"]
        )
        logger.info(log_info_msg)
    elif subcommands[index] is sc.shutdown:
        # Shutdown
        HeliumKernelManager.shutdown_kernel(selected_kernel["id"])
        log_info_msg = ("Shutdown kernel {kernel_id}.").format(
            kernel_id=selected_kernel["id"]
        )
        logger.info(log_info_msg)
    elif subcommands[index] is sc.back:
        # Back to the kernel list
        yield _list_kernels(window, view)
    sublime.set_timeout_async(lambda: StatusBar(view), 0)


class HeliumListKernels(TextCommand):
    """Command that shows the list of kernels and do some action for chosen kernels."""

    def run(self, edit, *, logger=HELIUM_LOGGER):
        _list_kernels(sublime.active_window(), self.view)


@chain_callbacks
def _connect_kernel(window, view, *, continue_cb=lambda: None, logger=HELIUM_LOGGER):
    kernel_list = HeliumKernelManager.list_kernels()
    menu_items = [
        "[{lang}] {kernel_id}".format(lang=kernel["name"], kernel_id=kernel["id"])
        for kernel in kernel_list
    ]
    menu_items += ["New kernel"]

    index = yield partial(window.show_quick_panel, menu_items)

    if index == -1:
        return
    elif index == len(kernel_list):
        yield partial(_start_kernel, window, view)
    else:
        selected_kernel = kernel_list[index]
        ViewManager.connect_kernel(
            view.buffer_id(), selected_kernel["name"], selected_kernel["id"]
        )
        if view.file_name():
            view_name = view.file_name()
        else:
            view_name = view.name()

        update_run_cell_phantoms(view)

        log_info_msg = (
            "Connected view '{view_name}(id: {buffer_id})' to kernel {kernel_id}."
        ).format(
            view_name=view_name,
            buffer_id=view.buffer_id(),
            kernel_id=selected_kernel["id"],
        )
        logger.info(log_info_msg)
    sublime.set_timeout_async(lambda: StatusBar(view), 0)
    continue_cb()


class HeliumConnectKernel(TextCommand):
    """Connect to Jupyter kernel."""

    def run(self, edit, *, logger=HELIUM_LOGGER):
        """Command definition."""
        _connect_kernel(sublime.active_window(), self.view, logger=logger)
        self.view.run_command("helium_clear_all_cells")


@chain_callbacks
def _show_kernel_selection_menu(window, view, cb, *, add_new=False):
    # Get the kernel ID related to `view` if exists.
    try:
        current_kernel_id = ViewManager.get_kernel_for_view(view.buffer_id()).kernel_id
    except KeyError:
        # TODO fix to use property of views.
        result = re.match(r"\*Helium Output\* .*?\(\[.*?\] ([\w-]*)\)", view.name())
        if result:
            current_kernel_id = result.group(1)
        else:
            current_kernel_id = ""

    # It's better to pass the list of (connection_name, kernel_id) tuples
    # to improve the appearane of the menu.
    kernel_list = HeliumKernelManager.list_kernels()
    menu_items = [
        "* " + repr if kernel["id"] == current_kernel_id else repr
        for repr, kernel in zip(HeliumKernelManager.list_kernel_reprs(), kernel_list)
    ]
    if add_new:
        menu_items += ["New kernel"]
    index = yield partial(window.show_quick_panel, menu_items)
    if index == -1:
        selected_kernel = None
    elif index == len(kernel_list):
        yield partial(_start_kernel, window, view)
    else:
        selected_kernel = kernel_list[index]
    cb(selected_kernel)


@chain_callbacks
def _interrupt_kernel(window, view, *, continue_cb=lambda: None, logger=HELIUM_LOGGER):
    selected_kernel = yield partial(_show_kernel_selection_menu, window, view)
    if selected_kernel is not None:
        HeliumKernelManager.interrupt_kernel(selected_kernel["id"])
        log_info_msg = ("Interrupted kernel {kernel_id}.").format(
            kernel_id=selected_kernel["id"]
        )
        logger.info(log_info_msg)
    continue_cb()


class HeliumInterruptKernel(TextCommand):
    """Interrupt Jupyter kernel."""

    def is_enabled(self, *, logger=HELIUM_LOGGER):
        try:
            kernel = ViewManager.get_kernel_for_view(self.view.buffer_id())
        except KeyError:
            return False
        return HeliumKernelManager.get_kernel(kernel.kernel_id).is_alive()

    def is_visible(self, *, logger=HELIUM_LOGGER):
        return self.is_enabled()

    def run(self, edit, *, logger=HELIUM_LOGGER):
        """Command definition."""
        _interrupt_kernel(sublime.active_window(), self.view, logger=logger)


@chain_callbacks
def _restart_kernel(window, view, *, continue_cb=lambda: None, logger=HELIUM_LOGGER):
    selected_kernel = yield partial(_show_kernel_selection_menu, window, view)
    if selected_kernel is not None:
        HeliumKernelManager.restart_kernel(selected_kernel["id"])
        log_info_msg = ("Restarted kernel {kernel_id}.").format(
            kernel_id=selected_kernel["id"]
        )
        logger.info(log_info_msg)
    continue_cb()


class HeliumRestartKernel(TextCommand):
    """Restart Jupyter kernel."""

    def is_enabled(self, *, logger=HELIUM_LOGGER):
        try:
            kernel = ViewManager.get_kernel_for_view(self.view.buffer_id())
        except KeyError:
            return False
        return HeliumKernelManager.get_kernel(kernel.kernel_id).is_alive()

    def is_visible(self, *, logger=HELIUM_LOGGER):
        return self.is_enabled()

    def run(self, edit, *, logger=HELIUM_LOGGER):
        """Command definition."""
        _restart_kernel(sublime.active_window(), self.view, logger=logger)
        self.view.run_command("helium_clear_all_cells")


@chain_callbacks
def _shutdown_kernel(window, view, *, continue_cb=lambda: None, logger=HELIUM_LOGGER):
    selected_kernel = yield partial(_show_kernel_selection_menu, window, view)
    if selected_kernel is not None:
        HeliumKernelManager.shutdown_kernel(selected_kernel["id"])
        log_info_msg = ("Shutdown kernel {kernel_id}.").format(
            kernel_id=selected_kernel["id"]
        )
        logger.info(log_info_msg)
    ViewManager.remove_view(view.buffer_id())
    view.set_status("helium_connected_kernel", "")
    continue_cb()


class HeliumShutdownKernel(TextCommand):
    """Shutdown Jupyter kernel."""

    def is_enabled(self, *, logger=HELIUM_LOGGER):
        try:
            kernel = ViewManager.get_kernel_for_view(self.view.buffer_id())
        except KeyError:
            return False
        return HeliumKernelManager.get_kernel(kernel.kernel_id).is_alive()

    def is_visible(self, *, logger=HELIUM_LOGGER):
        return self.is_enabled()

    def run(self, edit, *, logger=HELIUM_LOGGER):
        """Command definition."""
        _shutdown_kernel(sublime.active_window(), self.view, logger=logger)


class HeliumRunCellManager(ViewEventListener):
    """Manage 'Run cell' phantoms."""

    def __init__(self, view):
        self.view = view
        self.timeout_scheduled = False
        self.needs_update = False

    def on_modified(self, *, logger=HELIUM_LOGGER):
        try:
            kernel = ViewManager.get_kernel_for_view(self.view.buffer_id())
            if not kernel.is_alive():
                return
        except KeyError:
            return

        # Call update_run_cell_phantoms(), but not any more than 10 times a second
        if self.timeout_scheduled:
            self.needs_update = True
        else:
            sublime.set_timeout(lambda: self.handle_timeout(), 100)
            self.timeout_scheduled = True
            update_run_cell_phantoms(self.view, logger=logger)

    def handle_timeout(self):
        self.timeout_scheduled = False
        if self.needs_update:
            self.needs_update = False
            update_run_cell_phantoms(self.view)


def update_run_cell_phantoms(view, *, logger=HELIUM_LOGGER):
    """Add "Run Cell" links to each code cell."""
    # find all cell delimiters:
    cell_delimiter_pattern = sublime.load_settings("Helium.sublime-settings").get(
        "cell_delimiter_pattern"
    )
    limits = view.find_all(cell_delimiter_pattern)
    # append a virtual delimiter at EOF
    limits.append(sublime.Region(view.size(), view.size()))

    # remove existing Run cell phantoms, we'll recreate all of them
    view.erase_phantoms(RUN_CELL_PHANTOM_ID)

    for i in range(len(limits) - 1):
        code_region = sublime.Region(limits[i].end() + 1, limits[i + 1].begin() + 0)
        phantom_region = sublime.Region(limits[i].end(), limits[i].end())
        view.add_phantom(
            RUN_CELL_PHANTOM_ID,
            phantom_region,
            RUN_CELL_PHANTOM,
            sublime.LAYOUT_INLINE,
            on_navigate=lambda href, view=view, region=code_region: _execute_cell(
                view, region
            ),
        )


def get_line(view: sublime.View, row: int) -> str:
    """Get the code line under the cursor."""
    point = view.text_point(row, 0)
    line_region = view.line(point)
    return view.substr(line_region)


def get_indent(view: sublime.View, row: int) -> str:
    line = get_line(view, row)
    return INDENT_PATTERN.match(line).group()


def get_block(view: sublime.View, s: sublime.Region) -> (str, sublime.Region):
    """Get the code block under the cursor.

    The code block is the lines satisfying the following conditions:

      - Includes the line under the cursor.
      - Includes no blank line.
      - More indented than that of the line under the cursor.

    If `s` is a selected region, the code block is it.
    """
    if not s.empty():
        return (view.substr(s), s)
    view_end_row = view.rowcol(view.size())[0]
    current_row = view.rowcol(s.begin())[0]
    current_indent = get_indent(view, current_row)
    start_point = 0
    for first_row in range(current_row, -1, -1):
        indent = get_indent(view, first_row)
        if (
            not indent.startswith(current_indent)
            or get_line(view, first_row).strip() == ""
        ):
            start_point = view.text_point(first_row + 1, 0)
            break
    end_point = view.size()
    for last_row in range(current_row, view_end_row + 1):
        indent = get_indent(view, last_row)
        if (
            not indent.startswith(current_indent)
            or get_line(view, last_row).strip() == ""
        ):
            end_point = view.text_point(last_row, 0) - 1
            break
    block_region = sublime.Region(start_point, end_point)
    return (view.substr(block_region), block_region)


@chain_callbacks
def _execute_block(view, *, logger=HELIUM_LOGGER):
    try:
        kernel = ViewManager.get_kernel_for_view(view.buffer_id())
    except KeyError:
        sublime.message_dialog("No kernel is connected to this view.")
        yield lambda cb: _connect_kernel(sublime.active_window(), view, continue_cb=cb)
        kernel = ViewManager.get_kernel_for_view(view.buffer_id())

    pre_code = []
    for s in view.sel():
        code, region = get_block(view, s)
        if code == pre_code:
            continue
        kernel.execute_code(code, region, view)
        log_info_msg = "Executed code {code} with kernel {kernel_id}".format(
            code=code, kernel_id=kernel.kernel_id
        )
        logger.info(log_info_msg)
        pre_code = code


@chain_callbacks
def _execute_cell(view, region: sublime.Region, *, logger=HELIUM_LOGGER):
    try:
        kernel = ViewManager.get_kernel_for_view(view.buffer_id())
    except KeyError:
        sublime.message_dialog("No kernel is connected to this view.")
        yield lambda cb: _connect_kernel(sublime.active_window(), view, continue_cb=cb)
        kernel = ViewManager.get_kernel_for_view(view.buffer_id())

    code, cell = get_cell(view, region, logger=logger)
    kernel.execute_code(code, cell, view)
    log_info_msg = "Executed code {code} with kernel {kernel_id}".format(
        code=code, kernel_id=kernel.kernel_id
    )
    logger.info(log_info_msg)


class HeliumExecuteBlock(TextCommand):
    """Execute code."""

    def is_enabled(self, *, logger=HELIUM_LOGGER):
        try:
            kernel = ViewManager.get_kernel_for_view(self.view.buffer_id())
        except KeyError:
            return False
        return HeliumKernelManager.get_kernel(kernel.kernel_id).is_alive()

    def is_visible(self, *, logger=HELIUM_LOGGER):
        return self.is_enabled()

    def run(self, edit, *, logger=HELIUM_LOGGER):
        """Command definition."""
        _execute_block(self.view, logger=logger)


class HeliumExecuteCell(TextCommand):
    """Execute code cell."""

    def is_enabled(self, *, logger=HELIUM_LOGGER):
        try:
            kernel = ViewManager.get_kernel_for_view(self.view.buffer_id())
        except KeyError:
            return False
        return kernel.is_alive()

    def is_visible(self, *, logger=HELIUM_LOGGER):
        return self.is_enabled()

    def run(self, edit, move_cursor=False, *, logger=HELIUM_LOGGER):
        """If move_cursor is true, move the cursor to the next cell after execution."""
        for s in self.view.sel():
            _execute_cell(self.view, s, logger=logger)

        if move_cursor:
            _, cell = get_cell(self.view, self.view.sel()[-1], logger=logger)
            pt = sublime.Region(cell.end() + 1, cell.end() + 1)
            self.view.sel().clear()
            self.view.sel().add(pt)
            # TODO: scroll to cursor after phantoms after Jupyter callback
            # rather than fixed time
            sublime.set_timeout(lambda: self.view.show(pt), 500)


class HeliumClearAllCells(TextCommand):
    """Clear all phantoms."""

    def is_enabled(self, *, logger=HELIUM_LOGGER):
        try:
            kernel = ViewManager.get_kernel_for_view(self.view.buffer_id())

            # if view has an attached kernel, return its status
            return kernel.is_alive()
        except KeyError:
            # if view doesn't have an attached kernel, check if view was created by
            # kernel
            parent_view = self._get_parent_view()
            return parent_view is not None

    def is_visible(self, *, logger=HELIUM_LOGGER):
        return self.is_enabled()

    def run(self, edit, *, logger=HELIUM_LOGGER):
        # get correct kernel
        try:
            kernel = ViewManager.get_kernel_for_view(self.view.buffer_id())
        except KeyError:
            view = self._get_parent_view()
            kernel = ViewManager.get_kernel_for_view(view.buffer_id())

        def cb():
            if kernel._show_inline_output:
                for k in range(MAX_PHANTOMS):
                    self.view.erase_phantom_by_id(k)
            else:
                kernel.get_view().close()
                kernel.activate_view()

        # clear the old phantoms async
        sublime.set_timeout_async(cb, 0)

    def _get_parent_view(self) -> sublime.View:
        for window in sublime.windows():
            for view in window.views():
                try:
                    kernel = ViewManager.get_kernel_for_view(view.buffer_id())
                except KeyError:
                    continue

                if kernel.get_view() == self.view:
                    return view
        return None


class StatusBar(object):
    """Status Bar with animation.

    This class is based on the one by @randy3k.
    """

    def __init__(self, view, width=10, interval=500):
        self.view = view
        self.width = width
        self.buffer_id = view.buffer_id()
        self.interval = interval
        self.pos = 0
        try:
            self.kernel = ViewManager.get_kernel_for_view(self.buffer_id)
            self.start()
        except KeyError:
            # When view is not connected.
            self.stop()

    def start(self):
        self.update()

    def stop(self):
        self.view.set_status("helium_connected_kernel", "")

    def update(self, pos=0):
        # `pos` can't be a property of `StatusBar` because it's not updated
        # when `update()` is called by `sublime.set_timeout[_async]()`.
        if self.buffer_id != sublime.active_window().active_view().buffer_id():
            # Stop when view is unfocused.
            self.stop()
            return
        execution_state = self.kernel.execution_state
        if execution_state == "dead":
            # Stop when kernel is dead.
            self.view.set_status("helium_connected_kernel", "")
            return
        elif execution_state == "busy":
            pos = pos % (2 * self.width)
            before = min(pos, (2 * self.width) - pos)
            after = self.width - before
            progress_bar = " [{}={}]".format(" " * before, " " * after)
        else:
            # Make progress bar always start with pos=0.
            pos = -1
            progress_bar = ""
        status = (
            "{repr} (state: {execution_state})".format(
                repr=self.kernel.repr, execution_state=self.kernel.execution_state
            )
            + progress_bar
        )
        self.view.set_status("helium_connected_kernel", status)
        sublime.set_timeout_async(lambda: self.update(pos + 1), self.interval)


class HeliumStatusUpdater(ViewEventListener):
    """Listen to the heartbeat of kernel and update status of view."""

    def on_activated_async(self):
        sublime.set_timeout_async(lambda: StatusBar(self.view), 0)


class HeliumGetObjectInspection(TextCommand):
    """Get object inspection."""

    def is_enabled(self, *, logger=HELIUM_LOGGER):
        try:
            kernel = ViewManager.get_kernel_for_view(self.view.buffer_id())
        except KeyError:
            return False
        return HeliumKernelManager.get_kernel(kernel.kernel_id).is_alive()

    def is_visible(self, *, logger=HELIUM_LOGGER):
        return self.is_enabled()

    @chain_callbacks
    def run(self, edit, *, logger=HELIUM_LOGGER):
        view = self.view
        try:
            kernel = ViewManager.get_kernel_for_view(view.buffer_id())
        except KeyError:
            sublime.message_dialog("No kernel is connected to this view.")
            yield lambda cb: _connect_kernel(
                sublime.active_window(), view, continue_cb=cb
            )
            kernel = ViewManager.get_kernel_for_view(view.buffer_id())

        pre_code = []
        for s in view.sel():
            code, region = get_block(view, s)
            cursor_pos = s.end() - region.begin()
            if code == pre_code:
                continue
            kernel.get_inspection(code, cursor_pos)
            log_info_msg = (
                "Requested object inspection for code {code} with kernel {kernel_id}"
            ).format(code=code, kernel_id=kernel.kernel_id)

            logger.info(log_info_msg)
            pre_code = code


class HeliumCompleter(EventListener):
    """Completer."""

    def on_query_completions(self, view, prefix, locations, *, logger=HELIUM_LOGGER):
        """Get completions from the Jupyter kernel."""
        use_complete = sublime.load_settings("Helium.sublime-settings").get("complete")
        if not use_complete:
            return None
        timeout = sublime.load_settings("Helium.sublime-settings").get(
            "complete_timeout"
        )
        try:
            kernel = ViewManager.get_kernel_for_view(view.buffer_id())
            location = locations[0]
            code = view.substr(view.line(location))
            log_info_msg = (
                "Requested completion for code {code} with kernel {kernel_id}"
            ).format(code=code, kernel_id=kernel.kernel_id)
            logger.info(log_info_msg)
            _, col = view.rowcol(location)
            return kernel.get_complete(code, col, timeout)
        except Exception:  # noqa
            return None


================================================
FILE: lib/__init__.py
================================================


================================================
FILE: lib/client/__init__.py
================================================


================================================
FILE: lib/client/decorator.py
================================================
# #########################     LICENSE     ############################ #

# Copyright (c) 2005-2018, Michele Simionato
# All rights reserved.

# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:

#   Redistributions of source code must retain the above copyright
#   notice, this list of conditions and the following disclaimer.
#   Redistributions in bytecode form must reproduce the above copyright
#   notice, this list of conditions and the following disclaimer in
#   the documentation and/or other materials provided with the
#   distribution.

# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.

"""
Decorator module, see http://pypi.python.org/pypi/decorator
for the documentation.
"""
from __future__ import print_function

import re
import sys
import inspect
import operator
import itertools
import collections

__version__ = '4.4.2'

if sys.version_info >= (3,):
    from inspect import getfullargspec

    def get_init(cls):
        return cls.__init__
else:
    FullArgSpec = collections.namedtuple(
        'FullArgSpec', 'args varargs varkw defaults '
        'kwonlyargs kwonlydefaults annotations')

    def getfullargspec(f):
        "A quick and dirty replacement for getfullargspec for Python 2.X"
        return FullArgSpec._make(inspect.getargspec(f) + ([], None, {}))

    def get_init(cls):
        return cls.__init__.__func__

try:
    iscoroutinefunction = inspect.iscoroutinefunction
except AttributeError:
    # let's assume there are no coroutine functions in old Python
    def iscoroutinefunction(f):
        return False
try:
    from inspect import isgeneratorfunction
except ImportError:
    # assume no generator function in old Python versions
    def isgeneratorfunction(caller):
        return False


DEF = re.compile(r'\s*def\s*([_\w][_\w\d]*)\s*\(')


# basic functionality
class FunctionMaker(object):
    """
    An object with the ability to create functions with a given signature.
    It has attributes name, doc, module, signature, defaults, dict and
    methods update and make.
    """

    # Atomic get-and-increment provided by the GIL
    _compile_count = itertools.count()

    # make pylint happy
    args = varargs = varkw = defaults = kwonlyargs = kwonlydefaults = ()

    def __init__(self, func=None, name=None, signature=None,
                 defaults=None, doc=None, module=None, funcdict=None):
        self.shortsignature = signature
        if func:
            # func can be a class or a callable, but not an instance method
            self.name = func.__name__
            if self.name == '<lambda>':  # small hack for lambda functions
                self.name = '_lambda_'
            self.doc = func.__doc__
            self.module = func.__module__
            if inspect.isfunction(func):
                argspec = getfullargspec(func)
                self.annotations = getattr(func, '__annotations__', {})
                for a in ('args', 'varargs', 'varkw', 'defaults', 'kwonlyargs',
                          'kwonlydefaults'):
                    setattr(self, a, getattr(argspec, a))
                for i, arg in enumerate(self.args):
                    setattr(self, 'arg%d' % i, arg)
                allargs = list(self.args)
                allshortargs = list(self.args)
                if self.varargs:
                    allargs.append('*' + self.varargs)
                    allshortargs.append('*' + self.varargs)
                elif self.kwonlyargs:
                    allargs.append('*')  # single star syntax
                for a in self.kwonlyargs:
                    allargs.append('%s=None' % a)
                    allshortargs.append('%s=%s' % (a, a))
                if self.varkw:
                    allargs.append('**' + self.varkw)
                    allshortargs.append('**' + self.varkw)
                self.signature = ', '.join(allargs)
                self.shortsignature = ', '.join(allshortargs)
                self.dict = func.__dict__.copy()
        # func=None happens when decorating a caller
        if name:
            self.name = name
        if signature is not None:
            self.signature = signature
        if defaults:
            self.defaults = defaults
        if doc:
            self.doc = doc
        if module:
            self.module = module
        if funcdict:
            self.dict = funcdict
        # check existence required attributes
        assert hasattr(self, 'name')
        if not hasattr(self, 'signature'):
            raise TypeError('You are decorating a non function: %s' % func)

    def update(self, func, **kw):
        "Update the signature of func with the data in self"
        func.__name__ = self.name
        func.__doc__ = getattr(self, 'doc', None)
        func.__dict__ = getattr(self, 'dict', {})
        func.__defaults__ = self.defaults
        func.__kwdefaults__ = self.kwonlydefaults or None
        func.__annotations__ = getattr(self, 'annotations', None)
        try:
            frame = sys._getframe(3)
        except AttributeError:  # for IronPython and similar implementations
            callermodule = '?'
        else:
            callermodule = frame.f_globals.get('__name__', '?')
        func.__module__ = getattr(self, 'module', callermodule)
        func.__dict__.update(kw)

    def make(self, src_templ, evaldict=None, addsource=False, **attrs):
        "Make a new function from a given template and update the signature"
        src = src_templ % vars(self)  # expand name and signature
        evaldict = evaldict or {}
        mo = DEF.search(src)
        if mo is None:
            raise SyntaxError('not a valid function template\n%s' % src)
        name = mo.group(1)  # extract the function name
        names = set([name] + [arg.strip(' *') for arg in
                              self.shortsignature.split(',')])
        for n in names:
            if n in ('_func_', '_call_'):
                raise NameError('%s is overridden in\n%s' % (n, src))

        if not src.endswith('\n'):  # add a newline for old Pythons
            src += '\n'

        # Ensure each generated function has a unique filename for profilers
        # (such as cProfile) that depend on the tuple of (<filename>,
        # <definition line>, <function name>) being unique.
        filename = '<decorator-gen-%d>' % next(self._compile_count)
        try:
            code = compile(src, filename, 'single')
            exec(code, evaldict)
        except Exception:
            print('Error in generated code:', file=sys.stderr)
            print(src, file=sys.stderr)
            raise
        func = evaldict[name]
        if addsource:
            attrs['__source__'] = src
        self.update(func, **attrs)
        return func

    @classmethod
    def create(cls, obj, body, evaldict, defaults=None,
               doc=None, module=None, addsource=True, **attrs):
        """
        Create a function from the strings name, signature and body.
        evaldict is the evaluation dictionary. If addsource is true an
        attribute __source__ is added to the result. The attributes attrs
        are added, if any.
        """
        if isinstance(obj, str):  # "name(signature)"
            name, rest = obj.strip().split('(', 1)
            signature = rest[:-1]  # strip a right parens
            func = None
        else:  # a function
            name = None
            signature = None
            func = obj
        self = cls(func, name, signature, defaults, doc, module)
        ibody = '\n'.join('    ' + line for line in body.splitlines())
        caller = evaldict.get('_call_')  # when called from `decorate`
        if caller and iscoroutinefunction(caller):
            body = ('async def %(name)s(%(signature)s):\n' + ibody).replace(
                'return', 'return await')
        else:
            body = 'def %(name)s(%(signature)s):\n' + ibody
        return self.make(body, evaldict, addsource, **attrs)


def decorate(func, caller, extras=()):
    """
    decorate(func, caller) decorates a function using a caller.
    If the caller is a generator function, the resulting function
    will be a generator function.
    """
    evaldict = dict(_call_=caller, _func_=func)
    es = ''
    for i, extra in enumerate(extras):
        ex = '_e%d_' % i
        evaldict[ex] = extra
        es += ex + ', '

    if '3.5' <= sys.version < '3.6':
        # with Python 3.5 isgeneratorfunction returns True for all coroutines
        # however we know that it is NOT possible to have a generator
        # coroutine in python 3.5: PEP525 was not there yet
        generatorcaller = isgeneratorfunction(
            caller) and not iscoroutinefunction(caller)
    else:
        generatorcaller = isgeneratorfunction(caller)
    if generatorcaller:
        fun = FunctionMaker.create(
            func, "for res in _call_(_func_, %s%%(shortsignature)s):\n"
                  "    yield res" % es, evaldict, __wrapped__=func)
    else:
        fun = FunctionMaker.create(
            func, "return _call_(_func_, %s%%(shortsignature)s)" % es,
            evaldict, __wrapped__=func)
    if hasattr(func, '__qualname__'):
        fun.__qualname__ = func.__qualname__
    return fun


def decorator(caller, _func=None):
    """decorator(caller) converts a caller function into a decorator"""
    if _func is not None:  # return a decorated function
        # this is obsolete behavior; you should use decorate instead
        return decorate(_func, caller)
    # else return a decorator function
    defaultargs, defaults = '', ()
    if inspect.isclass(caller):
        name = caller.__name__.lower()
        doc = 'decorator(%s) converts functions/generators into ' \
            'factories of %s objects' % (caller.__name__, caller.__name__)
    elif inspect.isfunction(caller):
        if caller.__name__ == '<lambda>':
            name = '_lambda_'
        else:
            name = caller.__name__
        doc = caller.__doc__
        nargs = caller.__code__.co_argcount
        ndefs = len(caller.__defaults__ or ())
        defaultargs = ', '.join(caller.__code__.co_varnames[nargs-ndefs:nargs])
        if defaultargs:
            defaultargs += ','
        defaults = caller.__defaults__
    else:  # assume caller is an object with a __call__ method
        name = caller.__class__.__name__.lower()
        doc = caller.__call__.__doc__
    evaldict = dict(_call=caller, _decorate_=decorate)
    dec = FunctionMaker.create(
        '%s(func, %s)' % (name, defaultargs),
        'if func is None: return lambda func:  _decorate_(func, _call, (%s))\n'
        'return _decorate_(func, _call, (%s))' % (defaultargs, defaultargs),
        evaldict, doc=doc, module=caller.__module__, __wrapped__=caller)
    if defaults:
        dec.__defaults__ = (None,) + defaults
    return dec


# ####################### contextmanager ####################### #

try:  # Python >= 3.2
    from contextlib import _GeneratorContextManager
except ImportError:  # Python >= 2.5
    from contextlib import GeneratorContextManager as _GeneratorContextManager


class ContextManager(_GeneratorContextManager):
    def __call__(self, func):
        """Context manager decorator"""
        return FunctionMaker.create(
            func, "with _self_: return _func_(%(shortsignature)s)",
            dict(_self_=self, _func_=func), __wrapped__=func)


init = getfullargspec(_GeneratorContextManager.__init__)
n_args = len(init.args)
if n_args == 2 and not init.varargs:  # (self, genobj) Python 2.7
    def __init__(self, g, *a, **k):
        return _GeneratorContextManager.__init__(self, g(*a, **k))
    ContextManager.__init__ = __init__
elif n_args == 2 and init.varargs:  # (self, gen, *a, **k) Python 3.4
    pass
elif n_args == 4:  # (self, gen, args, kwds) Python 3.5
    def __init__(self, g, *a, **k):
        return _GeneratorContextManager.__init__(self, g, a, k)
    ContextManager.__init__ = __init__

_contextmanager = decorator(ContextManager)


def contextmanager(func):
    # Enable Pylint config: contextmanager-decorators=decorator.contextmanager
    return _contextmanager(func)


# ############################ dispatch_on ############################ #

def append(a, vancestors):
    """
    Append ``a`` to the list of the virtual ancestors, unless it is already
    included.
    """
    add = True
    for j, va in enumerate(vancestors):
        if issubclass(va, a):
            add = False
            break
        if issubclass(a, va):
            vancestors[j] = a
            add = False
    if add:
        vancestors.append(a)


# inspired from simplegeneric by P.J. Eby and functools.singledispatch
def dispatch_on(*dispatch_args):
    """
    Factory of decorators turning a function into a generic function
    dispatching on the given arguments.
    """
    assert dispatch_args, 'No dispatch args passed'
    dispatch_str = '(%s,)' % ', '.join(dispatch_args)

    def check(arguments, wrong=operator.ne, msg=''):
        """Make sure one passes the expected number of arguments"""
        if wrong(len(arguments), len(dispatch_args)):
            raise TypeError('Expected %d arguments, got %d%s' %
                            (len(dispatch_args), len(arguments), msg))

    def gen_func_dec(func):
        """Decorator turning a function into a generic function"""

        # first check the dispatch arguments
        argset = set(getfullargspec(func).args)
        if not set(dispatch_args) <= argset:
            raise NameError('Unknown dispatch arguments %s' % dispatch_str)

        typemap = {}

        def vancestors(*types):
            """
            Get a list of sets of virtual ancestors for the given types
            """
            check(types)
            ras = [[] for _ in range(len(dispatch_args))]
            for types_ in typemap:
                for t, type_, ra in zip(types, types_, ras):
                    if issubclass(t, type_) and type_ not in t.mro():
                        append(type_, ra)
            return [set(ra) for ra in ras]

        def ancestors(*types):
            """
            Get a list of virtual MROs, one for each type
            """
            check(types)
            lists = []
            for t, vas in zip(types, vancestors(*types)):
                n_vas = len(vas)
                if n_vas > 1:
                    raise RuntimeError(
                        'Ambiguous dispatch for %s: %s' % (t, vas))
                elif n_vas == 1:
                    va, = vas
                    mro = type('t', (t, va), {}).mro()[1:]
                else:
                    mro = t.mro()
                lists.append(mro[:-1])  # discard t and object
            return lists

        def register(*types):
            """
            Decorator to register an implementation for the given types
            """
            check(types)

            def dec(f):
                check(getfullargspec(f).args, operator.lt, ' in ' + f.__name__)
                typemap[types] = f
                return f
            return dec

        def dispatch_info(*types):
            """
            An utility to introspect the dispatch algorithm
            """
            check(types)
            lst = []
            for anc in itertools.product(*ancestors(*types)):
                lst.append(tuple(a.__name__ for a in anc))
            return lst

        def _dispatch(dispatch_args, *args, **kw):
            types = tuple(type(arg) for arg in dispatch_args)
            try:  # fast path
                f = typemap[types]
            except KeyError:
                pass
            else:
                return f(*args, **kw)
            combinations = itertools.product(*ancestors(*types))
            next(combinations)  # the first one has been already tried
            for types_ in combinations:
                f = typemap.get(types_)
                if f is not None:
                    return f(*args, **kw)

            # else call the default implementation
            return func(*args, **kw)

        return FunctionMaker.create(
            func, 'return _f_(%s, %%(shortsignature)s)' % dispatch_str,
            dict(_f_=_dispatch), register=register, default=func,
            typemap=typemap, vancestors=vancestors, ancestors=ancestors,
            dispatch_info=dispatch_info, __wrapped__=func)

    gen_func_dec.__name__ = 'dispatch_on' + dispatch_str
    return gen_func_dec


================================================
FILE: lib/client/decorator_version
================================================
4.4.2


================================================
FILE: lib/client/ipython_genutils/__init__.py
================================================
from ._version import __version__, version_info


================================================
FILE: lib/client/ipython_genutils/_version.py
================================================
version_info = (0, 2, 0)
__version__ = '.'.join(map(str, version_info))


================================================
FILE: lib/client/ipython_genutils/encoding.py
================================================
# coding: utf-8
"""
Utilities for dealing with text encodings
"""

#-----------------------------------------------------------------------------
#  Copyright (C) 2008-2012  The IPython Development Team
#
#  Distributed under the terms of the BSD License.  The full license is in
#  the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import sys
import locale
import warnings

# to deal with the possibility of sys.std* not being a stream at all
def get_stream_enc(stream, default=None):
    """Return the given stream's encoding or a default.

    There are cases where ``sys.std*`` might not actually be a stream, so
    check for the encoding attribute prior to returning it, and return
    a default if it doesn't exist or evaluates as False. ``default``
    is None if not provided.
    """
    if not hasattr(stream, 'encoding') or not stream.encoding:
        return default
    else:
        return stream.encoding

# Less conservative replacement for sys.getdefaultencoding, that will try
# to match the environment.
# Defined here as central function, so if we find better choices, we
# won't need to make changes all over IPython.
def getdefaultencoding(prefer_stream=True):
    """Return IPython's guess for the default encoding for bytes as text.
    
    If prefer_stream is True (default), asks for stdin.encoding first,
    to match the calling Terminal, but that is often None for subprocesses.
    
    Then fall back on locale.getpreferredencoding(),
    which should be a sensible platform default (that respects LANG environment),
    and finally to sys.getdefaultencoding() which is the most conservative option,
    and usually ASCII on Python 2 or UTF8 on Python 3.
    """
    enc = None
    if prefer_stream:
        enc = get_stream_enc(sys.stdin)
    if not enc or enc=='ascii':
        try:
            # There are reports of getpreferredencoding raising errors
            # in some cases, which may well be fixed, but let's be conservative here.
            enc = locale.getpreferredencoding()
        except Exception:
            pass
    enc = enc or sys.getdefaultencoding()
    # On windows `cp0` can be returned to indicate that there is no code page.
    # Since cp0 is an invalid encoding return instead cp1252 which is the
    # Western European default.
    if enc == 'cp0':
        warnings.warn(
            "Invalid code page cp0 detected - using cp1252 instead."
            "If cp1252 is incorrect please ensure a valid code page "
            "is defined for the process.", RuntimeWarning)
        return 'cp1252'
    return enc

DEFAULT_ENCODING = getdefaultencoding()


================================================
FILE: lib/client/ipython_genutils/importstring.py
================================================
# encoding: utf-8
"""
A simple utility to import something by its string name.
"""

# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.


def import_item(name):
    """Import and return ``bar`` given the string ``foo.bar``.

    Calling ``bar = import_item("foo.bar")`` is the functional equivalent of
    executing the code ``from foo import bar``.

    Parameters
    ----------
    name : string
      The fully qualified name of the module/package being imported.

    Returns
    -------
    mod : module object
       The module that was imported.
    """
    
    parts = name.rsplit('.', 1)
    if len(parts) == 2:
        # called with 'foo.bar....'
        package, obj = parts
        module = __import__(package, fromlist=[obj])
        try:
            pak = getattr(module, obj)
        except AttributeError:
            raise ImportError('No module named %s' % obj)
        return pak
    else:
        # called with un-dotted string
        return __import__(parts[0])


================================================
FILE: lib/client/ipython_genutils/ipstruct.py
================================================
# encoding: utf-8
"""A dict subclass that supports attribute style access.

Can probably be replaced by types.SimpleNamespace from Python 3.3
"""

# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.

__all__ = ['Struct']


class Struct(dict):
    """A dict subclass with attribute style access.

    This dict subclass has a a few extra features:

    * Attribute style access.
    * Protection of class members (like keys, items) when using attribute
      style access.
    * The ability to restrict assignment to only existing keys.
    * Intelligent merging.
    * Overloaded operators.
    """
    _allownew = True
    def __init__(self, *args, **kw):
        """Initialize with a dictionary, another Struct, or data.

        Parameters
        ----------
        args : dict, Struct
            Initialize with one dict or Struct
        kw : dict
            Initialize with key, value pairs.

        Examples
        --------

        >>> s = Struct(a=10,b=30)
        >>> s.a
        10
        >>> s.b
        30
        >>> s2 = Struct(s,c=30)
        >>> sorted(s2.keys())
        ['a', 'b', 'c']
        """
        object.__setattr__(self, '_allownew', True)
        dict.__init__(self, *args, **kw)

    def __setitem__(self, key, value):
        """Set an item with check for allownew.

        Examples
        --------

        >>> s = Struct()
        >>> s['a'] = 10
        >>> s.allow_new_attr(False)
        >>> s['a'] = 10
        >>> s['a']
        10
        >>> try:
        ...     s['b'] = 20
        ... except KeyError:
        ...     print('this is not allowed')
        ...
        this is not allowed
        """
        if not self._allownew and key not in self:
            raise KeyError(
                "can't create new attribute %s when allow_new_attr(False)" % key)
        dict.__setitem__(self, key, value)

    def __setattr__(self, key, value):
        """Set an attr with protection of class members.

        This calls :meth:`self.__setitem__` but convert :exc:`KeyError` to
        :exc:`AttributeError`.

        Examples
        --------

        >>> s = Struct()
        >>> s.a = 10
        >>> s.a
        10
        >>> try:
        ...     s.get = 10
        ... except AttributeError:
        ...     print("you can't set a class member")
        ...
        you can't set a class member
        """
        # If key is an str it might be a class member or instance var
        if isinstance(key, str):
            # I can't simply call hasattr here because it calls getattr, which
            # calls self.__getattr__, which returns True for keys in
            # self._data.  But I only want keys in the class and in
            # self.__dict__
            if key in self.__dict__ or hasattr(Struct, key):
                raise AttributeError(
                    'attr %s is a protected member of class Struct.' % key
                )
        try:
            self.__setitem__(key, value)
        except KeyError as e:
            raise AttributeError(e)

    def __getattr__(self, key):
        """Get an attr by calling :meth:`dict.__getitem__`.

        Like :meth:`__setattr__`, this method converts :exc:`KeyError` to
        :exc:`AttributeError`.

        Examples
        --------

        >>> s = Struct(a=10)
        >>> s.a
        10
        >>> type(s.get)
        <... 'builtin_function_or_method'>
        >>> try:
        ...     s.b
        ... except AttributeError:
        ...     print("I don't have that key")
        ...
        I don't have that key
        """
        try:
            result = self[key]
        except KeyError:
            raise AttributeError(key)
        else:
            return result

    def __iadd__(self, other):
        """s += s2 is a shorthand for s.merge(s2).

        Examples
        --------

        >>> s = Struct(a=10,b=30)
        >>> s2 = Struct(a=20,c=40)
        >>> s += s2
        >>> sorted(s.keys())
        ['a', 'b', 'c']
        """
        self.merge(other)
        return self

    def __add__(self,other):
        """s + s2 -> New Struct made from s.merge(s2).

        Examples
        --------

        >>> s1 = Struct(a=10,b=30)
        >>> s2 = Struct(a=20,c=40)
        >>> s = s1 + s2
        >>> sorted(s.keys())
        ['a', 'b', 'c']
        """
        sout = self.copy()
        sout.merge(other)
        return sout

    def __sub__(self,other):
        """s1 - s2 -> remove keys in s2 from s1.

        Examples
        --------

        >>> s1 = Struct(a=10,b=30)
        >>> s2 = Struct(a=40)
        >>> s = s1 - s2
        >>> s
        {'b': 30}
        """
        sout = self.copy()
        sout -= other
        return sout

    def __isub__(self,other):
        """Inplace remove keys from self that are in other.

        Examples
        --------

        >>> s1 = Struct(a=10,b=30)
        >>> s2 = Struct(a=40)
        >>> s1 -= s2
        >>> s1
        {'b': 30}
        """
        for k in other.keys():
            if k in self:
                del self[k]
        return self

    def __dict_invert(self, data):
        """Helper function for merge.

        Takes a dictionary whose values are lists and returns a dict with
        the elements of each list as keys and the original keys as values.
        """
        outdict = {}
        for k,lst in data.items():
            if isinstance(lst, str):
                lst = lst.split()
            for entry in lst:
                outdict[entry] = k
        return outdict

    def dict(self):
        return self

    def copy(self):
        """Return a copy as a Struct.

        Examples
        --------

        >>> s = Struct(a=10,b=30)
        >>> s2 = s.copy()
        >>> type(s2) is Struct
        True
        """
        return Struct(dict.copy(self))

    def hasattr(self, key):
        """hasattr function available as a method.

        Implemented like has_key.

        Examples
        --------

        >>> s = Struct(a=10)
        >>> s.hasattr('a')
        True
        >>> s.hasattr('b')
        False
        >>> s.hasattr('get')
        False
        """
        return key in self

    def allow_new_attr(self, allow = True):
        """Set whether new attributes can be created in this Struct.

        This can be used to catch typos by verifying that the attribute user
        tries to change already exists in this Struct.
        """
        object.__setattr__(self, '_allownew', allow)

    def merge(self, __loc_data__=None, __conflict_solve=None, **kw):
        """Merge two Structs with customizable conflict resolution.

        This is similar to :meth:`update`, but much more flexible. First, a
        dict is made from data+key=value pairs. When merging this dict with
        the Struct S, the optional dictionary 'conflict' is used to decide
        what to do.

        If conflict is not given, the default behavior is to preserve any keys
        with their current value (the opposite of the :meth:`update` method's
        behavior).

        Parameters
        ----------
        __loc_data : dict, Struct
            The data to merge into self
        __conflict_solve : dict
            The conflict policy dict.  The keys are binary functions used to
            resolve the conflict and the values are lists of strings naming
            the keys the conflict resolution function applies to.  Instead of
            a list of strings a space separated string can be used, like
            'a b c'.
        kw : dict
            Additional key, value pairs to merge in

        Notes
        -----

        The `__conflict_solve` dict is a dictionary of binary functions which will be used to
        solve key conflicts.  Here is an example::

            __conflict_solve = dict(
                func1=['a','b','c'],
                func2=['d','e']
            )

        In this case, the function :func:`func1` will be used to resolve
        keys 'a', 'b' and 'c' and the function :func:`func2` will be used for
        keys 'd' and 'e'.  This could also be written as::

            __conflict_solve = dict(func1='a b c',func2='d e')

        These functions will be called for each key they apply to with the
        form::

            func1(self['a'], other['a'])

        The return value is used as the final merged value.

        As a convenience, merge() provides five (the most commonly needed)
        pre-defined policies: preserve, update, add, add_flip and add_s. The
        easiest explanation is their implementation::

            preserve = lambda old,new: old
            update   = lambda old,new: new
            add      = lambda old,new: old + new
            add_flip = lambda old,new: new + old  # note change of order!
            add_s    = lambda old,new: old + ' ' + new  # only for str!

        You can use those four words (as strings) as keys instead
        of defining them as functions, and the merge method will substitute
        the appropriate functions for you.

        For more complicated conflict resolution policies, you still need to
        construct your own functions.

        Examples
        --------

        This show the default policy:

        >>> s = Struct(a=10,b=30)
        >>> s2 = Struct(a=20,c=40)
        >>> s.merge(s2)
        >>> sorted(s.items())
        [('a', 10), ('b', 30), ('c', 40)]

        Now, show how to specify a conflict dict:

        >>> s = Struct(a=10,b=30)
        >>> s2 = Struct(a=20,b=40)
        >>> conflict = {'update':'a','add':'b'}
        >>> s.merge(s2,conflict)
        >>> sorted(s.items())
        [('a', 20), ('b', 70)]
        """

        data_dict = dict(__loc_data__,**kw)

        # policies for conflict resolution: two argument functions which return
        # the value that will go in the new struct
        preserve = lambda old,new: old
        update   = lambda old,new: new
        add      = lambda old,new: old + new
        add_flip = lambda old,new: new + old  # note change of order!
        add_s    = lambda old,new: old + ' ' + new

        # default policy is to keep current keys when there's a conflict
        conflict_solve = dict.fromkeys(self, preserve)

        # the conflict_solve dictionary is given by the user 'inverted': we
        # need a name-function mapping, it comes as a function -> names
        # dict. Make a local copy (b/c we'll make changes), replace user
        # strings for the three builtin policies and invert it.
        if __conflict_solve:
            inv_conflict_solve_user = __conflict_solve.copy()
            for name, func in [('preserve',preserve), ('update',update),
                               ('add',add), ('add_flip',add_flip),
                               ('add_s',add_s)]:
                if name in inv_conflict_solve_user.keys():
                    inv_conflict_solve_user[func] = inv_conflict_solve_user[name]
                    del inv_conflict_solve_user[name]
            conflict_solve.update(self.__dict_invert(inv_conflict_solve_user))
        for key in data_dict:
            if key not in self:
                self[key] = data_dict[key]
            else:
                self[key] = conflict_solve[key](self[key],data_dict[key])



================================================
FILE: lib/client/ipython_genutils/path.py
================================================
# encoding: utf-8
"""
Utilities for path handling.
"""

# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.

import os
import sys
import errno
import shutil
import random

from . import py3compat


fs_encoding = sys.getfilesystemencoding()


def filefind(filename, path_dirs=None):
    """Find a file by looking through a sequence of paths.

    This iterates through a sequence of paths looking for a file and returns
    the full, absolute path of the first occurence of the file.  If no set of
    path dirs is given, the filename is tested as is, after running through
    :func:`expandvars` and :func:`expanduser`.  Thus a simple call::

        filefind('myfile.txt')

    will find the file in the current working dir, but::

        filefind('~/myfile.txt')

    Will find the file in the users home directory.  This function does not
    automatically try any paths, such as the cwd or the user's home directory.

    Parameters
    ----------
    filename : str
        The filename to look for.
    path_dirs : str, None or sequence of str
        The sequence of paths to look for the file in.  If None, the filename
        need to be absolute or be in the cwd.  If a string, the string is
        put into a sequence and the searched.  If a sequence, walk through
        each element and join with ``filename``, calling :func:`expandvars`
        and :func:`expanduser` before testing for existence.

    Returns
    -------
    Raises :exc:`IOError` or returns absolute path to file.
    """

    # If paths are quoted, abspath gets confused, strip them...
    filename = filename.strip('"').strip("'")
    # If the input is an absolute path, just check it exists
    if os.path.isabs(filename) and os.path.isfile(filename):
        return filename

    if path_dirs is None:
        path_dirs = ("",)
    elif isinstance(path_dirs, py3compat.string_types):
        path_dirs = (path_dirs,)

    for path in path_dirs:
        if path == '.': path = py3compat.getcwd()
        testname = expand_path(os.path.join(path, filename))
        if os.path.isfile(testname):
            return os.path.abspath(testname)

    raise IOError("File %r does not exist in any of the search paths: %r" %
                  (filename, path_dirs) )


def expand_path(s):
    """Expand $VARS and ~names in a string, like a shell

    :Examples:

       In [2]: os.environ['FOO']='test'

       In [3]: expand_path('variable FOO is $FOO')
       Out[3]: 'variable FOO is test'
    """
    # This is a pretty subtle hack. When expand user is given a UNC path
    # on Windows (\\server\share$\%username%), os.path.expandvars, removes
    # the $ to get (\\server\share\%username%). I think it considered $
    # alone an empty var. But, we need the $ to remains there (it indicates
    # a hidden share).
    if os.name=='nt':
        s = s.replace('$\\', 'IPYTHON_TEMP')
    s = os.path.expandvars(os.path.expanduser(s))
    if os.name=='nt':
        s = s.replace('IPYTHON_TEMP', '$\\')
    return s


try:
    ENOLINK = errno.ENOLINK
except AttributeError:
    ENOLINK = 1998

def link(src, dst):
    """Hard links ``src`` to ``dst``, returning 0 or errno.

    Note that the special errno ``ENOLINK`` will be returned if ``os.link`` isn't
    supported by the operating system.
    """

    if not hasattr(os, "link"):
        return ENOLINK
    link_errno = 0
    try:
        os.link(src, dst)
    except OSError as e:
        link_errno = e.errno
    return link_errno


def link_or_copy(src, dst):
    """Attempts to hardlink ``src`` to ``dst``, copying if the link fails.

    Attempts to maintain the semantics of ``shutil.copy``.

    Because ``os.link`` does not overwrite files, a unique temporary file
    will be used if the target already exists, then that file will be moved
    into place.
    """

    if os.path.isdir(dst):
        dst = os.path.join(dst, os.path.basename(src))

    link_errno = link(src, dst)
    if link_errno == errno.EEXIST:
        if os.stat(src).st_ino == os.stat(dst).st_ino:
            # dst is already a hard link to the correct file, so we don't need
            # to do anything else. If we try to link and rename the file
            # anyway, we get duplicate files - see http://bugs.python.org/issue21876
            return

        new_dst = dst + "-temp-%04X" %(random.randint(1, 16**4), )
        try:
            link_or_copy(src, new_dst)
        except:
            try:
                os.remove(new_dst)
            except OSError:
                pass
            raise
        os.rename(new_dst, dst)
    elif link_errno != 0:
        # Either link isn't supported, or the filesystem doesn't support
        # linking, or 'src' and 'dst' are on different filesystems.
        shutil.copy(src, dst)


def ensure_dir_exists(path, mode=0o755):
    """ensure that a directory exists
    
    If it doesn't exist, try to create it and protect against a race condition
    if another process is doing the same.
    
    The default permissions are 755, which differ from os.makedirs default of 777.
    """
    if not os.path.exists(path):
        try:
            os.makedirs(path, mode=mode)
        except OSError as e:
            if e.errno != errno.EEXIST:
                raise
    elif not os.path.isdir(path):
        raise IOError("%r exists but is not a directory" % path)


================================================
FILE: lib/client/ipython_genutils/py3compat.py
================================================
# coding: utf-8
"""Compatibility tricks for Python 3. Mainly to do with unicode."""
import functools
import os
import sys
import re
import shutil
import types

from .encoding import DEFAULT_ENCODING

def no_code(x, encoding=None):
    return x

def decode(s, encoding=None):
    encoding = encoding or DEFAULT_ENCODING
    return s.decode(encoding, "replace")

def encode(u, encoding=None):
    encoding = encoding or DEFAULT_ENCODING
    return u.encode(encoding, "replace")


def cast_unicode(s, encoding=None):
    if isinstance(s, bytes):
        return decode(s, encoding)
    return s

def cast_bytes(s, encoding=None):
    if not isinstance(s, bytes):
        return encode(s, encoding)
    return s

def buffer_to_bytes(buf):
    """Cast a buffer or memoryview object to bytes"""
    if isinstance(buf, memoryview):
        return buf.tobytes()
    if not isinstance(buf, bytes):
        return bytes(buf)
    return buf

def _modify_str_or_docstring(str_change_func):
    @functools.wraps(str_change_func)
    def wrapper(func_or_str):
        if isinstance(func_or_str, string_types):
            func = None
            doc = func_or_str
        else:
            func = func_or_str
            doc = func.__doc__
        
        doc = str_change_func(doc)
        
        if func:
            func.__doc__ = doc
            return func
        return doc
    return wrapper

def safe_unicode(e):
    """unicode(e) with various fallbacks. Used for exceptions, which may not be
    safe to call unicode() on.
    """
    try:
        return unicode_type(e)
    except UnicodeError:
        pass

    try:
        return str_to_unicode(str(e))
    except UnicodeError:
        pass

    try:
        return str_to_unicode(repr(e))
    except UnicodeError:
        pass

    return u'Unrecoverably corrupt evalue'

# shutil.which from Python 3.4
def _shutil_which(cmd, mode=os.F_OK | os.X_OK, path=None):
    """Given a command, mode, and a PATH string, return the path which
    conforms to the given mode on the PATH, or None if there is no such
    file.

    `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
    of os.environ.get("PATH"), or can be overridden with a custom search
    path.
    
    This is a backport of shutil.which from Python 3.4
    """
    # Check that a given file can be accessed with the correct mode.
    # Additionally check that `file` is not a directory, as on Windows
    # directories pass the os.access check.
    def _access_check(fn, mode):
        return (os.path.exists(fn) and os.access(fn, mode)
                and not os.path.isdir(fn))

    # If we're given a path with a directory part, look it up directly rather
    # than referring to PATH directories. This includes checking relative to the
    # current directory, e.g. ./script
    if os.path.dirname(cmd):
        if _access_check(cmd, mode):
            return cmd
        return None

    if path is None:
        path = os.environ.get("PATH", os.defpath)
    if not path:
        return None
    path = path.split(os.pathsep)

    if sys.platform == "win32":
        # The current directory takes precedence on Windows.
        if not os.curdir in path:
            path.insert(0, os.curdir)

        # PATHEXT is necessary to check on Windows.
        pathext = os.environ.get("PATHEXT", "").split(os.pathsep)
        # See if the given file matches any of the expected path extensions.
        # This will allow us to short circuit when given "python.exe".
        # If it does match, only test that one, otherwise we have to try
        # others.
        if any(cmd.lower().endswith(ext.lower()) for ext in pathext):
            files = [cmd]
        else:
            files = [cmd + ext for ext in pathext]
    else:
        # On other platforms you don't have things like PATHEXT to tell you
        # what file suffixes are executable, so just pass on cmd as-is.
        files = [cmd]

    seen = set()
    for dir in path:
        normdir = os.path.normcase(dir)
        if not normdir in seen:
            seen.add(normdir)
            for thefile in files:
                name = os.path.join(dir, thefile)
                if _access_check(name, mode):
                    return name
    return None

import platform
if sys.version_info[0] >= 3 or platform.python_implementation() == 'IronPython':
    str_to_unicode = no_code
    unicode_to_str = no_code
    str_to_bytes = encode
    bytes_to_str = decode
    cast_bytes_py2 = no_code
    cast_unicode_py2 = no_code
    buffer_to_bytes_py2 = no_code
    
    string_types = (str,)
    unicode_type = str
else:
    str_to_unicode = decode
    unicode_to_str = encode
    str_to_bytes = no_code
    bytes_to_str = no_code
    cast_bytes_py2 = cast_bytes
    cast_unicode_py2 = cast_unicode
    buffer_to_bytes_py2 = buffer_to_bytes
    
    string_types = (str, unicode)
    unicode_type = unicode

if sys.version_info[0] >= 3:
    PY3 = True
    
    # keep reference to builtin_mod because the kernel overrides that value
    # to forward requests to a frontend.
    def input(prompt=''):
        return builtin_mod.input(prompt)
    
    builtin_mod_name = "builtins"
    import builtins as builtin_mod
        
    which = shutil.which
    
    def isidentifier(s, dotted=False):
        if dotted:
            return all(isidentifier(a) for a in s.split("."))
        return s.isidentifier()

    xrange = range
    def iteritems(d): return iter(d.items())
    def itervalues(d): return iter(d.values())
    getcwd = os.getcwd
    
    MethodType = types.MethodType

    def execfile(fname, glob, loc=None, compiler=None):
        loc = loc if (loc is not None) else glob
        with open(fname, 'rb') as f:
            compiler = compiler or compile
            exec(compiler(f.read(), fname, 'exec'), glob, loc)
    
    # Refactor print statements in doctests.
    _print_statement_re = re.compile(r"\bprint (?P<expr>.*)$", re.MULTILINE)
    def _print_statement_sub(match):
        expr = match.groups('expr')
        return "print(%s)" % expr
    
    @_modify_str_or_docstring
    def doctest_refactor_print(doc):
        """Refactor 'print x' statements in a doctest to print(x) style. 2to3
        unfortunately doesn't pick up on our doctests.
        
        Can accept a string or a function, so it can be used as a decorator."""
        return _print_statement_re.sub(_print_statement_sub, doc)
    
    # Abstract u'abc' syntax:
    @_modify_str_or_docstring
    def u_format(s):
        """"{u}'abc'" --> "'abc'" (Python 3)
        
        Accepts a string or a function, so it can be used as a decorator."""
        return s.format(u='')
    
    def get_closure(f):
        """Get a function's closure attribute"""
        return f.__closure__

else:
    PY3 = False
    
    # keep reference to builtin_mod because the kernel overrides that value
    # to forward requests to a frontend.
    def input(prompt=''):
        return builtin_mod.raw_input(prompt)
    
    builtin_mod_name = "__builtin__"
    import __builtin__ as builtin_mod
    
    import re
    _name_re = re.compile(r"[a-zA-Z_][a-zA-Z0-9_]*$")
    def isidentifier(s, dotted=False):
        if dotted:
            return all(isidentifier(a) for a in s.split("."))
        return bool(_name_re.match(s))
    
    xrange = xrange
    def iteritems(d): return d.iteritems()
    def itervalues(d): return d.itervalues()
    getcwd = os.getcwdu

    def MethodType(func, instance):
        return types.MethodType(func, instance, type(instance))
    
    def doctest_refactor_print(func_or_str):
        return func_or_str

    def get_closure(f):
        """Get a function's closure attribute"""
        return f.func_closure
    
    which = _shutil_which

    # Abstract u'abc' syntax:
    @_modify_str_or_docstring
    def u_format(s):
        """"{u}'abc'" --> "u'abc'" (Python 2)
        
        Accepts a string or a function, so it can be used as a decorator."""
        return s.format(u='u')

    if sys.platform == 'win32':
        def execfile(fname, glob=None, loc=None, compiler=None):
            loc = loc if (loc is not None) else glob
            scripttext = builtin_mod.open(fname).read()+ '\n'
            # compile converts unicode filename to str assuming
            # ascii. Let's do the conversion before calling compile
            if isinstance(fname, unicode):
                filename = unicode_to_str(fname)
            else:
                filename = fname
            compiler = compiler or compile
            exec(compiler(scripttext, filename, 'exec'), glob, loc)

    else:
        def execfile(fname, glob=None, loc=None, compiler=None):
            if isinstance(fname, unicode):
                filename = fname.encode(sys.getfilesystemencoding())
            else:
                filename = fname
            where = [ns for ns in [glob, loc] if ns is not None]
            if compiler is None:
                builtin_mod.execfile(filename, *where)
            else:
                scripttext = builtin_mod.open(fname).read().rstrip() + '\n'
                exec(compiler(scripttext, filename, 'exec'), glob, loc)


def annotate(**kwargs):
    """Python 3 compatible function annotation for Python 2."""
    if not kwargs:
        raise ValueError('annotations must be provided as keyword arguments')
    def dec(f):
        if hasattr(f, '__annotations__'):
            for k, v in kwargs.items():
                f.__annotations__[k] = v
        else:
            f.__annotations__ = kwargs
        return f
    return dec


# Parts below taken from six:
# Copyright (c) 2010-2013 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

def with_metaclass(meta, *bases):
    """Create a base class with a metaclass."""
    return meta("_NewBase", bases, {})


================================================
FILE: lib/client/ipython_genutils/tempdir.py
================================================
"""TemporaryDirectory class, copied from Python 3

This is copied from the stdlib and will be standard in Python 3.2 and onwards.
"""

# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.

from __future__ import print_function

import os as _os
import warnings as _warnings
import sys as _sys

# This code should only be used in Python versions < 3.2, since after that we
# can rely on the stdlib itself.
try:
    from tempfile import TemporaryDirectory

except ImportError:
    from tempfile import mkdtemp, template

    class TemporaryDirectory(object):
        """Create and return a temporary directory.  This has the same
        behavior as mkdtemp but can be used as a context manager.  For
        example:

            with TemporaryDirectory() as tmpdir:
                ...

        Upon exiting the context, the directory and everthing contained
        in it are removed.
        """

        def __init__(self, suffix="", prefix=template, dir=None):
            self.name = mkdtemp(suffix, prefix, dir)
            self._closed = False

        def __enter__(self):
            return self.name

        def cleanup(self, _warn=False):
            if self.name and not self._closed:
                try:
                    self._rmtree(self.name)
                except (TypeError, AttributeError) as ex:
                    # Issue #10188: Emit a warning on stderr
                    # if the directory could not be cleaned
                    # up due to missing globals
                    if "None" not in str(ex):
                        raise
                    print("ERROR: {!r} while cleaning up {!r}".format(ex, self,),
                          file=_sys.stderr)
                    return
                self._closed = True
                if _warn:
                    self._warn("Implicitly cleaning up {!r}".format(self),
                               Warning)

        def __exit__(self, exc, value, tb):
            self.cleanup()

        def __del__(self):
            # Issue a ResourceWarning if implicit cleanup needed
            self.cleanup(_warn=True)


        # XXX (ncoghlan): The following code attempts to make
        # this class tolerant of the module nulling out process
        # that happens during CPython interpreter shutdown
        # Alas, it doesn't actually manage it. See issue #10188
        _listdir = staticmethod(_os.listdir)
        _path_join = staticmethod(_os.path.join)
        _isdir = staticmethod(_os.path.isdir)
        _remove = staticmethod(_os.remove)
        _rmdir = staticmethod(_os.rmdir)
        _os_error = _os.error
        _warn = _warnings.warn

        def _rmtree(self, path):
            # Essentially a stripped down version of shutil.rmtree.  We can't
            # use globals because they may be None'ed out at shutdown.
            for name in self._listdir(path):
                fullname = self._path_join(path, name)
                try:
                    isdir = self._isdir(fullname)
                except self._os_error:
                    isdir = False
                if isdir:
                    self._rmtree(fullname)
                else:
                    try:
                        self._remove(fullname)
                    except self._os_error:
                        pass
            try:
                self._rmdir(path)
            except self._os_error:
                pass

# extra temp-dir-related context managers

class NamedFileInTemporaryDirectory(object):

    def __init__(self, filename, mode='w+b', bufsize=-1, **kwds):
        """
        Open a file named `filename` in a temporary directory.

        This context manager is preferred over `NamedTemporaryFile` in
        stdlib `tempfile` when one needs to reopen the file.

        Arguments `mode` and `bufsize` are passed to `open`.
        Rest of the arguments are passed to `TemporaryDirectory`.

        """
        self._tmpdir = TemporaryDirectory(**kwds)
        path = _os.path.join(self._tmpdir.name, filename)
        self.file = open(path, mode, bufsize)

    def cleanup(self):
        self.file.close()
        self._tmpdir.cleanup()

    __del__ = cleanup

    def __enter__(self):
        return self.file

    def __exit__(self, type, value, traceback):
        self.cleanup()


class TemporaryWorkingDirectory(TemporaryDirectory):
    """
    Creates a temporary directory and sets the cwd to that directory.
    Automatically reverts to previous cwd upon cleanup.
    Usage example:

        with TemporaryWorkingDirectory() as tmpdir:
            ...
    """
    def __enter__(self):
        self.old_wd = _os.getcwd()
        _os.chdir(self.name)
        return super(TemporaryWorkingDirectory, self).__enter__()

    def __exit__(self, exc, value, tb):
        _os.chdir(self.old_wd)
        return super(TemporaryWorkingDirectory, self).__exit__(exc, value, tb)



================================================
FILE: lib/client/ipython_genutils/text.py
================================================
# encoding: utf-8
"""
Utilities for working with strings and text.

Inheritance diagram:

.. inheritance-diagram:: IPython.utils.text
   :parts: 3
"""

import os
import re
import sys
import textwrap
from string import Formatter

# datetime.strftime date format for ipython
if sys.platform == 'win32':
    date_format = "%B %d, %Y"
else:
    date_format = "%B %-d, %Y"


def indent(instr,nspaces=4, ntabs=0, flatten=False):
    """Indent a string a given number of spaces or tabstops.

    indent(str,nspaces=4,ntabs=0) -> indent str by ntabs+nspaces.

    Parameters
    ----------

    instr : basestring
        The string to be indented.
    nspaces : int (default: 4)
        The number of spaces to be indented.
    ntabs : int (default: 0)
        The number of tabs to be indented.
    flatten : bool (default: False)
        Whether to scrub existing indentation.  If True, all lines will be
        aligned to the same indentation.  If False, existing indentation will
        be strictly increased.

    Returns
    -------

    str|unicode : string indented by ntabs and nspaces.

    """
    if instr is None:
        return
    ind = '\t'*ntabs+' '*nspaces
    if flatten:
        pat = re.compile(r'^\s*', re.MULTILINE)
    else:
        pat = re.compile(r'^', re.MULTILINE)
    outstr = re.sub(pat, ind, instr)
    if outstr.endswith(os.linesep+ind):
        return outstr[:-len(ind)]
    else:
        return outstr


def dedent(text):
    """Equivalent of textwrap.dedent that ignores unindented first line.

    This means it will still dedent strings like:
    '''foo
    is a bar
    '''

    For use in wrap_paragraphs.
    """

    if text.startswith('\n'):
        # text starts with blank line, don't ignore the first line
        return textwrap.dedent(text)

    # split first line
    splits = text.split('\n',1)
    if len(splits) == 1:
        # only one line
        return textwrap.dedent(text)

    first, rest = splits
    # dedent everything but the first line
    rest = textwrap.dedent(rest)
    return '\n'.join([first, rest])


def wrap_paragraphs(text, ncols=80):
    """Wrap multiple paragraphs to fit a specified width.

    This is equivalent to textwrap.wrap, but with support for multiple
    paragraphs, as separated by empty lines.

    Returns
    -------

    list of complete paragraphs, wrapped to fill `ncols` columns.
    """
    paragraph_re = re.compile(r'\n(\s*\n)+', re.MULTILINE)
    text = dedent(text).strip()
    paragraphs = paragraph_re.split(text)[::2] # every other entry is space
    out_ps = []
    indent_re = re.compile(r'\n\s+', re.MULTILINE)
    for p in paragraphs:
        # presume indentation that survives dedent is meaningful formatting,
        # so don't fill unless text is flush.
        if indent_re.search(p) is None:
            # wrap paragraph
            p = textwrap.fill(p, ncols)
        out_ps.append(p)
    return out_ps


def strip_ansi(source):
    """
    Remove ansi escape codes from text.
    
    Parameters
    ----------
    source : str
        Source to remove the ansi from
    """
    return re.sub(r'\033\[(\d|;)+?m', '', source)


#-----------------------------------------------------------------------------
# Utils to columnize a list of string
#-----------------------------------------------------------------------------

def _chunks(l, n):
    """Yield successive n-sized chunks from l."""
    for i in range(0, len(l), n):
        yield l[i:i+n]


def _find_optimal(rlist , separator_size=2 , displaywidth=80):
    """Calculate optimal info to columnize a list of string"""
    for nrow in range(1, len(rlist)+1) :
        chk = list(map(max,_chunks(rlist, nrow)))
        sumlength = sum(chk)
        ncols = len(chk)
        if sumlength+separator_size*(ncols-1) <= displaywidth :
            break;
    return {'columns_numbers' : ncols,
            'optimal_separator_width':(displaywidth - sumlength)/(ncols-1) if (ncols -1) else 0,
            'rows_numbers' : nrow,
            'columns_width' : chk
           }


def _get_or_default(mylist, i, default=None):
    """return list item number, or default if don't exist"""
    if i >= len(mylist):
        return default
    else :
        return mylist[i]


def compute_item_matrix(items, empty=None, *args, **kwargs) :
    """Returns a nested list, and info to columnize items

    Parameters
    ----------

    items
        list of strings to columize
    empty : (default None)
        default value to fill list if needed
    separator_size : int (default=2)
        How much caracters will be used as a separation between each columns.
    displaywidth : int (default=80)
        The width of the area onto wich the columns should enter

    Returns
    -------

    strings_matrix

        nested list of string, the outer most list contains as many list as
        rows, the innermost lists have each as many element as colums. If the
        total number of elements in `items` does not equal the product of
        rows*columns, the last element of some lists are filled with `None`.

    dict_info
        some info to make columnize easier:

        columns_numbers
          number of columns
        rows_numbers
          number of rows
        columns_width
          list of with of each columns
        optimal_separator_width
          best separator width between columns

    Examples
    --------
    ::

        In [1]: l = ['aaa','b','cc','d','eeeee','f','g','h','i','j','k','l']
           ...: compute_item_matrix(l,displaywidth=12)
        Out[1]:
            ([['aaa', 'f', 'k'],
            ['b', 'g', 'l'],
            ['cc', 'h', None],
            ['d', 'i', None],
            ['eeeee', 'j', None]],
            {'columns_numbers': 3,
            'columns_width': [5, 1, 1],
            'optimal_separator_width': 2,
            'rows_numbers': 5})
    """
    info = _find_optimal(list(map(len, items)), *args, **kwargs)
    nrow, ncol = info['rows_numbers'], info['columns_numbers']
    return ([[ _get_or_default(items, c*nrow+i, default=empty) for c in range(ncol) ] for i in range(nrow) ], info)


def columnize(items, separator='  ', displaywidth=80):
    """ Transform a list of strings into a single string with columns.

    Parameters
    ----------
    items : sequence of strings
        The strings to process.

    separator : str, optional [default is two spaces]
        The string that separates columns.

    displaywidth : int, optional [default is 80]
        Width of the display in number of characters.

    Returns
    -------
    The formatted string.
    """
    if not items :
        return '\n'
    matrix, info = compute_item_matrix(items, separator_size=len(separator), displaywidth=displaywidth)
    fmatrix = [filter(None, x) for x in matrix]
    sjoin = lambda x : separator.join([ y.ljust(w, ' ') for y, w in zip(x, info['columns_width'])])
    return '\n'.join(map(sjoin, fmatrix))+'\n'



================================================
FILE: lib/client/jupyter_client/__init__.py
================================================
"""Client-side implementations of the Jupyter protocol"""

from ._version import version_info, __version__, protocol_version_info, protocol_version
from .connect import *
from .launcher import *
from .client import KernelClient
from .manager import KernelManager, run_kernel
from .blocking import BlockingKernelClient
from .multikernelmanager import MultiKernelManager


================================================
FILE: lib/client/jupyter_client/_version.py
================================================
version_info = (5, 2, 4)
__version__ = '.'.join(map(str, version_info))

protocol_version_info = (5, 3)
protocol_version = "%i.%i" % protocol_version_info


================================================
FILE: lib/client/jupyter_client/adapter.py
================================================
"""Adapters for Jupyter msg spec versions."""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

import re
import json

from jupyter_client import protocol_version_info

def code_to_line(code, cursor_pos):
    """Turn a multiline code block and cursor position into a single line
    and new cursor position.

    For adapting ``complete_`` and ``object_info_request``.
    """
    if not code:
        return "", 0
    for line in code.splitlines(True):
        n = len(line)
        if cursor_pos > n:
            cursor_pos -= n
        else:
            break
    return line, cursor_pos


_match_bracket = re.compile(r'\([^\(\)]+\)', re.UNICODE)
_end_bracket = re.compile(r'\([^\(]*$', re.UNICODE)
_identifier = re.compile(r'[a-z_][0-9a-z._]*', re.I|re.UNICODE)

def extract_oname_v4(code, cursor_pos):
    """Reimplement token-finding logic from IPython 2.x javascript
    
    for adapting object_info_request from v5 to v4
    """
    
    line, _ = code_to_line(code, cursor_pos)
    
    oldline = line
    line = _match_bracket.sub(u'', line)
    while oldline != line:
        oldline = line
        line = _match_bracket.sub(u'', line)

    # remove everything after last open bracket
    line = _end_bracket.sub('', line)
    matches = _identifier.findall(line)
    if matches:
        return matches[-1]
    else:
        return ''


class Adapter(object):
    """Base class for adapting messages

    Override message_type(msg) methods to create adapters.
    """

    msg_type_map = {}

    def update_header(self, msg):
        return msg

    def update_metadata(self, msg):
        return msg

    def update_msg_type(self, msg):
        header = msg['header']
        msg_type = header['msg_type']
        if msg_type in self.msg_type_map:
            msg['msg_type'] = header['msg_type'] = self.msg_type_map[msg_type]
        return msg

    def handle_reply_status_error(self, msg):
        """This will be called *instead of* the regular handler

        on any reply with status != ok
        """
        return msg

    def __call__(self, msg):
        msg = self.update_header(msg)
        msg = self.update_metadata(msg)
        msg = self.update_msg_type(msg)
        header = msg['header']

        handler = getattr(self, header['msg_type'], None)
        if handler is None:
            return msg

        # handle status=error replies separately (no change, at present)
        if msg['content'].get('status', None) in {'error', 'aborted'}:
            return self.handle_reply_status_error(msg)
        return handler(msg)

def _version_str_to_list(version):
    """convert a version string to a list of ints

    non-int segments are excluded
    """
    v = []
    for part in version.split('.'):
        try:
            v.append(int(part))
        except ValueError:
            pass
    return v

class V5toV4(Adapter):
    """Adapt msg protocol v5 to v4"""

    version = '4.1'

    msg_type_map = {
        'execute_result' : 'pyout',
        'execute_input' : 'pyin',
        'error' : 'pyerr',
        'inspect_request' : 'object_info_request',
        'inspect_reply' : 'object_info_reply',
    }

    def update_header(self, msg):
        msg['header'].pop('version', None)
        msg['parent_header'].pop('version', None)
        return msg

    # shell channel

    def kernel_info_reply(self, msg):
        v4c = {}
        content = msg['content']
        for key in ('language_version', 'protocol_version'):
            if key in content:
                v4c[key] = _version_str_to_list(content[key])
        if content.get('implementation', '') == 'ipython' \
            and 'implementation_version' in content:
            v4c['ipython_version'] = _version_str_to_list(content['implementation_version'])
        language_info = content.get('language_info', {})
        language = language_info.get('name', '')
        v4c.setdefault('language', language)
        if 'version' in language_info:
            v4c.setdefault('language_version', _version_str_to_list(language_info['version']))
        msg['content'] = v4c
        return msg

    def execute_request(self, msg):
        content = msg['content']
        content.setdefault('user_variables', [])
        return msg

    def execute_reply(self, msg):
        content = msg['content']
        content.setdefault('user_variables', {})
        # TODO: handle payloads
        return msg

    def complete_request(self, msg):
        content = msg['content']
        code = content['code']
        cursor_pos = content['cursor_pos']
        line, cursor_pos = code_to_line(code, cursor_pos)

        new_content = msg['content'] = {}
        new_content['text'] = ''
        new_content['line'] = line
        new_content['block'] = None
        new_content['cursor_pos'] = cursor_pos
        return msg

    def complete_reply(self, msg):
        content = msg['content']
        cursor_start = content.pop('cursor_start')
        cursor_end = content.pop('cursor_end')
        match_len = cursor_end - cursor_start
        content['matched_text'] = content['matches'][0][:match_len]
        content.pop('metadata', None)
        return msg

    def object_info_request(self, msg):
        content = msg['content']
        code = content['code']
        cursor_pos = content['cursor_pos']
        line, _ = code_to_line(code, cursor_pos)

        new_content = msg['content'] = {}
        new_content['oname'] = extract_oname_v4(code, cursor_pos)
        new_content['detail_level'] = content['detail_level']
        return msg

    def object_info_reply(self, msg):
        """inspect_reply can't be easily backward compatible"""
        msg['content'] = {'found' : False, 'oname' : 'unknown'}
        return msg

    # iopub channel

    def stream(self, msg):
        content = msg['content']
        content['data'] = content.pop('text')
        return msg

    def display_data(self, msg):
        content = msg['content']
        content.setdefault("source", "display")
        data = content['data']
        if 'application/json' in data:
            try:
                data['application/json'] = json.dumps(data['application/json'])
            except Exception:
                # warn?
                pass
        return msg

    # stdin channel

    def input_request(self, msg):
        msg['content'].pop('password', None)
        return msg


class V4toV5(Adapter):
    """Convert msg spec V4 to V5"""
    version = '5.0'

    # invert message renames above
    msg_type_map = {v:k for k,v in V5toV4.msg_type_map.items()}

    def update_header(self, msg):
        msg['header']['version'] = self.version
        if msg['parent_header']:
            msg['parent_header']['version'] = self.version
        return msg

    # shell channel

    def kernel_info_reply(self, msg):
        content = msg['content']
        for key in ('protocol_version', 'ipython_version'):
            if key in content:
                content[key] = '.'.join(map(str, content[key]))

        content.setdefault('protocol_version', '4.1')

        if content['language'].startswith('python') and 'ipython_version' in content:
            content['implementation'] = 'ipython'
            content['implementation_version'] = content.pop('ipython_version')

        language = content.pop('language')
        language_info = content.setdefault('language_info', {})
        language_info.setdefault('name', language)
        if 'language_version' in content:
            language_version = '.'.join(map(str, content.pop('language_version')))
            language_info.setdefault('version', language_version)

        content['banner'] = ''
        return msg

    def execute_request(self, msg):
        content = msg['content']
        user_variables = content.pop('user_variables', [])
        user_expressions = content.setdefault('user_expressions', {})
        for v in user_variables:
            user_expressions[v] = v
        return msg

    def execute_reply(self, msg):
        content = msg['content']
        user_expressions = content.setdefault('user_expressions', {})
        user_variables = content.pop('user_variables', {})
        if user_variables:
            user_expressions.update(user_variables)

        # Pager payloads became a mime bundle
        for payload in content.get('payload', []):
            if payload.get('source', None) == 'page' and ('text' in payload):
                if 'data' not in payload:
                    payload['data'] = {}
                payload['data']['text/plain'] = payload.pop('text')

        return msg

    def complete_request(self, msg):
        old_content = msg['content']

        new_content = msg['content'] = {}
        new_content['code'] = old_content['line']
        new_content['cursor_pos'] = old_content['cursor_pos']
        return msg

    def complete_reply(self, msg):
        # complete_reply needs more context than we have to get cursor_start and end.
        # use special end=null to indicate current cursor position and negative offset
        # for start relative to the cursor.
        # start=None indicates that start == end (accounts for no -0).
        content = msg['content']
        new_content = msg['content'] = {'status' : 'ok'}
        new_content['matches'] = content['matches']
        if content['matched_text']:
            new_content['cursor_start'] = -len(content['matched_text'])
        else:
            # no -0, use None to indicate that start == end
            new_content['cursor_start'] = None
        new_content['cursor_end'] = None
        new_content['metadata'] = {}
        return msg

    def inspect_request(self, msg):
        content = msg['content']
        name = content['oname']

        new_content = msg['content'] = {}
        new_content['code'] = name
        new_content['cursor_pos'] = len(name)
        new_content['detail_level'] = content['detail_level']
        return msg

    def inspect_reply(self, msg):
        """inspect_reply can't be easily backward compatible"""
        content = msg['content']
        new_content = msg['content'] = {'status' : 'ok'}
        found = new_content['found'] = content['found']
        new_content['data'] = data = {}
        new_content['metadata'] = {}
        if found:
            lines = []
            for key in ('call_def', 'init_definition', 'definition'):
                if content.get(key, False):
                    lines.append(content[key])
                    break
            for key in ('call_docstring', 'init_docstring', 'docstring'):
                if content.get(key, False):
                    lines.append(content[key])
                    break
            if not lines:
                lines.append("<empty docstring>")
            data['text/plain'] = '\n'.join(lines)
        return msg

    # iopub channel

    def stream(self, msg):
        content = msg['content']
        content['text'] = content.pop('data')
        return msg

    def display_data(self, msg):
        content = msg['content']
        content.pop("source", None)
        data = content['data']
        if 'application/json' in data:
            try:
                data['application/json'] = json.loads(data['application/json'])
            except Exception:
                # warn?
                pass
        return msg

    # stdin channel

    def input_request(self, msg):
        msg['content'].setdefault('password', False)
        return msg



def adapt(msg, to_version=protocol_version_info[0]):
    """Adapt a single message to a target version

    Parameters
    ----------

    msg : dict
        A Jupyter message.
    to_version : int, optional
        The target major version.
        If unspecified, adapt to the current version.

    Returns
    -------

    msg : dict
        A Jupyter message appropriate in the new version.
    """
    from .session import utcnow
    header = msg['header']
    if 'date' not in header:
        header['date'] = utcnow()
    if 'version' in header:
        from_version = int(header['version'].split('.')[0])
    else:
        # assume last version before adding the key to the header
        from_version = 4
    adapter = adapters.get((from_version, to_version), None)
    if adapter is None:
        return msg
    return adapter(msg)


# one adapter per major version from,to
adapters = {
    (5,4) : V5toV4(),
    (4,5) : V4toV5(),
}


================================================
FILE: lib/client/jupyter_client/blocking/__init__.py
================================================
from .client import BlockingKernelClient

================================================
FILE: lib/client/jupyter_client/blocking/channels.py
================================================
"""Blocking channels

Useful for test suites and blocking terminal interfaces.
"""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

try:
    from queue import Queue, Empty  # Py 3
except ImportError:
    from Queue import Queue, Empty  # Py 2


class ZMQSocketChannel(object):
    """A ZMQ socket in a simple blocking API"""
    session = None
    socket = None
    stream = None
    _exiting = False
    proxy_methods = []

    def __init__(self, socket, session, loop=None):
        """Create a channel.

        Parameters
        ----------
        socket : :class:`zmq.Socket`
            The ZMQ socket to use.
        session : :class:`session.Session`
            The session to use.
        loop
            Unused here, for other implementations
        """
        super(ZMQSocketChannel, self).__init__()

        self.socket = socket
        self.session = session

    def _recv(self, **kwargs):
        msg = self.socket.recv_multipart(**kwargs)
        ident,smsg = self.session.feed_identities(msg)
        return self.session.deserialize(smsg)

    def get_msg(self, block=True, timeout=None):
        """ Gets a message if there is one that is ready. """
        if block:
            if timeout is not None:
                timeout *= 1000  # seconds to ms
            ready = self.socket.poll(timeout)
        else:
            ready = self.socket.poll(timeout=0)

        if ready:
            return self._recv()
        else:
            raise Empty

    def get_msgs(self):
        """ Get all messages that are currently ready. """
        msgs = []
        while True:
            try:
                msgs.append(self.get_msg(block=False))
            except Empty:
                break
        return msgs

    def msg_ready(self):
        """ Is there a message that has been received? """
        return bool(self.socket.poll(timeout=0))

    def close(self):
        if self.socket is not None:
            try:
                self.socket.close(linger=0)
            except Exception:
                pass
            self.socket = None
    stop =  close

    def is_alive(self):
        return (self.socket is not None)

    def send(self, msg):
        """Pass a message to the ZMQ socket to send
        """
        self.session.send(self.socket, msg)

    def start(self):
        pass


================================================
FILE: lib/client/jupyter_client/blocking/client.py
================================================
"""Implements a fully blocking kernel client.

Useful for test suites and blocking terminal interfaces.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

from __future__ import print_function

from functools import partial
from getpass import getpass
try:
    from queue import Empty  # Python 3
except ImportError:
    from Queue import Empty  # Python 2
import sys
import time

import zmq

from traitlets import Type
from jupyter_client.channels import HBChannel
from jupyter_client.client import KernelClient
from .channels import ZMQSocketChannel

try:
    monotonic = time.monotonic
except AttributeError:
    # py2
    monotonic = time.time # close enough

try:
    TimeoutError
except NameError:
    # py2
    TimeoutError = RuntimeError


def reqrep(meth):
    def wrapped(self, *args, **kwargs):
        reply = kwargs.pop('reply', False)
        timeout = kwargs.pop('timeout', None)
        msg_id = meth(self, *args, **kwargs)
        if not reply:
            return msg_id

        return self._recv_reply(msg_id, timeout=timeout)
    
    if not meth.__doc__:
        # python -OO removes docstrings,
        # so don't bother building the wrapped docstring
        return wrapped
    
    basedoc, _ = meth.__doc__.split('Returns\n', 1)
    parts = [basedoc.strip()]
    if 'Parameters' not in basedoc:
        parts.append("""
        Parameters
        ----------
        """)
    parts.append("""
        reply: bool (default: False)
            Whether to wait for and return reply
        timeout: float or None (default: None)
            Timeout to use when waiting for a reply

        Returns
        -------
        msg_id: str
            The msg_id of the request sent, if reply=False (default)
        reply: dict
            The reply message for this request, if reply=True
    """)
    wrapped.__doc__ = '\n'.join(parts)
    return wrapped

class BlockingKernelClient(KernelClient):
    """A KernelClient with blocking APIs
    
    ``get_[channel]_msg()`` methods wait for and return messages on channels,
    raising :exc:`queue.Empty` if no message arrives within ``timeout`` seconds.
    """
    
    def wait_for_ready(self, timeout=None):
        """Waits for a response when a client is blocked
        
        - Sets future time for timeout
        - Blocks on shell channel until a message is received
        - Exit if the kernel has died
        - If client times out before receiving a message from the kernel, send RuntimeError
        - Flush the IOPub channel
        """
        if timeout is None:
            abs_timeout = float('inf')
        else:
            abs_timeout = time.time() + timeout

        from ..manager import KernelManager
        if not isinstance(self.parent, KernelManager):
            # This Client was not created by a KernelManager,
            # so wait for kernel to become responsive to heartbeats
            # before checking for kernel_info reply
            while not self.is_alive():
                if time.time() > abs_timeout:
                    raise RuntimeError("Kernel didn't respond to heartbeats in %d seconds and timed out" % timeout)
                time.sleep(0.2)

        # Wait for kernel info reply on shell channel
        while True:
            try:
                msg = self.shell_channel.get_msg(block=True, timeout=1)
            except Empty:
                pass
            else:
                if msg['msg_type'] == 'kernel_info_reply':
                    self._handle_kernel_info_reply(msg)
                    break

            if not self.is_alive():
                raise RuntimeError('Kernel died before replying to kernel_info')

            # Check if current time is ready check time plus timeout
            if time.time() > abs_timeout:
                raise RuntimeError("Kernel didn't respond in %d seconds" % timeout)

        # Flush IOPub channel
        while True:
            try:
                msg = self.iopub_channel.get_msg(block=True, timeout=0.2)
            except Empty:
                break

    # The classes to use for the various channels
    shell_channel_class = Type(ZMQSocketChannel)
    iopub_channel_class = Type(ZMQSocketChannel)
    stdin_channel_class = Type(ZMQSocketChannel)
    hb_channel_class = Type(HBChannel)


    def _recv_reply(self, msg_id, timeout=None):
        """Receive and return the reply for a given request"""
        if timeout is not None:
            deadline = monotonic() + timeout
        while True:
            if timeout is not None:
                timeout = max(0, deadline - monotonic())
            try:
                reply = self.get_shell_msg(timeout=timeout)
            except Empty:
                raise TimeoutError("Timeout waiting for reply")
            if reply['parent_header'].get('msg_id') != msg_id:
                # not my reply, someone may have forgotten to retrieve theirs
                continue
            return reply


    execute = reqrep(KernelClient.execute)
    history = reqrep(KernelClient.history)
    complete = reqrep(KernelClient.complete)
    inspect = reqrep(KernelClient.inspect)
    kernel_info = reqrep(KernelClient.kernel_info)
    comm_info = reqrep(KernelClient.comm_info)
    shutdown = reqrep(KernelClient.shutdown)


    def _stdin_hook_default(self, msg):
        """Handle an input request"""
        content = msg['content']
        if content.get('password', False):
            prompt = getpass
        elif sys.version_info < (3,):
            prompt = raw_input
        else:
            prompt = input

        try:
            raw_data = prompt(content["prompt"])
        except EOFError:
            # turn EOFError into EOF character
            raw_data = '\x04'
        except KeyboardInterrupt:
            sys.stdout.write('\n')
            return

        # only send stdin reply if there *was not* another request
        # or execution finished while we were reading.
        if not (self.stdin_channel.msg_ready() or self.shell_channel.msg_ready()):
            self.input(raw_data)

    def _output_hook_default(self, msg):
        """Default hook for redisplaying plain-text output"""
        msg_type = msg['header']['msg_type']
        content = msg['content']
        if msg_type == 'stream':
            stream = getattr(sys, content['name'])
            stream.write(content['text'])
        elif msg_type in ('display_data', 'execute_result'):
            sys.stdout.write(content['data'].get('text/plain', ''))
        elif msg_type == 'error':
            print('\n'.join(content['traceback']), file=sys.stderr)

    def _output_hook_kernel(self, session, socket, parent_header, msg):
        """Output hook when running inside an IPython kernel

        adds rich output support.
        """
        msg_type = msg['header']['msg_type']
        if msg_type in ('display_data', 'execute_result', 'error'):
            session.send(socket, msg_type, msg['content'], parent=parent_header)
        else:
            self._output_hook_default(msg)

    def execute_interactive(self, code, silent=False, store_history=True,
                 user_expressions=None, allow_stdin=None, stop_on_error=True,
                 timeout=None, output_hook=None, stdin_hook=None,
                ):
        """Execute code in the kernel interactively

        Output will be redisplayed, and stdin prompts will be relayed as well.
        If an IPython kernel is detected, rich output will be displayed.

        You can pass a custom output_hook callable that will be called
        with every IOPub message that is produced instead of the default redisplay.

        .. versionadded:: 5.0

        Parameters
        ----------
        code : str
            A string of code in the kernel's language.

        silent : bool, optional (default False)
            If set, the kernel will execute the code as quietly possible, and
            will force store_history to be False.

        store_history : bool, optional (default True)
            If set, the kernel will store command history.  This is forced
            to be False if silent is True.

        user_expressions : dict, optional
            A dict mapping names to expressions to be evaluated in the user's
            dict. The expression values are returned as strings formatted using
            :func:`repr`.

        allow_stdin : bool, optional (default self.allow_stdin)
            Flag for whether the kernel can send stdin requests to frontends.

            Some frontends (e.g. the Notebook) do not support stdin requests.
            If raw_input is called from code executed from such a frontend, a
            StdinNotImplementedError will be raised.

        stop_on_error: bool, optional (default True)
            Flag whether to abort the execution queue, if an exception is encountered.

        timeout: float or None (default: None)
            Timeout to use when waiting for a reply

        output_hook: callable(msg)
            Function to be called with output messages.
            If not specified, output will be redisplayed.

        stdin_hook: callable(msg)
            Function to be called with stdin_request messages.
            If not specified, input/getpass will be called.

        Returns
        -------
        reply: dict
            The reply message for this request
        """
        if not self.iopub_channel.is_alive():
            raise RuntimeError("IOPub channel must be running to receive output")
        if allow_stdin is None:
            allow_stdin = self.allow_stdin
        if allow_stdin and not self.stdin_channel.is_alive():
            raise RuntimeError("stdin channel must be running to allow input")
        msg_id = self.execute(code,
                              silent=silent,
                              store_history=store_history,
                              user_expressions=user_expressions,
                              allow_stdin=allow_stdin,
                              stop_on_error=stop_on_error,
        )
        if stdin_hook is None:
            stdin_hook = self._stdin_hook_default
        if output_hook is None:
            # detect IPython kernel
            if 'IPython' in sys.modules:
                from IPython import get_ipython
                ip = get_ipython()
                in_kernel = getattr(ip, 'kernel', False)
                if in_kernel:
                    output_hook = partial(
                        self._output_hook_kernel,
                        ip.display_pub.session,
                        ip.display_pub.pub_socket,
                        ip.display_pub.parent_header,
                    )
        if output_hook is None:
            # default: redisplay plain-text outputs
            output_hook = self._output_hook_default

        # set deadline based on timeout
        if timeout is not None:
            deadline = monotonic() + timeout
        else:
            timeout_ms = None

        poller = zmq.Poller()
        iopub_socket = self.iopub_channel.socket
        poller.register(iopub_socket, zmq.POLLIN)
        if allow_stdin:
            stdin_socket = self.stdin_channel.socket
            poller.register(stdin_socket, zmq.POLLIN)
        else:
            stdin_socket = None

        # wait for output and redisplay it
        while True:
            if timeout is not None:
                timeout = max(0, deadline - monotonic())
                timeout_ms = 1e3 * timeout
            events = dict(poller.poll(timeout_ms))
            if not events:
                raise TimeoutError("Timeout waiting for output")
            if stdin_socket in events:
                req = self.stdin_channel.get_msg(timeout=0)
                stdin_hook(req)
                continue
            if iopub_socket not in events:
                continue

            msg = self.iopub_channel.get_msg(timeout=0)

            if msg['parent_header'].get('msg_id') != msg_id:
                # not from my request
                continue
            output_hook(msg)

            # stop on idle
            if msg['header']['msg_type'] == 'status' and \
            msg['content']['execution_state'] == 'idle':
                break

        # output is done, get the reply
        if timeout is not None:
            timeout = max(0, deadline - monotonic())
        return self._recv_reply(msg_id, timeout=timeout)


================================================
FILE: lib/client/jupyter_client/channels.py
================================================
"""Base classes to manage a Client's interaction with a running kernel"""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

from __future__ import absolute_import

import atexit
import errno
from threading import Thread
import time

import zmq
# import ZMQError in top-level namespace, to avoid ugly attribute-error messages
# during garbage collection of threads at exit:
from zmq import ZMQError

from jupyter_client import protocol_version_info

from .channelsabc import HBChannelABC

#-----------------------------------------------------------------------------
# Constants and exceptions
#-----------------------------------------------------------------------------

major_protocol_version = protocol_version_info[0]

class InvalidPortNumber(Exception):
    pass

class HBChannel(Thread):
    """The heartbeat channel which monitors the kernel heartbeat.

    Note that the heartbeat channel is paused by default. As long as you start
    this channel, the kernel manager will ensure that it is paused and un-paused
    as appropriate.
    """
    context = None
    session = None
    socket = None
    address = None
    _exiting = False

    time_to_dead = 1.
    poller = None
    _running = None
    _pause = None
    _beating = None

    def __init__(self, context=None, session=None, address=None):
        """Create the heartbeat monitor thread.

        Parameters
        ----------
        context : :class:`zmq.Context`
            The ZMQ context to use.
        session : :class:`session.Session`
            The session to use.
        address : zmq url
            Standard (ip, port) tuple that the kernel is listening on.
        """
        super(HBChannel, self).__init__()
        self.daemon = True

        self.context = context
        self.session = session
        if isinstance(address, tuple):
            if address[1] == 0:
                message = 'The port number for a channel cannot be 0.'
                raise InvalidPortNumber(message)
            address = "tcp://%s:%i" % address
        self.address = address

        # running is False until `.start()` is called
        self._running = False
        # don't start paused
        self._pause = False
        self.poller = zmq.Poller()

    @staticmethod
    @atexit.register
    def _notice_exit():
        # Class definitions can be torn down during interpreter shutdown.
        # We only need to set _exiting flag if this hasn't happened.
        if HBChannel is not None:
            HBChannel._exiting = True

    def _create_socket(self):
        if self.socket is not None:
            # close previous socket, before opening a new one
            self.poller.unregister(self.socket)
            self.socket.close()
        self.socket = self.context.socket(zmq.REQ)
        self.socket.linger = 1000
        self.socket.connect(self.address)

        self.poller.register(self.socket, zmq.POLLIN)

    def _poll(self, start_time):
        """poll for heartbeat replies until we reach self.time_to_dead.

        Ignores interrupts, and returns the result of poll(), which
        will be an empty list if no messages arrived before the timeout,
        or the event tuple if there is a message to receive.
        """

        until_dead = self.time_to_dead - (time.time() - start_time)
        # ensure poll at least once
        until_dead = max(until_dead, 1e-3)
        events = []
        while True:
            try:
                events = self.poller.poll(1000 * until_dead)
            except ZMQError as e:
                if e.errno == errno.EINTR:
                    # ignore interrupts during heartbeat
                    # this may never actually happen
                    until_dead = self.time_to_dead - (time.time() - start_time)
                    until_dead = max(until_dead, 1e-3)
                    pass
                else:
                    raise
            except Exception:
                if self._exiting:
                    break
                else:
                    raise
            else:
                break
        return events

    def run(self):
        """The thread's main activity.  Call start() instead."""
        self._create_socket()
        self._running = True
        self._beating = True

        while self._running:
            if self._pause:
                # just sleep, and skip the rest of the loop
                time.sleep(self.time_to_dead)
                continue

            since_last_heartbeat = 0.0
            # io.rprint('Ping from HB channel') # dbg
            # no need to catch EFSM here, because the previous event was
            # either a recv or connect, which cannot be followed by EFSM
            self.socket.send(b'ping')
            request_time = time.time()
            ready = self._poll(request_time)
            if ready:
                self._beating = True
                # the poll above guarantees we have something to recv
                self.socket.recv()
                # sleep the remainder of the cycle
                remainder = self.time_to_dead - (time.time() - request_time)
                if remainder > 0:
                    time.sleep(remainder)
                continue
            else:
                # nothing was received within the time limit, signal heart failure
                self._beating = False
                since_last_heartbeat = time.time() - request_time
                self.call_handlers(since_last_heartbeat)
                # and close/reopen the socket, because the REQ/REP cycle has been broken
                self._create_socket()
                continue

    def pause(self):
        """Pause the heartbeat."""
        self._pause = True

    def unpause(self):
        """Unpause the heartbeat."""
        self._pause = False

    def is_beating(self):
        """Is the heartbeat running and responsive (and not paused)."""
        if self.is_alive() and not self._pause and self._beating:
            return True
        else:
            return False

    def stop(self):
        """Stop the channel's event loop and join its thread."""
        self._running = False
        self.join()
        self.close()

    def close(self):
        if self.socket is not None:
            try:
                self.socket.close(linger=0)
            except Exception:
                pass
            self.socket = None

    def call_handlers(self, since_last_heartbeat):
        """This method is called in the ioloop thread when a message arrives.

        Subclasses should override this method to handle incoming messages
Download .txt
gitextract_9beunihp/

├── .build
├── .codecov.yml
├── .flake8
├── .github/
│   └── workflows/
│       └── ci.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .python-version
├── CONTRIBUTORS.md
├── Default.sublime-commands
├── Default.sublime-keymap
├── Helium.sublime-settings
├── Helium.sublime-syntax
├── LICENSE.TXT
├── Main.sublime-menu
├── README.md
├── dependencies.json
├── helium.py
├── lib/
│   ├── __init__.py
│   ├── client/
│   │   ├── __init__.py
│   │   ├── decorator.py
│   │   ├── decorator_version
│   │   ├── ipython_genutils/
│   │   │   ├── __init__.py
│   │   │   ├── _version.py
│   │   │   ├── encoding.py
│   │   │   ├── importstring.py
│   │   │   ├── ipstruct.py
│   │   │   ├── path.py
│   │   │   ├── py3compat.py
│   │   │   ├── tempdir.py
│   │   │   └── text.py
│   │   ├── jupyter_client/
│   │   │   ├── __init__.py
│   │   │   ├── _version.py
│   │   │   ├── adapter.py
│   │   │   ├── blocking/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── channels.py
│   │   │   │   └── client.py
│   │   │   ├── channels.py
│   │   │   ├── channelsabc.py
│   │   │   ├── client.py
│   │   │   ├── clientabc.py
│   │   │   ├── connect.py
│   │   │   ├── consoleapp.py
│   │   │   ├── ioloop/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── manager.py
│   │   │   │   └── restarter.py
│   │   │   ├── jsonutil.py
│   │   │   ├── kernelapp.py
│   │   │   ├── kernelspec.py
│   │   │   ├── kernelspecapp.py
│   │   │   ├── launcher.py
│   │   │   ├── localinterfaces.py
│   │   │   ├── manager.py
│   │   │   ├── managerabc.py
│   │   │   ├── multikernelmanager.py
│   │   │   ├── restarter.py
│   │   │   ├── runapp.py
│   │   │   ├── session.py
│   │   │   ├── threaded.py
│   │   │   └── win_interrupt.py
│   │   ├── jupyter_core/
│   │   │   ├── __init__.py
│   │   │   ├── __main__.py
│   │   │   ├── application.py
│   │   │   ├── command.py
│   │   │   ├── migrate.py
│   │   │   ├── paths.py
│   │   │   ├── troubleshoot.py
│   │   │   ├── utils/
│   │   │   │   ├── __init__.py
│   │   │   │   └── shutil_which.py
│   │   │   └── version.py
│   │   ├── traitlets/
│   │   │   ├── __init__.py
│   │   │   ├── _version.py
│   │   │   ├── config/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── application.py
│   │   │   │   ├── configurable.py
│   │   │   │   ├── loader.py
│   │   │   │   └── manager.py
│   │   │   ├── log.py
│   │   │   ├── traitlets.py
│   │   │   └── utils/
│   │   │       ├── __init__.py
│   │   │       ├── bunch.py
│   │   │       ├── getargspec.py
│   │   │       ├── importstring.py
│   │   │       ├── sentinel.py
│   │   │       └── tests/
│   │   │           ├── __init__.py
│   │   │           ├── test_bunch.py
│   │   │           └── test_importstring.py
│   │   ├── update_decorator.sh
│   │   ├── update_ipython_genutils.sh
│   │   ├── update_jupyter_client.sh
│   │   ├── update_jupyter_core.sh
│   │   └── update_traitlets.sh
│   ├── kernel.py
│   └── utils.py
├── messages/
│   ├── 0.3.1.txt
│   ├── 0.3.2.txt
│   ├── 0.3.3.txt
│   ├── 0.3.4.txt
│   ├── 0.3.5.txt
│   ├── 0.3.6.txt
│   ├── 0.4.0.txt
│   ├── 0.4.1.txt
│   ├── 0.4.2.txt
│   ├── 0.4.3.txt
│   ├── 0.5.0.txt
│   ├── 0.5.1.txt
│   ├── 0.6.0.txt
│   ├── 0.6.1.txt
│   ├── 0.6.2.txt
│   └── 0.6.3.txt
├── messages.json
├── pyproject.toml
└── tests/
    ├── _helpers.py
    ├── test_cell_handling.py
    └── test_tests_running.py
Download .txt
SYMBOL INDEX (1072 symbols across 58 files)

FILE: helium.py
  function _refresh_jupyter_path (line 63) | def _refresh_jupyter_path():
  class ViewManager (line 76) | class ViewManager(object):
    method __new__ (line 81) | def __new__(cls, *args, **kwargs):
    method __init__ (line 86) | def __init__(self, *args, **kwargs):
    method connect_kernel (line 90) | def connect_kernel(cls, buffer_id, lang, kernel_id):
    method remove_view (line 101) | def remove_view(cls, buffer_id):
    method get_kernel_for_view (line 107) | def get_kernel_for_view(cls, buffer_id) -> KernelConnection:
  class HeliumKernelManager (line 112) | class HeliumKernelManager(object):
    method __new__ (line 120) | def __new__(cls, *args, **kwargs):
    method list_kernelspecs (line 129) | def list_kernelspecs(cls):
    method list_kernels (line 135) | def list_kernels(cls):
    method list_kernel_reprs (line 144) | def list_kernel_reprs(cls):
    method get_kernel (line 159) | def get_kernel(cls, kernel_id, connection_name=None):
    method start_kernel (line 164) | def start_kernel(
    method shutdown_kernel (line 195) | def shutdown_kernel(cls, kernel_id):
    method restart_kernel (line 200) | def restart_kernel(cls, kernel_id):
    method interrupt_kernel (line 205) | def interrupt_kernel(cls, kernel_id):
  function _enter_connection_info (line 211) | def _enter_connection_info(window, continue_cb):
  function _start_kernel (line 233) | def _start_kernel(window, view, continue_cb=lambda: None, *, logger=HELI...
  class HeliumStartKernel (line 331) | class HeliumStartKernel(TextCommand):
    method run (line 334) | def run(self, edit, *, logger=HELIUM_LOGGER):
  class ListKernelsSubcommands (line 341) | class ListKernelsSubcommands(object):
  function _list_kernels (line 352) | def _list_kernels(window, view, *, logger=HELIUM_LOGGER):
  class HeliumListKernels (line 434) | class HeliumListKernels(TextCommand):
    method run (line 437) | def run(self, edit, *, logger=HELIUM_LOGGER):
  function _connect_kernel (line 442) | def _connect_kernel(window, view, *, continue_cb=lambda: None, logger=HE...
  class HeliumConnectKernel (line 480) | class HeliumConnectKernel(TextCommand):
    method run (line 483) | def run(self, edit, *, logger=HELIUM_LOGGER):
  function _show_kernel_selection_menu (line 490) | def _show_kernel_selection_menu(window, view, cb, *, add_new=False):
  function _interrupt_kernel (line 522) | def _interrupt_kernel(window, view, *, continue_cb=lambda: None, logger=...
  class HeliumInterruptKernel (line 533) | class HeliumInterruptKernel(TextCommand):
    method is_enabled (line 536) | def is_enabled(self, *, logger=HELIUM_LOGGER):
    method is_visible (line 543) | def is_visible(self, *, logger=HELIUM_LOGGER):
    method run (line 546) | def run(self, edit, *, logger=HELIUM_LOGGER):
  function _restart_kernel (line 552) | def _restart_kernel(window, view, *, continue_cb=lambda: None, logger=HE...
  class HeliumRestartKernel (line 563) | class HeliumRestartKernel(TextCommand):
    method is_enabled (line 566) | def is_enabled(self, *, logger=HELIUM_LOGGER):
    method is_visible (line 573) | def is_visible(self, *, logger=HELIUM_LOGGER):
    method run (line 576) | def run(self, edit, *, logger=HELIUM_LOGGER):
  function _shutdown_kernel (line 583) | def _shutdown_kernel(window, view, *, continue_cb=lambda: None, logger=H...
  class HeliumShutdownKernel (line 596) | class HeliumShutdownKernel(TextCommand):
    method is_enabled (line 599) | def is_enabled(self, *, logger=HELIUM_LOGGER):
    method is_visible (line 606) | def is_visible(self, *, logger=HELIUM_LOGGER):
    method run (line 609) | def run(self, edit, *, logger=HELIUM_LOGGER):
  class HeliumRunCellManager (line 614) | class HeliumRunCellManager(ViewEventListener):
    method __init__ (line 617) | def __init__(self, view):
    method on_modified (line 622) | def on_modified(self, *, logger=HELIUM_LOGGER):
    method handle_timeout (line 638) | def handle_timeout(self):
  function update_run_cell_phantoms (line 645) | def update_run_cell_phantoms(view, *, logger=HELIUM_LOGGER):
  function get_line (line 672) | def get_line(view: sublime.View, row: int) -> str:
  function get_indent (line 679) | def get_indent(view: sublime.View, row: int) -> str:
  function get_block (line 684) | def get_block(view: sublime.View, s: sublime.Region) -> (str, sublime.Re...
  function _execute_block (line 723) | def _execute_block(view, *, logger=HELIUM_LOGGER):
  function _execute_cell (line 745) | def _execute_cell(view, region: sublime.Region, *, logger=HELIUM_LOGGER):
  class HeliumExecuteBlock (line 761) | class HeliumExecuteBlock(TextCommand):
    method is_enabled (line 764) | def is_enabled(self, *, logger=HELIUM_LOGGER):
    method is_visible (line 771) | def is_visible(self, *, logger=HELIUM_LOGGER):
    method run (line 774) | def run(self, edit, *, logger=HELIUM_LOGGER):
  class HeliumExecuteCell (line 779) | class HeliumExecuteCell(TextCommand):
    method is_enabled (line 782) | def is_enabled(self, *, logger=HELIUM_LOGGER):
    method is_visible (line 789) | def is_visible(self, *, logger=HELIUM_LOGGER):
    method run (line 792) | def run(self, edit, move_cursor=False, *, logger=HELIUM_LOGGER):
  class HeliumClearAllCells (line 807) | class HeliumClearAllCells(TextCommand):
    method is_enabled (line 810) | def is_enabled(self, *, logger=HELIUM_LOGGER):
    method is_visible (line 822) | def is_visible(self, *, logger=HELIUM_LOGGER):
    method run (line 825) | def run(self, edit, *, logger=HELIUM_LOGGER):
    method _get_parent_view (line 844) | def _get_parent_view(self) -> sublime.View:
  class StatusBar (line 857) | class StatusBar(object):
    method __init__ (line 863) | def __init__(self, view, width=10, interval=500):
    method start (line 876) | def start(self):
    method stop (line 879) | def stop(self):
    method update (line 882) | def update(self, pos=0):
  class HeliumStatusUpdater (line 913) | class HeliumStatusUpdater(ViewEventListener):
    method on_activated_async (line 916) | def on_activated_async(self):
  class HeliumGetObjectInspection (line 920) | class HeliumGetObjectInspection(TextCommand):
    method is_enabled (line 923) | def is_enabled(self, *, logger=HELIUM_LOGGER):
    method is_visible (line 930) | def is_visible(self, *, logger=HELIUM_LOGGER):
    method run (line 934) | def run(self, edit, *, logger=HELIUM_LOGGER):
  class HeliumCompleter (line 960) | class HeliumCompleter(EventListener):
    method on_query_completions (line 963) | def on_query_completions(self, view, prefix, locations, *, logger=HELI...

FILE: lib/client/decorator.py
  function get_init (line 48) | def get_init(cls):
  function getfullargspec (line 55) | def getfullargspec(f):
  function get_init (line 59) | def get_init(cls):
  function iscoroutinefunction (line 66) | def iscoroutinefunction(f):
  function isgeneratorfunction (line 72) | def isgeneratorfunction(caller):
  class FunctionMaker (line 80) | class FunctionMaker(object):
    method __init__ (line 93) | def __init__(self, func=None, name=None, signature=None,
    method update (line 145) | def update(self, func, **kw):
    method make (line 162) | def make(self, src_templ, evaldict=None, addsource=False, **attrs):
    method create (line 197) | def create(cls, obj, body, evaldict, defaults=None,
  function decorate (line 224) | def decorate(func, caller, extras=()):
  function decorator (line 258) | def decorator(caller, _func=None):
  class ContextManager (line 303) | class ContextManager(_GeneratorContextManager):
    method __call__ (line 304) | def __call__(self, func):
  function __init__ (line 314) | def __init__(self, g, *a, **k):
  function __init__ (line 320) | def __init__(self, g, *a, **k):
  function contextmanager (line 327) | def contextmanager(func):
  function append (line 334) | def append(a, vancestors):
  function dispatch_on (line 352) | def dispatch_on(*dispatch_args):

FILE: lib/client/ipython_genutils/encoding.py
  function get_stream_enc (line 21) | def get_stream_enc(stream, default=None):
  function getdefaultencoding (line 38) | def getdefaultencoding(prefer_stream=True):

FILE: lib/client/ipython_genutils/importstring.py
  function import_item (line 10) | def import_item(name):

FILE: lib/client/ipython_genutils/ipstruct.py
  class Struct (line 13) | class Struct(dict):
    method __init__ (line 26) | def __init__(self, *args, **kw):
    method __setitem__ (line 51) | def __setitem__(self, key, value):
    method __setattr__ (line 75) | def __setattr__(self, key, value):
    method __getattr__ (line 110) | def __getattr__(self, key):
    method __iadd__ (line 138) | def __iadd__(self, other):
    method __add__ (line 153) | def __add__(self,other):
    method __sub__ (line 169) | def __sub__(self,other):
    method __isub__ (line 185) | def __isub__(self,other):
    method __dict_invert (line 202) | def __dict_invert(self, data):
    method dict (line 216) | def dict(self):
    method copy (line 219) | def copy(self):
    method hasattr (line 232) | def hasattr(self, key):
    method allow_new_attr (line 250) | def allow_new_attr(self, allow = True):
    method merge (line 258) | def merge(self, __loc_data__=None, __conflict_solve=None, **kw):

FILE: lib/client/ipython_genutils/path.py
  function filefind (line 21) | def filefind(filename, path_dirs=None):
  function expand_path (line 75) | def expand_path(s):
  function link (line 103) | def link(src, dst):
  function link_or_copy (line 120) | def link_or_copy(src, dst):
  function ensure_dir_exists (line 157) | def ensure_dir_exists(path, mode=0o755):

FILE: lib/client/ipython_genutils/py3compat.py
  function no_code (line 12) | def no_code(x, encoding=None):
  function decode (line 15) | def decode(s, encoding=None):
  function encode (line 19) | def encode(u, encoding=None):
  function cast_unicode (line 24) | def cast_unicode(s, encoding=None):
  function cast_bytes (line 29) | def cast_bytes(s, encoding=None):
  function buffer_to_bytes (line 34) | def buffer_to_bytes(buf):
  function _modify_str_or_docstring (line 42) | def _modify_str_or_docstring(str_change_func):
  function safe_unicode (line 60) | def safe_unicode(e):
  function _shutil_which (line 82) | def _shutil_which(cmd, mode=os.F_OK | os.X_OK, path=None):
  function input (line 174) | def input(prompt=''):
  function isidentifier (line 182) | def isidentifier(s, dotted=False):
  function iteritems (line 188) | def iteritems(d): return iter(d.items())
  function itervalues (line 189) | def itervalues(d): return iter(d.values())
  function execfile (line 194) | def execfile(fname, glob, loc=None, compiler=None):
  function _print_statement_sub (line 202) | def _print_statement_sub(match):
  function doctest_refactor_print (line 207) | def doctest_refactor_print(doc):
  function u_format (line 216) | def u_format(s):
  function get_closure (line 222) | def get_closure(f):
  function input (line 231) | def input(prompt=''):
  function isidentifier (line 239) | def isidentifier(s, dotted=False):
  function iteritems (line 245) | def iteritems(d): return d.iteritems()
  function itervalues (line 246) | def itervalues(d): return d.itervalues()
  function MethodType (line 249) | def MethodType(func, instance):
  function doctest_refactor_print (line 252) | def doctest_refactor_print(func_or_str):
  function get_closure (line 255) | def get_closure(f):
  function u_format (line 263) | def u_format(s):
  function execfile (line 270) | def execfile(fname, glob=None, loc=None, compiler=None):
  function execfile (line 283) | def execfile(fname, glob=None, loc=None, compiler=None):
  function annotate (line 296) | def annotate(**kwargs):
  function with_metaclass (line 331) | def with_metaclass(meta, *bases):

FILE: lib/client/ipython_genutils/tempdir.py
  class TemporaryDirectory (line 23) | class TemporaryDirectory(object):
    method __init__ (line 35) | def __init__(self, suffix="", prefix=template, dir=None):
    method __enter__ (line 39) | def __enter__(self):
    method cleanup (line 42) | def cleanup(self, _warn=False):
    method __exit__ (line 60) | def __exit__(self, exc, value, tb):
    method __del__ (line 63) | def __del__(self):
    method _rmtree (line 80) | def _rmtree(self, path):
  class NamedFileInTemporaryDirectory (line 103) | class NamedFileInTemporaryDirectory(object):
    method __init__ (line 105) | def __init__(self, filename, mode='w+b', bufsize=-1, **kwds):
    method cleanup (line 120) | def cleanup(self):
    method __enter__ (line 126) | def __enter__(self):
    method __exit__ (line 129) | def __exit__(self, type, value, traceback):
  class TemporaryWorkingDirectory (line 133) | class TemporaryWorkingDirectory(TemporaryDirectory):
    method __enter__ (line 142) | def __enter__(self):
    method __exit__ (line 147) | def __exit__(self, exc, value, tb):

FILE: lib/client/ipython_genutils/text.py
  function indent (line 24) | def indent(instr,nspaces=4, ntabs=0, flatten=False):
  function dedent (line 63) | def dedent(text):
  function wrap_paragraphs (line 90) | def wrap_paragraphs(text, ncols=80):
  function strip_ansi (line 116) | def strip_ansi(source):
  function _chunks (line 132) | def _chunks(l, n):
  function _find_optimal (line 138) | def _find_optimal(rlist , separator_size=2 , displaywidth=80):
  function _get_or_default (line 153) | def _get_or_default(mylist, i, default=None):
  function compute_item_matrix (line 161) | def compute_item_matrix(items, empty=None, *args, **kwargs) :
  function columnize (line 220) | def columnize(items, separator='  ', displaywidth=80):

FILE: lib/client/jupyter_client/adapter.py
  function code_to_line (line 11) | def code_to_line(code, cursor_pos):
  function extract_oname_v4 (line 32) | def extract_oname_v4(code, cursor_pos):
  class Adapter (line 55) | class Adapter(object):
    method update_header (line 63) | def update_header(self, msg):
    method update_metadata (line 66) | def update_metadata(self, msg):
    method update_msg_type (line 69) | def update_msg_type(self, msg):
    method handle_reply_status_error (line 76) | def handle_reply_status_error(self, msg):
    method __call__ (line 83) | def __call__(self, msg):
  function _version_str_to_list (line 98) | def _version_str_to_list(version):
  class V5toV4 (line 111) | class V5toV4(Adapter):
    method update_header (line 124) | def update_header(self, msg):
    method kernel_info_reply (line 131) | def kernel_info_reply(self, msg):
    method execute_request (line 148) | def execute_request(self, msg):
    method execute_reply (line 153) | def execute_reply(self, msg):
    method complete_request (line 159) | def complete_request(self, msg):
    method complete_reply (line 172) | def complete_reply(self, msg):
    method object_info_request (line 181) | def object_info_request(self, msg):
    method object_info_reply (line 192) | def object_info_reply(self, msg):
    method stream (line 199) | def stream(self, msg):
    method display_data (line 204) | def display_data(self, msg):
    method input_request (line 218) | def input_request(self, msg):
  class V4toV5 (line 223) | class V4toV5(Adapter):
    method update_header (line 230) | def update_header(self, msg):
    method kernel_info_reply (line 238) | def kernel_info_reply(self, msg):
    method execute_request (line 260) | def execute_request(self, msg):
    method execute_reply (line 268) | def execute_reply(self, msg):
    method complete_request (line 284) | def complete_request(self, msg):
    method complete_reply (line 292) | def complete_reply(self, msg):
    method inspect_request (line 309) | def inspect_request(self, msg):
    method inspect_reply (line 319) | def inspect_reply(self, msg):
    method stream (line 343) | def stream(self, msg):
    method display_data (line 348) | def display_data(self, msg):
    method input_request (line 362) | def input_request(self, msg):
  function adapt (line 368) | def adapt(msg, to_version=protocol_version_info[0]):

FILE: lib/client/jupyter_client/blocking/channels.py
  class ZMQSocketChannel (line 15) | class ZMQSocketChannel(object):
    method __init__ (line 23) | def __init__(self, socket, session, loop=None):
    method _recv (line 40) | def _recv(self, **kwargs):
    method get_msg (line 45) | def get_msg(self, block=True, timeout=None):
    method get_msgs (line 59) | def get_msgs(self):
    method msg_ready (line 69) | def msg_ready(self):
    method close (line 73) | def close(self):
    method is_alive (line 82) | def is_alive(self):
    method send (line 85) | def send(self, msg):
    method start (line 90) | def start(self):

FILE: lib/client/jupyter_client/blocking/client.py
  function reqrep (line 39) | def reqrep(meth):
  class BlockingKernelClient (line 77) | class BlockingKernelClient(KernelClient):
    method wait_for_ready (line 84) | def wait_for_ready(self, timeout=None):
    method _recv_reply (line 140) | def _recv_reply(self, msg_id, timeout=None):
    method _stdin_hook_default (line 166) | def _stdin_hook_default(self, msg):
    method _output_hook_default (line 190) | def _output_hook_default(self, msg):
    method _output_hook_kernel (line 202) | def _output_hook_kernel(self, session, socket, parent_header, msg):
    method execute_interactive (line 213) | def execute_interactive(self, code, silent=False, store_history=True,

FILE: lib/client/jupyter_client/channels.py
  class InvalidPortNumber (line 28) | class InvalidPortNumber(Exception):
  class HBChannel (line 31) | class HBChannel(Thread):
    method __init__ (line 50) | def __init__(self, context=None, session=None, address=None):
    method _notice_exit (line 82) | def _notice_exit():
    method _create_socket (line 88) | def _create_socket(self):
    method _poll (line 99) | def _poll(self, start_time):
    method run (line 132) | def run(self):
    method pause (line 169) | def pause(self):
    method unpause (line 173) | def unpause(self):
    method is_beating (line 177) | def is_beating(self):
    method stop (line 184) | def stop(self):
    method close (line 190) | def close(self):
    method call_handlers (line 198) | def call_handlers(self, since_last_heartbeat):

FILE: lib/client/jupyter_client/channelsabc.py
  class ChannelABC (line 11) | class ChannelABC(with_metaclass(abc.ABCMeta, object)):
    method start (line 15) | def start(self):
    method stop (line 19) | def stop(self):
    method is_alive (line 23) | def is_alive(self):
  class HBChannelABC (line 27) | class HBChannelABC(ChannelABC):
    method time_to_dead (line 36) | def time_to_dead(self):
    method pause (line 40) | def pause(self):
    method unpause (line 44) | def unpause(self):
    method is_beating (line 48) | def is_beating(self):

FILE: lib/client/jupyter_client/client.py
  function validate_string_dict (line 24) | def validate_string_dict(dct):
  class KernelClient (line 35) | class KernelClient(ConnectionFileMixin):
    method _context_default (line 53) | def _context_default(self):
    method get_shell_msg (line 75) | def get_shell_msg(self, *args, **kwargs):
    method get_iopub_msg (line 79) | def get_iopub_msg(self, *args, **kwargs):
    method get_stdin_msg (line 83) | def get_stdin_msg(self, *args, **kwargs):
    method start_channels (line 91) | def start_channels(self, shell=True, iopub=True, stdin=True, hb=True):
    method stop_channels (line 113) | def stop_channels(self):
    method channels_running (line 128) | def channels_running(self):
    method shell_channel (line 136) | def shell_channel(self):
    method iopub_channel (line 148) | def iopub_channel(self):
    method stdin_channel (line 160) | def stdin_channel(self):
    method hb_channel (line 172) | def hb_channel(self):
    method is_alive (line 182) | def is_alive(self):
    method execute (line 200) | def execute(self, code, silent=False, store_history=True,
    method complete (line 257) | def complete(self, code, cursor_pos=None):
    method inspect (line 280) | def inspect(self, code, cursor_pos=None, detail_level=0):
    method history (line 309) | def history(self, raw=True, output=False, hist_access_type='range', **...
    method kernel_info (line 350) | def kernel_info(self):
    method comm_info (line 361) | def comm_info(self, target_name=None):
    method _handle_kernel_info_reply (line 376) | def _handle_kernel_info_reply(self, msg):
    method shutdown (line 386) | def shutdown(self, restart=False):
    method is_complete (line 407) | def is_complete(self, code):
    method input (line 413) | def input(self, string):

FILE: lib/client/jupyter_client/clientabc.py
  class KernelClientABC (line 22) | class KernelClientABC(with_metaclass(abc.ABCMeta, object)):
    method kernel (line 31) | def kernel(self):
    method shell_channel_class (line 35) | def shell_channel_class(self):
    method iopub_channel_class (line 39) | def iopub_channel_class(self):
    method hb_channel_class (line 43) | def hb_channel_class(self):
    method stdin_channel_class (line 47) | def stdin_channel_class(self):
    method start_channels (line 55) | def start_channels(self, shell=True, iopub=True, stdin=True, hb=True):
    method stop_channels (line 59) | def stop_channels(self):
    method channels_running (line 63) | def channels_running(self):
    method shell_channel (line 67) | def shell_channel(self):
    method iopub_channel (line 71) | def iopub_channel(self):
    method stdin_channel (line 75) | def stdin_channel(self):
    method hb_channel (line 79) | def hb_channel(self):

FILE: lib/client/jupyter_client/connect.py
  function write_connection_file (line 37) | def write_connection_file(fname=None, shell_port=0, iopub_port=0, stdin_...
  function find_connection_file (line 169) | def find_connection_file(filename='kernel-*.json', path=None, profile=No...
  function tunnel_to_kernel (line 226) | def tunnel_to_kernel(connection_info, sshserver, sshkey=None):
  class ConnectionFileMixin (line 290) | class ConnectionFileMixin(LoggingConfigurable):
    method _data_dir_default (line 294) | def _data_dir_default(self):
    method _ip_default (line 317) | def _ip_default(self):
    method _ip_changed (line 326) | def _ip_changed(self, name, old, new):
    method ports (line 347) | def ports(self):
    method _session_default (line 352) | def _session_default(self):
    method get_connection_info (line 360) | def get_connection_info(self, session=False):
    method blocking_client (line 398) | def blocking_client(self):
    method cleanup_connection_file (line 406) | def cleanup_connection_file(self):
    method cleanup_ipc_files (line 419) | def cleanup_ipc_files(self):
    method _record_random_port_names (line 430) | def _record_random_port_names(self):
    method cleanup_random_ports (line 446) | def cleanup_random_ports(self):
    method write_connection_file (line 461) | def write_connection_file(self):
    method load_connection_file (line 481) | def load_connection_file(self, connection_file=None):
    method load_connection_info (line 497) | def load_connection_info(self, info):
    method _make_url (line 527) | def _make_url(self, channel):
    method _create_connected_socket (line 538) | def _create_connected_socket(self, channel, identity=None):
    method connect_iopub (line 551) | def connect_iopub(self, identity=None):
    method connect_shell (line 557) | def connect_shell(self, identity=None):
    method connect_stdin (line 561) | def connect_stdin(self, identity=None):
    method connect_hb (line 565) | def connect_hb(self, identity=None):
    method connect_control (line 569) | def connect_control(self, identity=None):

FILE: lib/client/jupyter_client/consoleapp.py
  class JupyterConsoleApp (line 90) | class JupyterConsoleApp(ConnectionFileMixin):
    method _connection_file_default (line 125) | def _connection_file_default(self):
    method build_kernel_argv (line 140) | def build_kernel_argv(self, argv=None):
    method init_connection_file (line 147) | def init_connection_file(self):
    method init_ssh (line 198) | def init_ssh(self):
    method _new_connection_file (line 244) | def _new_connection_file(self):
    method init_kernel_manager (line 257) | def init_kernel_manager(self):
    method init_kernel_client (line 305) | def init_kernel_client(self):
    method initialize (line 325) | def initialize(self, argv=None):
  class IPythonConsoleApp (line 337) | class IPythonConsoleApp(JupyterConsoleApp):
    method __init__ (line 338) | def __init__(self, *args, **kwargs):

FILE: lib/client/jupyter_client/ioloop/manager.py
  function as_zmqstream (line 20) | def as_zmqstream(f):
  class IOLoopKernelManager (line 26) | class IOLoopKernelManager(KernelManager):
    method _loop_default (line 29) | def _loop_default(self):
    method start_restarter (line 44) | def start_restarter(self):
    method stop_restarter (line 53) | def stop_restarter(self):

FILE: lib/client/jupyter_client/ioloop/restarter.py
  class IOLoopKernelRestarter (line 20) | class IOLoopKernelRestarter(KernelRestarter):
    method _loop_default (line 24) | def _loop_default(self):
    method start (line 32) | def start(self):
    method stop (line 40) | def stop(self):

FILE: lib/client/jupyter_client/jsonutil.py
  function _ensure_tzinfo (line 34) | def _ensure_tzinfo(dt):
  function parse_date (line 47) | def parse_date(s):
  function extract_dates (line 62) | def extract_dates(obj):
  function squash_dates (line 75) | def squash_dates(obj):
  function date_default (line 87) | def date_default(obj):

FILE: lib/client/jupyter_client/kernelapp.py
  class KernelApp (line 13) | class KernelApp(JupyterApp):
    method initialize (line 31) | def initialize(self, argv=None):
    method setup_signals (line 40) | def setup_signals(self):
    method shutdown (line 50) | def shutdown(self, signo):
    method log_connection_info (line 55) | def log_connection_info(self):
    method _record_started (line 60) | def _record_started(self):
    method start (line 70) | def start(self):

FILE: lib/client/jupyter_client/kernelspec.py
  class KernelSpec (line 28) | class KernelSpec(HasTraits):
    method from_resource_dir (line 40) | def from_resource_dir(cls, resource_dir):
    method to_dict (line 50) | def to_dict(self):
    method to_json (line 61) | def to_json(self):
  function _is_valid_kernel_name (line 71) | def _is_valid_kernel_name(name):
  function _is_kernel_dir (line 81) | def _is_kernel_dir(path):
  function _list_kernels_in (line 86) | def _list_kernels_in(dir):
  class NoSuchKernel (line 107) | class NoSuchKernel(KeyError):
    method __init__ (line 108) | def __init__(self, name):
    method __str__ (line 111) | def __str__(self):
  class KernelSpecManager (line 115) | class KernelSpecManager(LoggingConfigurable):
    method _data_dir_default (line 130) | def _data_dir_default(self):
    method _user_kernel_dir_default (line 134) | def _user_kernel_dir_default(self):
    method _kernel_dirs_default (line 146) | def _kernel_dirs_default(self):
    method find_kernel_specs (line 162) | def find_kernel_specs(self):
    method _get_kernel_spec_by_name (line 187) | def _get_kernel_spec_by_name(self, kernel_name, resource_dir):
    method _find_spec_directory (line 203) | def _find_spec_directory(self, kernel_name):
    method get_kernel_spec (line 225) | def get_kernel_spec(self, kernel_name):
    method get_all_specs (line 240) | def get_all_specs(self):
    method remove_kernel_spec (line 273) | def remove_kernel_spec(self, name):
    method _get_destination_dir (line 292) | def _get_destination_dir(self, kernel_name, user=False, prefix=None):
    method install_kernel_spec (line 301) | def install_kernel_spec(self, source_dir, kernel_name=None, user=False,
    method install_native_kernel_spec (line 350) | def install_native_kernel_spec(self, user=False):
  function find_kernel_specs (line 358) | def find_kernel_specs():
  function get_kernel_spec (line 362) | def get_kernel_spec(kernel_name):
  function install_kernel_spec (line 369) | def install_kernel_spec(source_dir, kernel_name=None, user=False, replac...
  function install_native_kernel_spec (line 376) | def install_native_kernel_spec(user=False):

FILE: lib/client/jupyter_client/kernelspecapp.py
  class ListKernelSpecs (line 27) | class ListKernelSpecs(JupyterApp):
    method _kernel_spec_manager_default (line 39) | def _kernel_spec_manager_default(self):
    method start (line 42) | def start(self):
  class InstallKernelSpec (line 71) | class InstallKernelSpec(JupyterApp):
    method _kernel_spec_manager_default (line 86) | def _kernel_spec_manager_default(self):
    method _kernel_name_default (line 93) | def _kernel_name_default(self):
    method parse_command_line (line 126) | def parse_command_line(self, argv):
    method start (line 135) | def start(self):
  class RemoveKernelSpec (line 156) | class RemoveKernelSpec(JupyterApp):
    method _kernel_spec_manager_default (line 167) | def _kernel_spec_manager_default(self):
    method parse_command_line (line 175) | def parse_command_line(self, argv):
    method start (line 183) | def start(self):
  class InstallNativeKernelSpec (line 211) | class InstallNativeKernelSpec(JupyterApp):
    method _kernel_spec_manager_default (line 216) | def _kernel_spec_manager_default(self):
    method start (line 231) | def start(self):
  class KernelSpecApp (line 249) | class KernelSpecApp(Application):
    method start (line 265) | def start(self):

FILE: lib/client/jupyter_client/launcher.py
  function launch_kernel (line 15) | def launch_kernel(cmd, stdin=None, stdout=None, stderr=None, env=None,

FILE: lib/client/jupyter_client/localinterfaces.py
  function _uniq_stable (line 21) | def _uniq_stable(elems):
  function _get_output (line 32) | def _get_output(cmd):
  function _only_once (line 44) | def _only_once(f):
  function _requires_ips (line 55) | def _requires_ips(f):
  class NoIPAddresses (line 63) | class NoIPAddresses(Exception):
  function _populate_from_list (line 66) | def _populate_from_list(addrs):
  function _load_ips_ifconfig (line 93) | def _load_ips_ifconfig():
  function _load_ips_ip (line 111) | def _load_ips_ip():
  function _load_ips_ipconfig (line 125) | def _load_ips_ipconfig():
  function _load_ips_netifaces (line 138) | def _load_ips_netifaces():
  function _load_ips_gethostbyname (line 167) | def _load_ips_gethostbyname():
  function _load_ips_dumb (line 198) | def _load_ips_dumb():
  function _load_ips (line 206) | def _load_ips(suppress_exceptions=True):
  function local_ips (line 252) | def local_ips():
  function public_ips (line 257) | def public_ips():
  function localhost (line 262) | def localhost():
  function is_local_ip (line 267) | def is_local_ip(ip):
  function is_public_ip (line 272) | def is_public_ip(ip):

FILE: lib/client/jupyter_client/manager.py
  class KernelManager (line 33) | class KernelManager(ConnectionFileMixin):
    method _context_default (line 41) | def _context_default(self):
    method _client_factory_default (line 47) | def _client_factory_default(self):
    method _client_class_changed (line 50) | def _client_class_changed(self, name, old, new):
    method _kernel_spec_manager_default (line 59) | def _kernel_spec_manager_default(self):
    method _kernel_spec_manager_changed (line 62) | def _kernel_spec_manager_changed(self):
    method _kernel_name_changed (line 72) | def _kernel_name_changed(self, name, old, new):
    method kernel_spec (line 80) | def kernel_spec(self):
    method _kernel_cmd_changed (line 99) | def _kernel_cmd_changed(self, name, old, new):
    method ipykernel (line 104) | def ipykernel(self):
    method __del__ (line 117) | def __del__(self):
    method start_restarter (line 125) | def start_restarter(self):
    method stop_restarter (line 128) | def stop_restarter(self):
    method add_restart_callback (line 131) | def add_restart_callback(self, callback, event='restart'):
    method remove_restart_callback (line 137) | def remove_restart_callback(self, callback, event='restart'):
    method client (line 147) | def client(self, **kwargs):
    method format_kernel_cmd (line 164) | def format_kernel_cmd(self, extra_arguments=None):
    method _launch_kernel (line 199) | def _launch_kernel(self, kernel_cmd, **kw):
    method _connect_control_socket (line 208) | def _connect_control_socket(self):
    method _close_control_socket (line 213) | def _close_control_socket(self):
    method start_kernel (line 219) | def start_kernel(self, **kw):
    method request_shutdown (line 263) | def request_shutdown(self, restart=False):
    method finish_shutdown (line 272) | def finish_shutdown(self, waittime=None, pollinterval=0.1):
    method cleanup (line 291) | def cleanup(self, connection_file=True):
    method shutdown_kernel (line 299) | def shutdown_kernel(self, now=False, restart=False):
    method restart_kernel (line 331) | def restart_kernel(self, now=False, newports=False, **kw):
    method has_kernel (line 371) | def has_kernel(self):
    method _kill_kernel (line 375) | def _kill_kernel(self):
    method interrupt_kernel (line 408) | def interrupt_kernel(self):
    method signal_kernel (line 430) | def signal_kernel(self, signum):
    method is_alive (line 450) | def is_alive(self):
  function start_new_kernel (line 465) | def start_new_kernel(startup_timeout=60, kernel_name='python', **kwargs):
  function run_kernel (line 481) | def run_kernel(**kwargs):

FILE: lib/client/jupyter_client/managerabc.py
  class KernelManagerABC (line 11) | class KernelManagerABC(with_metaclass(abc.ABCMeta, object)):
    method kernel (line 20) | def kernel(self):
    method start_kernel (line 28) | def start_kernel(self, **kw):
    method shutdown_kernel (line 32) | def shutdown_kernel(self, now=False, restart=False):
    method restart_kernel (line 36) | def restart_kernel(self, now=False, **kw):
    method has_kernel (line 40) | def has_kernel(self):
    method interrupt_kernel (line 44) | def interrupt_kernel(self):
    method signal_kernel (line 48) | def signal_kernel(self, signum):
    method is_alive (line 52) | def is_alive(self):

FILE: lib/client/jupyter_client/multikernelmanager.py
  class DuplicateKernelError (line 22) | class DuplicateKernelError(Exception):
  function kernel_method (line 26) | def kernel_method(f):
  class MultiKernelManager (line 42) | class MultiKernelManager(LoggingConfigurable):
    method _kernel_manager_class_changed (line 57) | def _kernel_manager_class_changed(self, name, old, new):
    method _kernel_manager_factory_default (line 61) | def _kernel_manager_factory_default(self):
    method _context_default (line 65) | def _context_default(self):
    method list_kernel_ids (line 72) | def list_kernel_ids(self):
    method __len__ (line 78) | def __len__(self):
    method __contains__ (line 82) | def __contains__(self, kernel_id):
    method start_kernel (line 85) | def start_kernel(self, kernel_name=None, **kwargs):
    method shutdown_kernel (line 115) | def shutdown_kernel(self, kernel_id, now=False, restart=False):
    method request_shutdown (line 131) | def request_shutdown(self, kernel_id, restart=False):
    method finish_shutdown (line 135) | def finish_shutdown(self, kernel_id, waittime=None, pollinterval=0.1):
    method cleanup (line 141) | def cleanup(self, kernel_id, connection_file=True):
    method remove_kernel (line 144) | def remove_kernel(self, kernel_id):
    method shutdown_all (line 154) | def shutdown_all(self, now=False):
    method interrupt_kernel (line 165) | def interrupt_kernel(self, kernel_id):
    method signal_kernel (line 176) | def signal_kernel(self, kernel_id, signum):
    method restart_kernel (line 190) | def restart_kernel(self, kernel_id, now=False):
    method is_alive (line 201) | def is_alive(self, kernel_id):
    method _check_kernel_id (line 213) | def _check_kernel_id(self, kernel_id):
    method get_kernel (line 218) | def get_kernel(self, kernel_id):
    method add_restart_callback (line 230) | def add_restart_callback(self, kernel_id, callback, event='restart'):
    method remove_restart_callback (line 234) | def remove_restart_callback(self, kernel_id, callback, event='restart'):
    method get_connection_info (line 238) | def get_connection_info(self, kernel_id):
    method connect_iopub (line 256) | def connect_iopub(self, kernel_id, identity=None):
    method connect_shell (line 272) | def connect_shell(self, kernel_id, identity=None):
    method connect_stdin (line 288) | def connect_stdin(self, kernel_id, identity=None):
    method connect_hb (line 304) | def connect_hb(self, kernel_id, identity=None):

FILE: lib/client/jupyter_client/restarter.py
  class KernelRestarter (line 18) | class KernelRestarter(LoggingConfigurable):
    method _callbacks_default (line 46) | def _callbacks_default(self):
    method start (line 49) | def start(self):
    method stop (line 53) | def stop(self):
    method add_callback (line 57) | def add_callback(self, f, event='restart'):
    method remove_callback (line 68) | def remove_callback(self, f, event='restart'):
    method _fire_callbacks (line 82) | def _fire_callbacks(self, event):
    method poll (line 90) | def poll(self):

FILE: lib/client/jupyter_client/runapp.py
  class RunApp (line 49) | class RunApp(JupyterApp, JupyterConsoleApp):
    method parse_command_line (line 67) | def parse_command_line(self, argv=None):
    method initialize (line 73) | def initialize(self, argv=None):
    method handle_sigint (line 80) | def handle_sigint(self, *args):
    method init_kernel_info (line 87) | def init_kernel_info(self):
    method start (line 104) | def start(self):

FILE: lib/client/jupyter_client/session.py
  function compare_digest (line 44) | def compare_digest(a,b): return a == b
  function squash_unicode (line 77) | def squash_unicode(obj):
  function new_id (line 121) | def new_id():
  function new_id_bytes (line 136) | def new_id_bytes():
  function default_secure (line 156) | def default_secure(cfg):
  function utcnow (line 169) | def utcnow():
  class SessionFactory (line 177) | class SessionFactory(LoggingConfigurable):
    method _logname_changed (line 183) | def _logname_changed(self, name, old, new):
    method _context_default (line 188) | def _context_default(self):
    method _loop_default (line 195) | def _loop_default(self):
    method __init__ (line 198) | def __init__(self, **kwargs):
  class Message (line 206) | class Message(object):
    method __init__ (line 212) | def __init__(self, msg_dict):
    method __iter__ (line 220) | def __iter__(self):
    method __repr__ (line 223) | def __repr__(self):
    method __str__ (line 226) | def __str__(self):
    method __contains__ (line 229) | def __contains__(self, k):
    method __getitem__ (line 232) | def __getitem__(self, k):
  function msg_header (line 236) | def msg_header(msg_id, msg_type, username, session):
  function extract_header (line 242) | def extract_header(msg_or_header):
  class Session (line 261) | class Session(Configurable):
    method _packer_changed (line 314) | def _packer_changed(self, name, old, new):
    method _unpacker_changed (line 329) | def _unpacker_changed(self, name, old, new):
    method _session_default (line 343) | def _session_default(self):
    method _session_changed (line 348) | def _session_changed(self, name, old, new):
    method _key_default (line 368) | def _key_default(self):
    method _key_changed (line 371) | def _key_changed(self):
    method _signature_scheme_changed (line 377) | def _signature_scheme_changed(self, name, old, new):
    method _digest_mod_default (line 388) | def _digest_mod_default(self):
    method _new_auth (line 393) | def _new_auth(self):
    method _keyfile_changed (line 409) | def _keyfile_changed(self, name, old, new):
    method _pack_changed (line 419) | def _pack_changed(self, name, old, new):
    method _unpack_changed (line 424) | def _unpack_changed(self, name, old, new):
    method __init__ (line 441) | def __init__(self, **kwargs):
    method clone (line 491) | def clone(self):
    method msg_id (line 510) | def msg_id(self):
    method _check_packers (line 514) | def _check_packers(self):
    method msg_header (line 561) | def msg_header(self, msg_type):
    method msg (line 564) | def msg(self, msg_type, content=None, parent=None, header=None, metada...
    method sign (line 583) | def sign(self, msg_list):
    method serialize (line 598) | def serialize(self, msg, ident=None):
    method send (line 657) | def send(self, stream, msg_or_type, content=None, parent=None, ident=N...
    method send_raw (line 759) | def send_raw(self, stream, msg_list, flags=0, copy=True, ident=None):
    method recv (line 786) | def recv(self, socket, mode=zmq.NOBLOCK, content=True, copy=True):
    method feed_identities (line 820) | def feed_identities(self, msg_list, copy=True):
    method _add_digest (line 857) | def _add_digest(self, signature):
    method _cull_digest_history (line 868) | def _cull_digest_history(self):
    method deserialize (line 881) | def deserialize(self, msg_list, content=True, copy=True):
    method unserialize (line 946) | def unserialize(self, *args, **kwargs):
  function test_msg2obj (line 954) | def test_msg2obj():

FILE: lib/client/jupyter_client/threaded.py
  class ThreadedZMQSocketChannel (line 20) | class ThreadedZMQSocketChannel(object):
    method __init__ (line 28) | def __init__(self, socket, session, loop):
    method is_alive (line 56) | def is_alive(self):
    method start (line 59) | def start(self):
    method stop (line 62) | def stop(self):
    method close (line 65) | def close(self):
    method send (line 73) | def send(self, msg):
    method _handle_recv (line 87) | def _handle_recv(self, msg):
    method call_handlers (line 99) | def call_handlers(self, msg):
    method process_events (line 109) | def process_events(self):
    method flush (line 116) | def flush(self, timeout=1.0):
    method _flush (line 142) | def _flush(self):
  class IOLoopThread (line 148) | class IOLoopThread(Thread):
    method __init__ (line 154) | def __init__(self):
    method _notice_exit (line 160) | def _notice_exit():
    method start (line 166) | def start(self):
    method run (line 176) | def run(self):
    method stop (line 202) | def stop(self):
    method close (line 215) | def close(self):
  class ThreadedKernelClient (line 223) | class ThreadedKernelClient(KernelClient):
    method ioloop (line 228) | def ioloop(self):
    method start_channels (line 233) | def start_channels(self, shell=True, iopub=True, stdin=True, hb=True):
    method _check_kernel_info_reply (line 242) | def _check_kernel_info_reply(self, msg):
    method stop_channels (line 249) | def stop_channels(self):

FILE: lib/client/jupyter_client/win_interrupt.py
  function create_interrupt_event (line 9) | def create_interrupt_event():
  function send_interrupt (line 36) | def send_interrupt(interrupt_handle):

FILE: lib/client/jupyter_core/application.py
  class NoStart (line 58) | class NoStart(Exception):
  class JupyterApp (line 61) | class JupyterApp(Application):
    method _log_level_default (line 69) | def _log_level_default(self):
    method _jupyter_path_default (line 73) | def _jupyter_path_default(self):
    method _config_dir_default (line 78) | def _config_dir_default(self):
    method config_file_paths (line 82) | def config_file_paths(self):
    method _data_dir_default (line 91) | def _data_dir_default(self):
    method _runtime_dir_default (line 97) | def _runtime_dir_default(self):
    method _runtime_dir_changed (line 103) | def _runtime_dir_changed(self, change):
    method _config_file_name_default (line 113) | def _config_file_name_default(self):
    method write_default_config (line 126) | def write_default_config(self):
    method migrate_config (line 157) | def migrate_config(self):
    method load_config_file (line 171) | def load_config_file(self, suppress_errors=True):
    method _find_subcommand (line 215) | def _find_subcommand(self, name):
    method _dispatching (line 220) | def _dispatching(self):
    method initialize (line 230) | def initialize(self, argv=None):
    method start (line 250) | def start(self):
    method launch_instance (line 265) | def launch_instance(cls, argv=None, **kwargs):

FILE: lib/client/jupyter_core/command.py
  class JupyterParser (line 28) | class JupyterParser(argparse.ArgumentParser):
    method epilog (line 31) | def epilog(self):
    method epilog (line 39) | def epilog(self, x):
  function jupyter_parser (line 43) | def jupyter_parser():
  function list_subcommands (line 67) | def list_subcommands():
  function _execvp (line 97) | def _execvp(cmd, argv):
  function _jupyter_abspath (line 123) | def _jupyter_abspath(subcommand):
  function _path_with_self (line 145) | def _path_with_self():
  function main (line 186) | def main():

FILE: lib/client/jupyter_core/migrate.py
  function get_ipython_dir (line 67) | def get_ipython_dir():
  function migrate_dir (line 81) | def migrate_dir(src, dst):
  function migrate_file (line 100) | def migrate_file(src, dst, substitutions=None):
  function migrate_one (line 123) | def migrate_one(src, dst):
  function migrate_static_custom (line 138) | def migrate_static_custom(src, dst):
  function migrate_config (line 191) | def migrate_config(name, env):
  function migrate (line 218) | def migrate():
  class JupyterMigrate (line 254) | class JupyterMigrate(JupyterApp):
    method start (line 272) | def start(self):

FILE: lib/client/jupyter_core/paths.py
  function get_home_dir (line 29) | def get_home_dir():
  function _mkdtemp_once (line 39) | def _mkdtemp_once(name):
  function jupyter_config_dir (line 51) | def jupyter_config_dir():
  function jupyter_data_dir (line 69) | def jupyter_data_dir():
  function jupyter_runtime_dir (line 99) | def jupyter_runtime_dir():
  function jupyter_path (line 130) | def jupyter_path(*subdirs):
  function jupyter_config_path (line 182) | def jupyter_config_path():
  function exists (line 203) | def exists(path):
  function is_file_hidden_win (line 214) | def is_file_hidden_win(abs_path, stat_res=None):
  function is_file_hidden_posix (line 248) | def is_file_hidden_posix(abs_path, stat_res=None):
  function is_hidden (line 294) | def is_hidden(abs_path, abs_root=''):
  function win32_restrict_file_to_user (line 345) | def win32_restrict_file_to_user(fname):
  function get_file_mode (line 378) | def get_file_mode(fname):
  function secure_write (line 395) | def secure_write(fname, binary=False):

FILE: lib/client/jupyter_core/troubleshoot.py
  function subs (line 20) | def subs(cmd):
  function get_data (line 31) | def get_data():
  function main (line 53) | def main():

FILE: lib/client/jupyter_core/utils/__init__.py
  function ensure_dir_exists (line 4) | def ensure_dir_exists(path, mode=0o777):

FILE: lib/client/jupyter_core/utils/shutil_which.py
  function which (line 7) | def which(cmd, mode=os.F_OK | os.X_OK, path=None):

FILE: lib/client/traitlets/config/application.py
  function catch_config_error (line 78) | def catch_config_error(method, app, *args, **kwargs):
  class ApplicationError (line 96) | class ApplicationError(Exception):
  class LevelFormatter (line 100) | class LevelFormatter(logging.Formatter):
    method format (line 112) | def format(self, record):
  class Application (line 120) | class Application(SingletonConfigurable):
    method _classes_inc_parents (line 145) | def _classes_inc_parents(self):
    method _log_level_changed (line 175) | def _log_level_changed(self, change):
    method _log_format_changed (line 195) | def _log_format_changed(self, change):
    method _log_default (line 202) | def _log_default(self):
    method _flags_changed (line 241) | def _flags_changed(self, change):
    method __init__ (line 272) | def __init__(self, **kwargs):
    method _config_changed (line 286) | def _config_changed(self, change):
    method initialize (line 292) | def initialize(self, argv=None):
    method start (line 300) | def start(self):
    method print_alias_help (line 308) | def print_alias_help(self):
    method print_flag_help (line 334) | def print_flag_help(self):
    method print_options (line 347) | def print_options(self):
    method print_subcommands (line 361) | def print_subcommands(self):
    method print_help (line 380) | def print_help(self, classes=False):
    method document_config_options (line 408) | def document_config_options(self):
    method print_description (line 417) | def print_description(self):
    method print_examples (line 423) | def print_examples(self):
    method print_version (line 436) | def print_version(self):
    method initialize_subcommand (line 441) | def initialize_subcommand(self, subc, argv=None):
    method flatten_flags (line 455) | def flatten_flags(self):
    method parse_command_line (line 501) | def parse_command_line(self, argv=None):
    method _load_config_files (line 544) | def _load_config_files(cls, basefilename, path=None, log=None, raise_c...
    method loaded_config_files (line 592) | def loaded_config_files(self):
    method load_config_file (line 597) | def load_config_file(self, filename, path=None):
    method _classes_in_config_sample (line 612) | def _classes_in_config_sample(self):
    method generate_config_file (line 644) | def generate_config_file(self):
    method exit (line 652) | def exit(self, exit_status=0):
    method launch_instance (line 657) | def launch_instance(cls, argv=None, **kwargs):
  function boolean_flag (line 670) | def boolean_flag(name, configurable, set_help='', unset_help=''):
  function get_config (line 703) | def get_config():

FILE: lib/client/traitlets/config/configurable.py
  class ConfigurableError (line 22) | class ConfigurableError(Exception):
  class MultipleInstanceError (line 26) | class MultipleInstanceError(ConfigurableError):
  class Configurable (line 33) | class Configurable(HasTraits):
    method __init__ (line 38) | def __init__(self, **kwargs):
    method section_names (line 100) | def section_names(cls):
    method _find_my_config (line 106) | def _find_my_config(self, cfg):
    method _load_config (line 131) | def _load_config(self, cfg, section_names=None, traits=None):
    method _config_changed (line 172) | def _config_changed(self, change):
    method update_config (line 188) | def update_config(self, config):
    method class_get_help (line 205) | def class_get_help(cls, inst=None):
    method class_get_trait_help (line 221) | def class_get_trait_help(cls, trait, inst=None):
    method class_print_help (line 253) | def class_print_help(cls, inst=None):
    method class_config_section (line 258) | def class_config_section(cls):
    method class_config_rst_doc (line 289) | def class_config_rst_doc(cls):
  class LoggingConfigurable (line 332) | class LoggingConfigurable(Configurable):
    method _log_default (line 341) | def _log_default(self):
  class SingletonConfigurable (line 346) | class SingletonConfigurable(LoggingConfigurable):
    method _walk_mro (line 357) | def _walk_mro(cls):
    method clear_instance (line 370) | def clear_instance(cls):
    method instance (line 382) | def instance(cls, *args, **kwargs):
    method initialized (line 427) | def initialized(cls):

FILE: lib/client/traitlets/config/loader.py
  class ConfigError (line 27) | class ConfigError(Exception):
  class ConfigLoaderError (line 30) | class ConfigLoaderError(ConfigError):
  class ConfigFileNotFound (line 33) | class ConfigFileNotFound(ConfigError):
  class ArgumentError (line 36) | class ArgumentError(ConfigLoaderError):
  class ArgumentParser (line 49) | class ArgumentParser(argparse.ArgumentParser):
    method print_help (line 52) | def print_help(self, file=None):
  class LazyConfigValue (line 63) | class LazyConfigValue(HasTraits):
    method append (line 79) | def append(self, obj):
    method extend (line 82) | def extend(self, other):
    method prepend (line 85) | def prepend(self, other):
    method insert (line 90) | def insert(self, index, other):
    method update (line 98) | def update(self, other):
    method add (line 107) | def add(self, obj):
    method get_value (line 110) | def get_value(self, initial):
    method to_dict (line 133) | def to_dict(self):
  function _is_section_key (line 150) | def _is_section_key(key):
  class Config (line 158) | class Config(dict):
    method __init__ (line 161) | def __init__(self, *args, **kwds):
    method _ensure_subconfig (line 165) | def _ensure_subconfig(self):
    method _merge (line 178) | def _merge(self, other):
    method merge (line 182) | def merge(self, other):
    method collisions (line 198) | def collisions(self, other):
    method __contains__ (line 218) | def __contains__(self, key):
    method _has_section (line 231) | def _has_section(self, key):
    method copy (line 234) | def copy(self):
    method __copy__ (line 237) | def __copy__(self):
    method __deepcopy__ (line 240) | def __deepcopy__(self, memo):
    method __getitem__ (line 252) | def __getitem__(self, key):
    method __setitem__ (line 268) | def __setitem__(self, key, value):
    method __getattr__ (line 275) | def __getattr__(self, key):
    method __setattr__ (line 283) | def __setattr__(self, key, value):
    method __delattr__ (line 291) | def __delattr__(self, key):
  class ConfigLoader (line 305) | class ConfigLoader(object):
    method _log_default (line 320) | def _log_default(self):
    method __init__ (line 324) | def __init__(self, log=None):
    method clear (line 346) | def clear(self):
    method load_config (line 349) | def load_config(self):
  class FileConfigLoader (line 360) | class FileConfigLoader(ConfigLoader):
    method __init__ (line 367) | def __init__(self, filename, path=None, **kw):
    method _find_file (line 383) | def _find_file(self):
  class JSONFileConfigLoader (line 387) | class JSONFileConfigLoader(FileConfigLoader):
    method load_config (line 399) | def load_config(self):
    method _read_file_as_dict (line 410) | def _read_file_as_dict(self):
    method _convert_to_config (line 414) | def _convert_to_config(self, dictionary):
    method __enter__ (line 425) | def __enter__(self):
    method __exit__ (line 429) | def __exit__(self, exc_type, exc_value, traceback):
  class PyFileConfigLoader (line 443) | class PyFileConfigLoader(FileConfigLoader):
    method load_config (line 450) | def load_config(self):
    method load_subconfig (line 460) | def load_subconfig(self, fname, path=None):
    method _read_file_as_dict (line 475) | def _read_file_as_dict(self):
  class CommandLineConfigLoader (line 492) | class CommandLineConfigLoader(ConfigLoader):
    method _exec_config_str (line 499) | def _exec_config_str(self, lhs, rhs):
    method _load_flag (line 519) | def _load_flag(self, cfg):
  class KeyValueConfigLoader (line 547) | class KeyValueConfigLoader(CommandLineConfigLoader):
    method __init__ (line 555) | def __init__(self, argv=None, aliases=None, flags=None, **kw):
    method clear (line 595) | def clear(self):
    method _decode_argv (line 600) | def _decode_argv(self, argv, enc=None):
    method load_config (line 613) | def load_config(self, argv=None, aliases=None, flags=None):
  class ArgParseConfigLoader (line 688) | class ArgParseConfigLoader(CommandLineConfigLoader):
    method __init__ (line 691) | def __init__(self, argv=None, aliases=None, flags=None, log=None,  *pa...
    method load_config (line 728) | def load_config(self, argv=None, aliases=None, flags=None):
    method get_extra_args (line 750) | def get_extra_args(self):
    method _create_parser (line 756) | def _create_parser(self, aliases=None, flags=None):
    method _add_arguments (line 760) | def _add_arguments(self, aliases=None, flags=None):
    method _parse_args (line 763) | def _parse_args(self, args):
    method _convert_to_config (line 770) | def _convert_to_config(self):
  class KVArgParseConfigLoader (line 775) | class KVArgParseConfigLoader(ArgParseConfigLoader):
    method _add_arguments (line 781) | def _add_arguments(self, aliases=None, flags=None):
    method _convert_to_config (line 809) | def _convert_to_config(self):
  function load_pyconfig_files (line 836) | def load_pyconfig_files(config_files, path):

FILE: lib/client/traitlets/config/manager.py
  function recursive_update (line 15) | def recursive_update(target, new):
  class BaseJSONConfigManager (line 36) | class BaseJSONConfigManager(LoggingConfigurable):
    method ensure_config_dir_exists (line 44) | def ensure_config_dir_exists(self):
    method file_name (line 51) | def file_name(self, section_name):
    method get (line 54) | def get(self, section_name):
    method set (line 67) | def set(self, section_name, data):
    method update (line 80) | def update(self, section_name, new_data):

FILE: lib/client/traitlets/log.py
  function get_logger (line 10) | def get_logger():

FILE: lib/client/traitlets/traitlets.py
  class TraitError (line 87) | class TraitError(Exception):
  function isidentifier (line 98) | def isidentifier(s):
  function _should_warn (line 105) | def _should_warn(key):
  function _deprecated_method (line 120) | def _deprecated_method(method, cls, method_name, msg):
  function class_of (line 148) | def class_of(object):
  function add_article (line 159) | def add_article(name):
  function repr_type (line 169) | def repr_type(obj):
  function is_trait (line 181) | def is_trait(t):
  function parse_notifier_name (line 188) | def parse_notifier_name(names):
  class _SimpleTest (line 214) | class _SimpleTest:
    method __init__ (line 215) | def __init__ ( self, value ): self.value = value
    method __call__ (line 216) | def __call__ ( self, test  ):
    method __repr__ (line 218) | def __repr__(self):
    method __str__ (line 220) | def __str__(self):
  function getmembers (line 224) | def getmembers(object, predicate=None):
  function _validate_link (line 243) | def _validate_link(*tuples):
  class link (line 254) | class link(object):
    method __init__ (line 270) | def __init__(self, source, target):
    method _busy_updating (line 280) | def _busy_updating(self):
    method _update_target (line 287) | def _update_target(self, change):
    method _update_source (line 293) | def _update_source(self, change):
    method unlink (line 299) | def unlink(self):
  class directional_link (line 305) | class directional_link(object):
    method __init__ (line 324) | def __init__(self, source, target, transform=None):
    method _busy_updating (line 335) | def _busy_updating(self):
    method _update (line 342) | def _update(self, change):
    method unlink (line 349) | def unlink(self):
  class BaseDescriptor (line 361) | class BaseDescriptor(object):
    method class_init (line 383) | def class_init(self, cls, name):
    method instance_init (line 396) | def instance_init(self, obj):
  class TraitType (line 409) | class TraitType(BaseDescriptor):
    method __init__ (line 419) | def __init__(self, default_value=Undefined, allow_none=False, read_onl...
    method get_default_value (line 468) | def get_default_value(self):
    method init_default_value (line 477) | def init_default_value(self, obj):
    method _dynamic_default_callable (line 486) | def _dynamic_default_callable(self, obj):
    method instance_init (line 516) | def instance_init(self, obj):
    method get (line 526) | def get(self, obj, cls=None):
    method __get__ (line 545) | def __get__(self, obj, cls=None):
    method set (line 558) | def set(self, obj, value):
    method __set__ (line 576) | def __set__(self, obj, value):
    method _validate (line 587) | def _validate(self, obj, value):
    method _cross_validate (line 596) | def _cross_validate(self, obj, value):
    method __or__ (line 608) | def __or__(self, other):
    method info (line 614) | def info(self):
    method error (line 617) | def error(self, obj, value):
    method get_metadata (line 627) | def get_metadata(self, key, default=None):
    method set_metadata (line 639) | def set_metadata(self, key, value):
    method tag (line 651) | def tag(self, **metadata):
    method default_value_repr (line 666) | def default_value_repr(self):
  class _CallbackWrapper (line 673) | class _CallbackWrapper(object):
    method __init__ (line 680) | def __init__(self, cb):
    method __eq__ (line 688) | def __eq__(self, other):
    method __call__ (line 695) | def __call__(self, change):
  function _callback_wrapper (line 708) | def _callback_wrapper(cb):
  class MetaHasDescriptors (line 715) | class MetaHasDescriptors(type):
    method __new__ (line 722) | def __new__(mcls, name, bases, classdict):
    method __init__ (line 737) | def __init__(cls, name, bases, classdict):
    method setup_class (line 742) | def setup_class(cls, classdict):
  class MetaHasTraits (line 754) | class MetaHasTraits(MetaHasDescriptors):
    method setup_class (line 757) | def setup_class(cls, classdict):
  function observe (line 762) | def observe(*names, **kwargs):
  function observe_compat (line 792) | def observe_compat(func):
  function validate (line 823) | def validate(*names):
  function default (line 855) | def default(name):
  class EventHandler (line 898) | class EventHandler(BaseDescriptor):
    method _init_call (line 900) | def _init_call(self, func):
    method __call__ (line 904) | def __call__(self, *args, **kwargs):
    method __get__ (line 911) | def __get__(self, inst, cls=None):
  class ObserveHandler (line 917) | class ObserveHandler(EventHandler):
    method __init__ (line 919) | def __init__(self, names, type):
    method instance_init (line 923) | def instance_init(self, inst):
  class ValidateHandler (line 927) | class ValidateHandler(EventHandler):
    method __init__ (line 929) | def __init__(self, names):
    method instance_init (line 932) | def instance_init(self, inst):
  class DefaultHandler (line 936) | class DefaultHandler(EventHandler):
    method __init__ (line 938) | def __init__(self, name):
    method class_init (line 941) | def class_init(self, cls, name):
  class HasDescriptors (line 946) | class HasDescriptors(six.with_metaclass(MetaHasDescriptors, object)):
    method __new__ (line 950) | def __new__(cls, *args, **kwargs):
    method setup_instance (line 961) | def setup_instance(self, *args, **kwargs):
  class HasTraits (line 980) | class HasTraits(six.with_metaclass(MetaHasTraits, HasDescriptors)):
    method setup_instance (line 982) | def setup_instance(self, *args, **kwargs):
    method __init__ (line 988) | def __init__(self, *args, **kwargs):
    method __getstate__ (line 1021) | def __getstate__(self):
    method __setstate__ (line 1030) | def __setstate__(self, state):
    method cross_validation_lock (line 1049) | def cross_validation_lock(self):
    method hold_trait_notifications (line 1068) | def hold_trait_notifications(self):
    method _notify_trait (line 1133) | def _notify_trait(self, name, old_value, new_value):
    method notify_change (line 1142) | def notify_change(self, change):
    method _add_notifiers (line 1178) | def _add_notifiers(self, handler, name, type):
    method _remove_notifiers (line 1191) | def _remove_notifiers(self, handler, name, type):
    method on_trait_change (line 1200) | def on_trait_change(self, handler=None, name=None, remove=False):
    method observe (line 1237) | def observe(self, handler, names=All, type='change'):
    method unobserve (line 1267) | def unobserve(self, handler, names=All, type='change'):
    method unobserve_all (line 1288) | def unobserve_all(self, name=All):
    method _register_validator (line 1299) | def _register_validator(self, handler, names):
    method add_traits (line 1329) | def add_traits(self, **traits):
    method set_trait (line 1336) | def set_trait(self, name, value):
    method class_trait_names (line 1346) | def class_trait_names(cls, **metadata):
    method class_traits (line 1355) | def class_traits(cls, **metadata):
    method class_own_traits (line 1390) | def class_own_traits(cls, **metadata):
    method has_trait (line 1399) | def has_trait(self, name):
    method trait_names (line 1403) | def trait_names(self, **metadata):
    method traits (line 1407) | def traits(self, **metadata):
    method trait_metadata (line 1439) | def trait_metadata(self, traitname, key, default=None):
    method class_own_trait_events (line 1453) | def class_own_trait_events(cls, name):
    method trait_events (line 1463) | def trait_events(cls, name=None):
  class ClassBasedTraitType (line 1497) | class ClassBasedTraitType(TraitType):
    method _resolve_string (line 1503) | def _resolve_string(self, string):
    method error (line 1509) | def error(self, obj, value):
  class Type (line 1527) | class Type(ClassBasedTraitType):
    method __init__ (line 1530) | def __init__ (self, default_value=Undefined, klass=None, **kwargs):
    method validate (line 1572) | def validate(self, obj, value):
    method info (line 1588) | def info(self):
    method instance_init (line 1599) | def instance_init(self, obj):
    method _resolve_classes (line 1603) | def _resolve_classes(self):
    method default_value_repr (line 1609) | def default_value_repr(self):
  class Instance (line 1617) | class Instance(ClassBasedTraitType):
    method __init__ (line 1627) | def __init__(self, klass=None, args=None, kw=None, **kwargs):
    method validate (line 1673) | def validate(self, obj, value):
    method info (line 1679) | def info(self):
    method instance_init (line 1690) | def instance_init(self, obj):
    method _resolve_classes (line 1694) | def _resolve_classes(self):
    method make_dynamic_default (line 1698) | def make_dynamic_default(self):
    method default_value_repr (line 1704) | def default_value_repr(self):
  class ForwardDeclaredMixin (line 1708) | class ForwardDeclaredMixin(object):
    method _resolve_string (line 1712) | def _resolve_string(self, string):
  class ForwardDeclaredType (line 1721) | class ForwardDeclaredType(ForwardDeclaredMixin, Type):
  class ForwardDeclaredInstance (line 1728) | class ForwardDeclaredInstance(ForwardDeclaredMixin, Instance):
  class This (line 1735) | class This(ClassBasedTraitType):
    method __init__ (line 1745) | def __init__(self, **kwargs):
    method validate (line 1748) | def validate(self, obj, value):
  class Union (line 1758) | class Union(TraitType):
    method __init__ (line 1761) | def __init__(self, trait_types, **kwargs):
    method class_init (line 1782) | def class_init(self, cls, name):
    method instance_init (line 1787) | def instance_init(self, obj):
    method validate (line 1792) | def validate(self, obj, value):
    method __or__ (line 1805) | def __or__(self, other):
    method make_dynamic_default (line 1811) | def make_dynamic_default(self):
  class Any (line 1826) | class Any(TraitType):
  function _validate_bounds (line 1832) | def _validate_bounds(trait, obj, value):
  class Int (line 1856) | class Int(TraitType):
    method __init__ (line 1862) | def __init__(self, default_value=Undefined, allow_none=False, **kwargs):
    method validate (line 1868) | def validate(self, obj, value):
  class CInt (line 1874) | class CInt(Int):
    method validate (line 1877) | def validate(self, obj, value):
  class Long (line 1886) | class Long(TraitType):
    method __init__ (line 1892) | def __init__(self, default_value=Undefined, allow_none=False, **kwargs):
    method _validate_long (line 1899) | def _validate_long(self, obj, value):
    method validate (line 1906) | def validate(self, obj, value):
  class CLong (line 1911) | class CLong(Long):
    method validate (line 1914) | def validate(self, obj, value):
  class Integer (line 1922) | class Integer(TraitType):
    method __init__ (line 1930) | def __init__(self, default_value=Undefined, allow_none=False, **kwargs):
    method _validate_int (line 1937) | def _validate_int(self, obj, value):
    method validate (line 1951) | def validate(self, obj, value):
  class Float (line 1960) | class Float(TraitType):
    method __init__ (line 1966) | def __init__(self, default_value=Undefined, allow_none=False, **kwargs):
    method validate (line 1972) | def validate(self, obj, value):
  class CFloat (line 1980) | class CFloat(Float):
    method validate (line 1983) | def validate(self, obj, value):
  class Complex (line 1991) | class Complex(TraitType):
    method validate (line 1997) | def validate(self, obj, value):
  class CComplex (line 2005) | class CComplex(Complex):
    method validate (line 2008) | def validate (self, obj, value):
  class Bytes (line 2017) | class Bytes(TraitType):
    method validate (line 2023) | def validate(self, obj, value):
  class CBytes (line 2029) | class CBytes(Bytes):
    method validate (line 2032) | def validate(self, obj, value):
  class Unicode (line 2039) | class Unicode(TraitType):
    method validate (line 2045) | def validate(self, obj, value):
  class CUnicode (line 2057) | class CUnicode(Unicode):
    method validate (line 2060) | def validate(self, obj, value):
  class ObjectName (line 2067) | class ObjectName(TraitType):
    method coerce_str (line 2075) | def coerce_str(self, obj, value):
    method validate (line 2086) | def validate(self, obj, value):
  class DottedObjectName (line 2093) | class DottedObjectName(ObjectName):
    method validate (line 2095) | def validate(self, obj, value):
  class Bool (line 2104) | class Bool(TraitType):
    method validate (line 2110) | def validate(self, obj, value):
  class CBool (line 2116) | class CBool(Bool):
    method validate (line 2119) | def validate(self, obj, value):
  class Enum (line 2126) | class Enum(TraitType):
    method __init__ (line 2129) | def __init__(self, values, default_value=Undefined, **kwargs):
    method validate (line 2135) | def validate(self, obj, value):
    method info (line 2140) | def info(self):
  class CaselessStrEnum (line 2147) | class CaselessStrEnum(Enum):
    method __init__ (line 2150) | def __init__(self, values, default_value=Undefined, **kwargs):
    method validate (line 2154) | def validate(self, obj, value):
  class Container (line 2165) | class Container(Instance):
    method __init__ (line 2175) | def __init__(self, trait=None, default_value=None, **kwargs):
    method element_error (line 2230) | def element_error(self, obj, element, validator):
    method validate (line 2235) | def validate(self, obj, value):
    method validate_elements (line 2246) | def validate_elements(self, obj, value):
    method class_init (line 2259) | def class_init(self, cls, name):
    method instance_init (line 2264) | def instance_init(self, obj):
  class List (line 2270) | class List(Container):
    method __init__ (line 2275) | def __init__(self, trait=None, default_value=None, minlen=0, maxlen=sy...
    method length_error (line 2311) | def length_error(self, obj, value):
    method validate_elements (line 2316) | def validate_elements(self, obj, value):
    method validate (line 2323) | def validate(self, obj, value):
  class Set (line 2329) | class Set(List):
    method __init__ (line 2335) | def __init__(self, trait=None, default_value=None, minlen=0, maxlen=sy...
  class Tuple (line 2370) | class Tuple(Container):
    method __init__ (line 2375) | def __init__(self, *traits, **kwargs):
    method validate_elements (line 2432) | def validate_elements(self, obj, value):
    method class_init (line 2451) | def class_init(self, cls, name):
    method instance_init (line 2457) | def instance_init(self, obj):
  class Dict (line 2464) | class Dict(Instance):
    method __init__ (line 2468) | def __init__(self, trait=None, traits=None, default_value=Undefined,
    method element_error (line 2523) | def element_error(self, obj, element, validator):
    method validate (line 2528) | def validate(self, obj, value):
    method validate_elements (line 2535) | def validate_elements(self, obj, value):
    method class_init (line 2558) | def class_init(self, cls, name):
    method instance_init (line 2566) | def instance_init(self, obj):
  class TCPAddress (line 2575) | class TCPAddress(TraitType):
    method validate (line 2584) | def validate(self, obj, value):
  class CRegExp (line 2593) | class CRegExp(TraitType):
    method validate (line 2601) | def validate(self, obj, value):
  class UseEnum (line 2608) | class UseEnum(TraitType):
    method __init__ (line 2637) | def __init__(self, enum_class, default_value=None, **kwargs):
    method select_by_number (line 2647) | def select_by_number(self, value, default=Undefined):
    method select_by_name (line 2657) | def select_by_name(self, value, default=Undefined):
    method validate (line 2665) | def validate(self, obj, value):
    method info (line 2685) | def info(self):

FILE: lib/client/traitlets/utils/bunch.py
  class Bunch (line 9) | class Bunch(dict):
    method __getattr__ (line 11) | def __getattr__(self, key):
    method __setattr__ (line 17) | def __setattr__(self, key, value):
    method __dir__ (line 20) | def __dir__(self):

FILE: lib/client/traitlets/utils/getargspec.py
  function getargspec (line 20) | def getargspec(func):
  function getargspec (line 57) | def getargspec(func):

FILE: lib/client/traitlets/utils/importstring.py
  function import_item (line 11) | def import_item(name):

FILE: lib/client/traitlets/utils/sentinel.py
  class Sentinel (line 6) | class Sentinel(object):
    method __init__ (line 8) | def __init__(self, name, module, docstring=None):
    method __repr__ (line 15) | def __repr__(self):

FILE: lib/client/traitlets/utils/tests/test_bunch.py
  function test_bunch (line 3) | def test_bunch():
  function test_bunch_dir (line 11) | def test_bunch_dir():

FILE: lib/client/traitlets/utils/tests/test_importstring.py
  class TestImportItem (line 15) | class TestImportItem(TestCase):
    method test_import_unicode (line 17) | def test_import_unicode(self):
    method test_bad_input (line 22) | def test_bad_input(self):

FILE: lib/kernel.py
  function fix_whitespace_for_phantom (line 74) | def fix_whitespace_for_phantom(text: str):
  function extract_content (line 84) | def extract_content(messages, msg_type):
  function remove_ansi_escape (line 93) | def remove_ansi_escape(text: str):
  function get_msg_type (line 97) | def get_msg_type(message):
  function extract_data (line 101) | def extract_data(result):
  class KernelConnection (line 109) | class KernelConnection(object):
    class MessageReceiver (line 112) | class MessageReceiver(Thread):  # noqa
      method __init__ (line 113) | def __init__(self, kernel):
      method shutdown (line 119) | def shutdown(self):
    class ShellMessageReceiver (line 122) | class ShellMessageReceiver(MessageReceiver):
      method run (line 125) | def run(self):
    class IOPubMessageReceiver (line 145) | class IOPubMessageReceiver(MessageReceiver):
      method run (line 148) | def run(self):
    class StdInMessageReceiver (line 206) | class StdInMessageReceiver(MessageReceiver):
      method _handle_input_request (line 209) | def _handle_input_request(self, prompt, password):
      method run (line 222) | def run(self):
    method _init_receivers (line 239) | def _init_receivers(self):
    method __init__ (line 248) | def __init__(
    method __del__ (line 277) | def __del__(self):  # noqa
    method lang (line 283) | def lang(self):
    method kernel_id (line 288) | def kernel_id(self):
    method shutdown_kernel (line 292) | def shutdown_kernel(self):
    method restart_kernel (line 295) | def restart_kernel(self):
    method interrupt_kernel (line 298) | def interrupt_kernel(self):
    method get_connection_name (line 301) | def get_connection_name(self):
    method set_connection_name (line 304) | def set_connection_name(self, new_name):
    method del_connection_name (line 310) | def del_connection_name(self):
    method view_name (line 321) | def view_name(self):
    method repr (line 326) | def repr(self):
    method execution_state (line 340) | def execution_state(self):
    method _show_inline_output (line 344) | def _show_inline_output(self):
    method activate_view (line 347) | def activate_view(self):
    method _output_input_code (line 356) | def _output_input_code(self, code, execution_count):
    method _handle_error (line 362) | def _handle_error(
    method _handle_stream (line 388) | def _handle_stream(
    method _write_out_execution_count (line 404) | def _write_out_execution_count(self, execution_count) -> None:
    method _write_text_to_view (line 407) | def _write_text_to_view(self, text: str) -> None:
    method _write_phantom (line 417) | def _write_phantom(self, content: str):
    method _write_inline_html_phantom (line 429) | def _write_inline_html_phantom(
    method _write_inline_image_phantom (line 438) | def _write_inline_image_phantom(
    method _add_phantom (line 464) | def _add_phantom(
    method _clear_phantoms_in_region (line 485) | def _clear_phantoms_in_region(self, region: sublime.Region, view: subl...
    method _erase_phantom (line 496) | def _erase_phantom(self, pid: str, *, view: sublime.View):
    method _write_mime_data_to_view (line 501) | def _write_mime_data_to_view(
    method _handle_inspect_reply (line 551) | def _handle_inspect_reply(self, reply: dict):
    method get_view (line 567) | def get_view(self):
    method execute_code (line 592) | def execute_code(self, code, phantom_region, view):
    method is_alive (line 602) | def is_alive(self):
    method get_complete (line 606) | def get_complete(self, code, cursor_pos, timeout=None):
    method get_inspection (line 654) | def get_inspection(self, code, cursor_pos, detail_level=0, timeout=None):

FILE: lib/utils.py
  class add_path (line 11) | class add_path(object):
    method __init__ (line 14) | def __init__(self, path):
    method __enter__ (line 17) | def __enter__(self):  # noqa
    method __exit__ (line 20) | def __exit__(self, exc_type, exc_value, traceback):  # noqa
  function chain_callbacks (line 24) | def chain_callbacks(f):
  class MaskInputPanelText (line 58) | class MaskInputPanelText(TextCommand):
    method run (line 61) | def run(self, edit):
  function show_password_input (line 67) | def show_password_input(prompt, on_done, on_cancel):
  function get_png_dimensions (line 102) | def get_png_dimensions(base64):
  function get_cell (line 113) | def get_cell(

FILE: tests/_helpers.py
  class ViewTestCase (line 6) | class ViewTestCase(TestCase):
    method setUp (line 14) | def setUp(self):
    method tearDown (line 20) | def tearDown(self):
    method set_text (line 25) | def set_text(self, string):
    method clear_view (line 28) | def clear_view(self):

FILE: tests/test_cell_handling.py
  class TestDelimiter (line 34) | class TestDelimiter(ViewTestCase):
    method find_all_delimiters (line 36) | def find_all_delimiters(self):
    method check_content_against_match_count (line 41) | def check_content_against_match_count(self, content, expected_count):
    method test_pattern_against_delimiteres_valid (line 47) | def test_pattern_against_delimiteres_valid(self):
    method test_pattern_against_delimiteres_invalid (line 53) | def test_pattern_against_delimiteres_invalid(self):
    method test_delimiter_match_count_against_pattern_one (line 59) | def test_delimiter_match_count_against_pattern_one(self):
    method test_delimiter_match_count_against_pattern_two (line 65) | def test_delimiter_match_count_against_pattern_two(self):
    method test_delimiter_match_count_against_pattern_mixed (line 71) | def test_delimiter_match_count_against_pattern_mixed(self):

FILE: tests/test_tests_running.py
  class TestThatTestsAreRunning (line 4) | class TestThatTestsAreRunning(unittest.TestCase):
    method test_that_never_fails (line 5) | def test_that_never_fails(self):
Condensed preview — 114 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (674K chars).
[
  {
    "path": ".build",
    "chars": 52297,
    "preview": "{\n\t\"automatic_order\": false,\n\t\"iterations\": 1,\n\t\"mods_load_order\":\n\t[\n\t\t\"tests/test_tests_running.py\",\n\t\t\"lib/utils.py\","
  },
  {
    "path": ".codecov.yml",
    "chars": 64,
    "preview": "ignore:\n  - \"lib/client\"  # ignore folders and all its contents\n"
  },
  {
    "path": ".flake8",
    "chars": 276,
    "preview": "[flake8]\nignore =\n    # whitespace before ':'\n    E203,\n    # missing docstrings\n    D100,D101,D102,D103,D104,D105,D106,"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 575,
    "preview": "name: CI\non: [push]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        python-version: [3.8"
  },
  {
    "path": ".gitignore",
    "chars": 83,
    "preview": "# Python Stuff\n*.pyc\n.venv/\n\n# Sublime Stuff\n*.sublime-project\n*.sublime-workspace\n"
  },
  {
    "path": ".pre-commit-config.yaml",
    "chars": 855,
    "preview": "# See https://pre-commit.com for more information\n# See https://pre-commit.com/hooks.html for more hooks\ndefault_stages:"
  },
  {
    "path": ".python-version",
    "chars": 4,
    "preview": "3.8\n"
  },
  {
    "path": "CONTRIBUTORS.md",
    "chars": 106,
    "preview": "This package would not exist without the original work done by NEGORO Tetsuya (https://github.com/ngr-t).\n"
  },
  {
    "path": "Default.sublime-commands",
    "chars": 1264,
    "preview": "[\n  {\n    \"caption\": \"Helium: Connect Kernel\",\n    \"command\": \"helium_connect_kernel\"\n  },\n  {\n    \"caption\": \"Helium: S"
  },
  {
    "path": "Default.sublime-keymap",
    "chars": 104,
    "preview": "[\n    {\"keys\": [\"ctrl+alt+enter\"], \"command\": \"helium_execute_cell\", \"args\": {\"move_cursor\": \"True\"}}\n]\n"
  },
  {
    "path": "Helium.sublime-settings",
    "chars": 1201,
    "preview": "{\n  \"cell_delimiter_pattern\": \"^(#\\\\s?%%)|(# <codecell>)\\\\s*$\",\n  // Regex pattern to find code cell blocks delimiters\n "
  },
  {
    "path": "Helium.sublime-syntax",
    "chars": 698,
    "preview": "%YAML 1.2\n---\nname: Helium IPython\nscope: source.helium.output\n\nvariables:\n  command_start: \"In\\\\[\\\\d+\\\\]:\"\n  error_star"
  },
  {
    "path": "LICENSE.TXT",
    "chars": 3921,
    "preview": "Helium package is licensed under GNU GENERAL PUBLIC LICENSE Version 2.\nYEAR: 2016-2018\nCOPYRIGHT HOLDER: NEGORO Tetsuya\n"
  },
  {
    "path": "Main.sublime-menu",
    "chars": 1224,
    "preview": "[\n    {\n        \"caption\": \"Preferences\",\n        \"mnemonic\": \"n\",\n        \"id\": \"preferences\",\n        \"children\":\n    "
  },
  {
    "path": "README.md",
    "chars": 3882,
    "preview": "Helium package for Sublime Text\n===\n\nHelium is a package for Sublime Text, which provides in-editor code execution and a"
  },
  {
    "path": "dependencies.json",
    "chars": 615,
    "preview": "{\n\t\"windows\": {\n\t\t\"<4000\": [\n\t\t\t\"dateutil\",\n\t\t\t\"enum\",\n\t\t\t\"python-six\",\n\t\t\t\"pyzmq\"\n\t\t],\n\t\t\">=4000\": [\n\t\t\t\"dateutil\",\n\t\t\t"
  },
  {
    "path": "helium.py",
    "chars": 32868,
    "preview": "\"\"\"Helium package for Sublime Text 3.\n\nThe package provides code execution and completion in interaction with Jupyter.\n\n"
  },
  {
    "path": "lib/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "lib/client/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "lib/client/decorator.py",
    "chars": 17222,
    "preview": "# #########################     LICENSE     ############################ #\n\n# Copyright (c) 2005-2018, Michele Simionato"
  },
  {
    "path": "lib/client/decorator_version",
    "chars": 6,
    "preview": "4.4.2\n"
  },
  {
    "path": "lib/client/ipython_genutils/__init__.py",
    "chars": 48,
    "preview": "from ._version import __version__, version_info\n"
  },
  {
    "path": "lib/client/ipython_genutils/_version.py",
    "chars": 72,
    "preview": "version_info = (0, 2, 0)\n__version__ = '.'.join(map(str, version_info))\n"
  },
  {
    "path": "lib/client/ipython_genutils/encoding.py",
    "chars": 2869,
    "preview": "# coding: utf-8\n\"\"\"\nUtilities for dealing with text encodings\n\"\"\"\n\n#----------------------------------------------------"
  },
  {
    "path": "lib/client/ipython_genutils/importstring.py",
    "chars": 1035,
    "preview": "# encoding: utf-8\n\"\"\"\nA simple utility to import something by its string name.\n\"\"\"\n\n# Copyright (c) IPython Development "
  },
  {
    "path": "lib/client/ipython_genutils/ipstruct.py",
    "chars": 11258,
    "preview": "# encoding: utf-8\n\"\"\"A dict subclass that supports attribute style access.\n\nCan probably be replaced by types.SimpleName"
  },
  {
    "path": "lib/client/ipython_genutils/path.py",
    "chars": 5386,
    "preview": "# encoding: utf-8\n\"\"\"\nUtilities for path handling.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under th"
  },
  {
    "path": "lib/client/ipython_genutils/py3compat.py",
    "chars": 10810,
    "preview": "# coding: utf-8\n\"\"\"Compatibility tricks for Python 3. Mainly to do with unicode.\"\"\"\nimport functools\nimport os\nimport sy"
  },
  {
    "path": "lib/client/ipython_genutils/tempdir.py",
    "chars": 4929,
    "preview": "\"\"\"TemporaryDirectory class, copied from Python 3\n\nThis is copied from the stdlib and will be standard in Python 3.2 and"
  },
  {
    "path": "lib/client/ipython_genutils/text.py",
    "chars": 6929,
    "preview": "# encoding: utf-8\n\"\"\"\nUtilities for working with strings and text.\n\nInheritance diagram:\n\n.. inheritance-diagram:: IPyth"
  },
  {
    "path": "lib/client/jupyter_client/__init__.py",
    "chars": 369,
    "preview": "\"\"\"Client-side implementations of the Jupyter protocol\"\"\"\n\nfrom ._version import version_info, __version__, protocol_ver"
  },
  {
    "path": "lib/client/jupyter_client/_version.py",
    "chars": 155,
    "preview": "version_info = (5, 2, 4)\n__version__ = '.'.join(map(str, version_info))\n\nprotocol_version_info = (5, 3)\nprotocol_version"
  },
  {
    "path": "lib/client/jupyter_client/adapter.py",
    "chars": 12444,
    "preview": "\"\"\"Adapters for Jupyter msg spec versions.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms o"
  },
  {
    "path": "lib/client/jupyter_client/blocking/__init__.py",
    "chars": 40,
    "preview": "from .client import BlockingKernelClient"
  },
  {
    "path": "lib/client/jupyter_client/blocking/channels.py",
    "chars": 2378,
    "preview": "\"\"\"Blocking channels\n\nUseful for test suites and blocking terminal interfaces.\n\"\"\"\n\n# Copyright (c) Jupyter Development "
  },
  {
    "path": "lib/client/jupyter_client/blocking/client.py",
    "chars": 12437,
    "preview": "\"\"\"Implements a fully blocking kernel client.\n\nUseful for test suites and blocking terminal interfaces.\n\"\"\"\n# Copyright "
  },
  {
    "path": "lib/client/jupyter_client/channels.py",
    "chars": 6907,
    "preview": "\"\"\"Base classes to manage a Client's interaction with a running kernel\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# D"
  },
  {
    "path": "lib/client/jupyter_client/channelsabc.py",
    "chars": 938,
    "preview": "\"\"\"Abstract base classes for kernel client channels\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under th"
  },
  {
    "path": "lib/client/jupyter_client/client.py",
    "chars": 15619,
    "preview": "\"\"\"Base class to manage the interaction with a running kernel\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distribute"
  },
  {
    "path": "lib/client/jupyter_client/clientabc.py",
    "chars": 2099,
    "preview": "\"\"\"Abstract base class for kernel clients\"\"\"\n\n#-------------------------------------------------------------------------"
  },
  {
    "path": "lib/client/jupyter_client/connect.py",
    "chars": 19800,
    "preview": "\"\"\"Utilities for connecting to jupyter kernels\n\nThe :class:`ConnectionFileMixin` class in this module encapsulates the l"
  },
  {
    "path": "lib/client/jupyter_client/consoleapp.py",
    "chars": 13073,
    "preview": "\"\"\" A minimal application base mixin for all ZMQ based IPython frontends.\n\nThis is not a complete console app, as subpro"
  },
  {
    "path": "lib/client/jupyter_client/ioloop/__init__.py",
    "chars": 86,
    "preview": "from .manager import IOLoopKernelManager\nfrom .restarter import IOLoopKernelRestarter\n"
  },
  {
    "path": "lib/client/jupyter_client/ioloop/manager.py",
    "chars": 1894,
    "preview": "\"\"\"A kernel manager with a tornado IOLoop\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of"
  },
  {
    "path": "lib/client/jupyter_client/ioloop/restarter.py",
    "chars": 1252,
    "preview": "\"\"\"A basic in process kernel monitor with autorestarting.\n\nThis watches a kernel's state using KernelManager.is_alive an"
  },
  {
    "path": "lib/client/jupyter_client/jsonutil.py",
    "chars": 2965,
    "preview": "# coding: utf-8\n\"\"\"Utilities to manipulate JSON objects.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed und"
  },
  {
    "path": "lib/client/jupyter_client/kernelapp.py",
    "chars": 2533,
    "preview": "import os\nimport signal\nimport uuid\n\nfrom jupyter_core.application import JupyterApp, base_flags\nfrom tornado.ioloop imp"
  },
  {
    "path": "lib/client/jupyter_client/kernelspec.py",
    "chars": 13316,
    "preview": "\"\"\"Tools for managing kernel specs\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Mo"
  },
  {
    "path": "lib/client/jupyter_client/kernelspecapp.py",
    "chars": 10268,
    "preview": "\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom __future__ i"
  },
  {
    "path": "lib/client/jupyter_client/launcher.py",
    "chars": 5994,
    "preview": "\"\"\"Utilities for launching kernels\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Mo"
  },
  {
    "path": "lib/client/jupyter_client/localinterfaces.py",
    "chars": 7872,
    "preview": "\"\"\"Utilities for identifying local IP addresses.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the t"
  },
  {
    "path": "lib/client/jupyter_client/manager.py",
    "chars": 17489,
    "preview": "\"\"\"Base class to manage a running kernel\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of "
  },
  {
    "path": "lib/client/jupyter_client/managerabc.py",
    "chars": 1211,
    "preview": "\"\"\"Abstract base class for kernel managers.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms "
  },
  {
    "path": "lib/client/jupyter_client/multikernelmanager.py",
    "chars": 9793,
    "preview": "\"\"\"A kernel manager for multiple kernels\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of "
  },
  {
    "path": "lib/client/jupyter_client/restarter.py",
    "chars": 4051,
    "preview": "\"\"\"A basic kernel monitor with autorestarting.\n\nThis watches a kernel's state using KernelManager.is_alive and auto\nrest"
  },
  {
    "path": "lib/client/jupyter_client/runapp.py",
    "chars": 4322,
    "preview": "\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom __future__ i"
  },
  {
    "path": "lib/client/jupyter_client/session.py",
    "chars": 34351,
    "preview": "\"\"\"Session object for building, serializing, sending, and receiving messages.\n\nThe Session object supports serialization"
  },
  {
    "path": "lib/client/jupyter_client/threaded.py",
    "chars": 7867,
    "preview": "\"\"\" Defines a KernelClient that provides thread-safe sockets with async callbacks on message replies.\n\"\"\"\nfrom __future_"
  },
  {
    "path": "lib/client/jupyter_client/win_interrupt.py",
    "chars": 1401,
    "preview": "\"\"\"Use a Windows event to interrupt a child process like SIGINT.\n\nThe child needs to explicitly listen for this - see\nip"
  },
  {
    "path": "lib/client/jupyter_core/__init__.py",
    "chars": 47,
    "preview": "from .version import version_info, __version__\n"
  },
  {
    "path": "lib/client/jupyter_core/__main__.py",
    "chars": 71,
    "preview": "\"\"\"Launch the root jupyter command\"\"\"\nfrom .command import main\nmain()\n"
  },
  {
    "path": "lib/client/jupyter_core/application.py",
    "chars": 8315,
    "preview": "# encoding: utf-8\n\"\"\"\nA base Application class for Jupyter applications.\n\nAll Jupyter applications should inherit from t"
  },
  {
    "path": "lib/client/jupyter_core/command.py",
    "chars": 8626,
    "preview": "\"\"\"The root `jupyter` command.\n\nThis does nothing other than dispatch to subcommands or output path info.\n\"\"\"\n\n# Copyrig"
  },
  {
    "path": "lib/client/jupyter_core/migrate.py",
    "chars": 8447,
    "preview": "from __future__ import unicode_literals\n\n\"\"\"Migrating IPython < 4.0 to Jupyter\n\nThis *copies* configuration and resource"
  },
  {
    "path": "lib/client/jupyter_core/paths.py",
    "chars": 13147,
    "preview": "# encoding: utf-8\n\"\"\"Path utility functions.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms"
  },
  {
    "path": "lib/client/jupyter_core/troubleshoot.py",
    "chars": 2725,
    "preview": "#!/usr/bin/env python\n\"\"\"\ndisplay environment information that isfrequently\nused to troubleshoot installations of Jupyte"
  },
  {
    "path": "lib/client/jupyter_core/utils/__init__.py",
    "chars": 521,
    "preview": "import errno\nimport os\n\ndef ensure_dir_exists(path, mode=0o777):\n    \"\"\"ensure that a directory exists\n\n    If it doesn'"
  },
  {
    "path": "lib/client/jupyter_core/utils/shutil_which.py",
    "chars": 2431,
    "preview": "# Verbatim copy of shutil.which from Python 3.4.3\n# License: PSF\n# Only used on Python < 3\n\nimport os, sys\n\ndef which(cm"
  },
  {
    "path": "lib/client/jupyter_core/version.py",
    "chars": 175,
    "preview": "# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nversion_info = (4,"
  },
  {
    "path": "lib/client/traitlets/__init__.py",
    "chars": 117,
    "preview": "from .traitlets import *\nfrom .utils.importstring import import_item\nfrom ._version import version_info, __version__\n"
  },
  {
    "path": "lib/client/traitlets/_version.py",
    "chars": 72,
    "preview": "version_info = (4, 3, 3)\n__version__ = '.'.join(map(str, version_info))\n"
  },
  {
    "path": "lib/client/traitlets/config/__init__.py",
    "chars": 203,
    "preview": "# encoding: utf-8\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n"
  },
  {
    "path": "lib/client/traitlets/config/application.py",
    "chars": 26275,
    "preview": "# encoding: utf-8\n\"\"\"A base class for a configurable application.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distri"
  },
  {
    "path": "lib/client/traitlets/config/configurable.py",
    "chars": 16322,
    "preview": "# encoding: utf-8\n\"\"\"A base class for objects that are configurable.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Dis"
  },
  {
    "path": "lib/client/traitlets/config/loader.py",
    "chars": 28768,
    "preview": "# encoding: utf-8\n\"\"\"A simple configuration system.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under th"
  },
  {
    "path": "lib/client/traitlets/config/manager.py",
    "chars": 2431,
    "preview": "\"\"\"Manager to read and modify config data in JSON files.\n\"\"\"\n# Copyright (c) IPython Development Team.\n# Distributed und"
  },
  {
    "path": "lib/client/traitlets/log.py",
    "chars": 779,
    "preview": "\"\"\"Grab the global logger instance.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the M"
  },
  {
    "path": "lib/client/traitlets/traitlets.py",
    "chars": 95288,
    "preview": "# encoding: utf-8\n\"\"\"\nA lightweight Traits like module.\n\nThis is designed to provide a lightweight, simple, pure Python "
  },
  {
    "path": "lib/client/traitlets/utils/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "lib/client/traitlets/utils/bunch.py",
    "chars": 652,
    "preview": "\"\"\"Yet another implementation of bunch\n\nattribute-access of items on a dict.\n\"\"\"\n\n# Copyright (c) Jupyter Development Te"
  },
  {
    "path": "lib/client/traitlets/utils/getargspec.py",
    "chars": 2974,
    "preview": "# -*- coding: utf-8 -*-\n\"\"\"\n    getargspec excerpted from:\n    \n    sphinx.util.inspect\n    ~~~~~~~~~~~~~~~~~~~\n    Help"
  },
  {
    "path": "lib/client/traitlets/utils/importstring.py",
    "chars": 1266,
    "preview": "# encoding: utf-8\n\"\"\"\nA simple utility to import something by its string name.\n\"\"\"\n# Copyright (c) IPython Development T"
  },
  {
    "path": "lib/client/traitlets/utils/sentinel.py",
    "chars": 421,
    "preview": "\"\"\"Sentinel class for constants with useful reprs\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the "
  },
  {
    "path": "lib/client/traitlets/utils/tests/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "lib/client/traitlets/utils/tests/test_bunch.py",
    "chars": 272,
    "preview": "from ..bunch import Bunch\n\ndef test_bunch():\n    b = Bunch(x=5, y=10)\n    assert 'y' in b\n    assert 'x' in b\n    assert"
  },
  {
    "path": "lib/client/traitlets/utils/tests/test_importstring.py",
    "chars": 883,
    "preview": "# encoding: utf-8\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n#"
  },
  {
    "path": "lib/client/update_decorator.sh",
    "chars": 983,
    "preview": "#!/bin/bash\n# This script updates decorator to another version. Version is either the git tag\n# or the commit has of the"
  },
  {
    "path": "lib/client/update_ipython_genutils.sh",
    "chars": 1100,
    "preview": "#!/bin/bash\n# This script updates ipython_genutils to another version. Version is either the git tag\n# or the commit has"
  },
  {
    "path": "lib/client/update_jupyter_client.sh",
    "chars": 1036,
    "preview": "#!/bin/bash\n# This script updates jupyter_client to another version. Version is either the git tag\n# or the commit has o"
  },
  {
    "path": "lib/client/update_jupyter_core.sh",
    "chars": 1008,
    "preview": "#!/bin/bash\n# This script updates jupyter_core to another version. Version is either the git tag\n# or the commit has of "
  },
  {
    "path": "lib/client/update_traitlets.sh",
    "chars": 1000,
    "preview": "#!/bin/bash\n# This script updates traitlets to another version. Version is either the git tag\n# or the commit has of the"
  },
  {
    "path": "lib/kernel.py",
    "chars": 23820,
    "preview": "\"\"\"Definition of KernelConnection class.\n\nKernelConnection class provides interaction with Jupyter kernels.\n\nCopyright ("
  },
  {
    "path": "lib/utils.py",
    "chars": 3906,
    "preview": "import bisect\nimport re\nimport sys\nfrom base64 import b64decode\nfrom functools import wraps\n\nimport sublime\nfrom sublime"
  },
  {
    "path": "messages/0.3.1.txt",
    "chars": 342,
    "preview": "Update in 0.3.1\n---------------\n\nFixed some problems (thanks @randy3k for feedback!)\n\n  - Handle \"text/markdown\" MIME ty"
  },
  {
    "path": "messages/0.3.2.txt",
    "chars": 215,
    "preview": "Update in 0.3.2\n---------------\n\n  - Use wss for https connections. This enables Hermes to connect Jupyterhub server usi"
  },
  {
    "path": "messages/0.3.3.txt",
    "chars": 284,
    "preview": "Update in 0.3.3\n---------------\n\n  - Fixed issue #3. Now `text/plain` type data are primarily used when `display_data` a"
  },
  {
    "path": "messages/0.3.4.txt",
    "chars": 453,
    "preview": "Update in 0.3.4\n---------------\n\n  - Add request parameter on creating WebSocket connection to avoid \"No session ID spec"
  },
  {
    "path": "messages/0.3.5.txt",
    "chars": 355,
    "preview": "Update in 0.3.5\n---------------\n\n  - Scroll to the end of the result buffer on code block execution(#15).\n  - Added `Her"
  },
  {
    "path": "messages/0.3.6.txt",
    "chars": 347,
    "preview": "Update in 0.3.6\n---------------\n\n  - Fixed code block detection when there are code block(s) selected.\n  - Better error "
  },
  {
    "path": "messages/0.4.0.txt",
    "chars": 453,
    "preview": "Update in 0.4.0\n---------------\n\n  - `Hermes: Set URL` command is renamed to `Hermes: Connect Server`.\n  - `Hermes: List"
  },
  {
    "path": "messages/0.4.1.txt",
    "chars": 93,
    "preview": "Update in 0.4.1\n---------------\n\nFixed the bug failing to connect a kernel created by Hermes."
  },
  {
    "path": "messages/0.4.2.txt",
    "chars": 113,
    "preview": "Update in 0.4.2\n---------------\n\nFixed the bug that the editor hangs up when view is connected to a dead kernel. "
  },
  {
    "path": "messages/0.4.3.txt",
    "chars": 143,
    "preview": "Update in 0.4.3\n---------------\n\nFix to reuse an established WebSocket connection to Jupyter kernel. This should solve s"
  },
  {
    "path": "messages/0.5.0.txt",
    "chars": 2701,
    "preview": "Update in 0.5.0\n---------------\n\nThis is update with big changes. Please read this release note.\nI had tackled with the "
  },
  {
    "path": "messages/0.5.1.txt",
    "chars": 190,
    "preview": "Update in 0.5.1\n---------------\n\nFixed that text data in display_data were not shown as inline output. This has caused p"
  },
  {
    "path": "messages/0.6.0.txt",
    "chars": 446,
    "preview": "Update in 0.6.0\n---------------\n\nThis release adds many quality of life features and fixes some bugs:\n\n- control the siz"
  },
  {
    "path": "messages/0.6.1.txt",
    "chars": 65,
    "preview": "Update in 0.6.1\n---------------\n\n- added package control message\n"
  },
  {
    "path": "messages/0.6.2.txt",
    "chars": 124,
    "preview": "Update 0.6.2\n------------\n\n- fixed a bug where ST4 uses python 3.8 instead of python 3.3. Thanks to walterm128 for the f"
  },
  {
    "path": "messages/0.6.3.txt",
    "chars": 55,
    "preview": "Update 0.6.2\n------------\n\n- updated internal packages\n"
  },
  {
    "path": "messages.json",
    "chars": 556,
    "preview": "{\n    \"install\": \"README.md\",\n    \"0.3.1\": \"messages/0.3.1.txt\",\n    \"0.3.2\": \"messages/0.3.2.txt\",\n    \"0.3.3\": \"messag"
  },
  {
    "path": "pyproject.toml",
    "chars": 1093,
    "preview": "[tool.poetry]\nname = \"Helium\"\nversion = \"0.6.0\"\ndescription = \"Let Sublime Text 3 talk with Jupyter.\"\nauthors = [\"Ben Fe"
  },
  {
    "path": "tests/_helpers.py",
    "chars": 912,
    "preview": "import sublime\n\nfrom unittest import TestCase\n\n\nclass ViewTestCase(TestCase):\n    \"\"\"Providing basic functionality for t"
  },
  {
    "path": "tests/test_cell_handling.py",
    "chars": 2226,
    "preview": "import sublime\n\nfrom _helpers import ViewTestCase\n\nvalid_delimiters = (\n    # %% pattern\n    \"#%%\",\n    \"# %%\",\n    # `i"
  },
  {
    "path": "tests/test_tests_running.py",
    "chars": 188,
    "preview": "import unittest\n\n\nclass TestThatTestsAreRunning(unittest.TestCase):\n    def test_that_never_fails(self):\n        \"\"\"Chec"
  }
]

About this extraction

This page contains the full source code of the ngr-t/SublimeHermes GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 114 files (624.0 KB), approximately 148.4k tokens, and a symbol index with 1072 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!