コード例 #1
0
 def check_config(self):
     """
     Check if a config file exists, if not, check if one has to be made, if so, do so.
     """
     default_config_file = os.path.join(self.resources_dir, conf.DEFAULT_CONFIG_FILE_NAME)
     if os.path.exists(default_config_file):
         config.make_default_config_file_if_nonexistent(self.name, default_config_file)
コード例 #2
0
#     |  _ \ / \ | | | | |      / \
#     | |_) / _ \| | | | |     / _ \
#     |  __/ ___ \ |_| | |___ / ___ \
#     |_| /_/   \_\___/|_____/_/   \_\
#
#
# Personal
# Artificial
# Unintelligent
# Life
# Assistant
#
##

"""
The config file for this new package
"""

import os

from paula.core import config

DEBUG = True

NEW_PACKAGE_DIR = os.path.dirname(os.path.realpath(__file__))
RESOURCES_DIR = os.path.join(NEW_PACKAGE_DIR, 'resources')
DEFAULT_CONFIG_FILE = os.path.join(RESOURCES_DIR,'default_config_file')
config.make_default_config_file_if_nonexistent(__package__, DEFAULT_CONFIG_FILE)

PAULA_TEXT_FILE = os.path.join(RESOURCES_DIR,'paula_text.paula_says')