from Hydra.widgets.Messagebox import MessageBox, NewProject from Hydra.utils.config import config_reader, config_choice, LOCATION from Hydra.widgets.Tabs import Tabs from Hydra.utils.last_open_file import update_previous_file, get_last_file from Hydra.widgets.Content import Content from Hydra.widgets.Image import Image from Hydra.widgets.Events import DeadCodeCheker from Hydra.utils.find_utility import DocumentSearch from Hydra.widgets.SaveFile import SaveFile from Hydra.widgets.Label import StatusLabel from Hydra.widgets.Browser import Browser from Hydra.resources.materialblack import material_blue from Hydra.utils.check_update import show_update, make_decision import shutil configs = [config_reader(0), config_reader(1), config_reader(2)] with open(LOCATION + "default.json") as choice: choiceIndex = int(choice.read()) # os.environ["PYTHONUNBUFFERED"] = "1" # This is just an environment variable that PyCharm uses class Main(QMainWindow): def __init__(self, app, palette, editor, parent=None): super().__init__(parent) self.editor = editor # Current config chosen (can be one of 3 config<N>.json) self.onStart(choiceIndex) # Initializing config options self.status = QStatusBar( self
from PyQt5.QtGui import ( QSyntaxHighlighter, QTextCharFormat, QColor, QFont, QTextCursor, QTextLayout, QTextBlock, ) from PyQt5.QtCore import QRegExp, QObject, QPoint, pyqtSignal import keyword from Hydra.utils.config import config_reader, LOCATION from Hydra.utils.find_utility import find_all config0 = config_reader(0) config1 = config_reader(1) config2 = config_reader(2) with open(LOCATION + "default.json") as choice: choiceIndex = int(choice.read()) if choiceIndex == 0: editor = config0["editor"] elif choiceIndex == 1: editor = config1["editor"] elif choiceIndex == 2: editor = config2["editor"] else: editor = config0["editor"]