commit 76dfc3eb55dab8fa7ee720480533bb8c05058906
parent 23605fe6d02bace00abedf9969aa1010cd1d25c3
Author: Erik Letson <hmagellan@hmagellan.com>
Date: Sun, 3 Jan 2021 13:15:07 -0600
skel of app
Diffstat:
4 files changed, 78 insertions(+), 4 deletions(-)
diff --git a/main.py b/main.py
@@ -1,7 +1,9 @@
-import wx
+#!/usr/bin/env python
-app = wx.App()
+from src import opet
-wx.Frame(None, title = "Hello world").Show()
+def main():
+ o = opet.OPET()
-app.MainLoop()
+if __name__ == "__main__":
+ main()
diff --git a/src/filer.py b/src/filer.py
@@ -0,0 +1,21 @@
+import os, json
+
+############
+# filer.py #
+############
+
+# This file contains:
+# 1. The Filer class, which manages any file i/o operations
+
+###########################
+# Section 1 - Filer class #
+###########################
+
+class Filer(object):
+ """
+ The Filer object manages reading from and
+ writing to the various files that OPET uses
+ and/or edits.
+ """
+ def __init__(self, manager):
+ self.manager = manager
diff --git a/src/opet.py b/src/opet.py
@@ -0,0 +1,31 @@
+import wx
+from . import filer, tools
+
+###########
+# opet.py #
+###########
+
+# This file contains:
+# 1. The OPET class, which is the main application object
+
+##########################
+# Section 1 - OPET class #
+##########################
+
+class OPET(object):
+ """
+ OPET is the main application object. It
+ manages the other constituent objects
+ and controls the applications entire
+ operation.
+ """
+ def __init__(self):
+
+ # Various tools
+ self.filer = filer.Filer(self)
+ self.esp_tool = tools.DataPackTool(self)
+
+ # Load up app
+ self.app = wx.App()
+ self.app_frame = wx.Frame(None, title = "OPET").Show()
+ self.app.MainLoop()
diff --git a/src/tools.py b/src/tools.py
@@ -0,0 +1,20 @@
+import os, sys
+
+############
+# tools.py #
+############
+
+# This file contains:
+# 1. Various objects that represent certain functionality of OPET
+
+#####################
+# Section 1 - Tools #
+#####################
+
+class DataPackTool(object):
+ """
+ Encapsulates the functionality of OPET
+ to set .es[p|m] load order and activation.
+ """
+ def __init__(self, manager):
+ self.manager = manager