<commit_before>###########################################################
#
# Copyright (c) 2005, Southpaw Technology
#                     All Rights Reserved
#
# PROPRIETARY INFORMATION.  This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permission.
#
#
#

__all__ = ["EnvironmentException", "Environment"]

import tacticenv

import sys, os

from common import *
from container import *
from base import *
from config import *
from system import *
from common_exception import TacticWarning, TacticException

class EnvironmentException(Exception):
    pass


class Environment(Base):
    """class which encapsulates the environment the framework is running<commit_msg>BRANCH 4.1: made python tempfile write to tactic_temp rather than /tmp<commit_after>###########################################################
#
# Copyright (c) 2005, Southpaw Technology
#                     All Rights Reserved
#
# PROPRIETARY INFORMATION.  This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permission.
#
#
#

__all__ = ["EnvironmentException", "Environment"]

import tacticenv



import sys, os

from common import *
from container import *
from base import *
from config import *
from system import *
from common_exception import TacticWarning, TacticException

class EnvironmentException(Exception):
    pass


# set the temp dir
import tempfile
tmp_dir = Config.get_value("install", "tmp_dir")
if tmp_dir:
    tempfile.tempdir = "%s/temp" % tmp_dir


class Environment(Base):
    """class which encapsulates the environment the framework is running
{'fraction_non_alphanumeric': 0.13313953488372093, 'fraction_numerical': 0.005813953488372093, 'mean_word_length': 4.775167785234899, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '904776', 'n_tokens_mistral': 457, 'n_tokens_neox': 423, 'n_words': 173}