""" Module classes for Scan and Sessions """ import os import shutil import smtplib import logging import XnatUtils from datetime import datetime from email.mime.text import MIMEText from dax_settings import DAX_Settings DAX_SETTINGS = DAX_Settings() SMTP_HOST = DAX_SETTINGS.get_smtp_host() SMTP_FROM = DAX_SETTINGS.get_smtp_from() SMTP_PASS = DAX_SETTINGS.get_smtp_pass() #Logger for logs LOGGER = logging.getLogger('dax') class Module(object): """ Object Module to create a module for DAX Module runs directly during a build on a session or scan to generate inputs data for scans/sessions """ def __init__(self, mod_name, directory, email, text_report): """ Entry point of the Base Module Class. :param mod_name: Name of the module :param directory: Temp directory to store data :param email: email address to send report :param text_report: string to write at the beggining of the report email :return: None """