File: python_file_generator.py

package info (click to toggle)
jschema-to-python 1.2.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 136 kB
  • sloc: python: 392; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 500 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os

from jschema_to_python import __version__


class PythonFileGenerator(object):
    def __init__(self, output_directory):
        self.output_directory = output_directory

    def write_generation_comment(self):
        print(
            "# This file was generated by "
            + __package__
            + " version "
            + __version__
            + ".\n"
        )

    def make_output_file_path(self, file_name):
        return os.path.join(self.output_directory, file_name)