Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/nbconvert/exporters/python.py: 80%
10 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-01 06:54 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-01 06:54 +0000
1"""Python script Exporter class"""
3# Copyright (c) Jupyter Development Team.
4# Distributed under the terms of the Modified BSD License.
6from traitlets import default
8from .templateexporter import TemplateExporter
11class PythonExporter(TemplateExporter):
12 """
13 Exports a Python code file.
14 Note that the file produced will have a shebang of '#!/usr/bin/env python'
15 regardless of the actual python version used in the notebook.
16 """
18 @default("file_extension")
19 def _file_extension_default(self):
20 return ".py"
22 @default("template_name")
23 def _template_name_default(self):
24 return "python"
26 output_mimetype = "text/x-python"