File: __init__.py

package info (click to toggle)
python-pweave 0.30.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,068 kB
  • sloc: python: 30,281; makefile: 167
file content (15 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from . jupyter import JupyterProcessor, IPythonProcessor

class PwebProcessors(object):
    """Lists available input formats"""
    formats = {'python': {'class': IPythonProcessor,
                          'description': 'Python shell'},
               'jupyter': {'class': JupyterProcessor,
                          'description': 'Run code using Jupyter client'}}

    @classmethod
    def getprocessor(cls, kernel):
        if "python" in kernel:
            return IPythonProcessor
        else:
            return JupyterProcessor