summaryrefslogtreecommitdiff
path: root/src/main/python/utils/app.py
diff options
context:
space:
mode:
authorpravindalve2020-05-28 15:00:10 +0530
committerGitHub2020-05-28 15:00:10 +0530
commitac63205a7d02185f4a917db74bf0964691bf20ea (patch)
tree5d6828cd4df3631a208c0230aae1f2f63684243b /src/main/python/utils/app.py
parenteeb7908613b11a056885fe3944242b988b898ea4 (diff)
parent9b98d22ee18628f2ef51a65ec8aff2707e991281 (diff)
downloadChemical-PFD-ac63205a7d02185f4a917db74bf0964691bf20ea.tar.gz
Chemical-PFD-ac63205a7d02185f4a917db74bf0964691bf20ea.tar.bz2
Chemical-PFD-ac63205a7d02185f4a917db74bf0964691bf20ea.zip
Merge pull request #4 from Blakeinstein/master
Diffstat (limited to 'src/main/python/utils/app.py')
-rw-r--r--src/main/python/utils/app.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/python/utils/app.py b/src/main/python/utils/app.py
new file mode 100644
index 0000000..4540a43
--- /dev/null
+++ b/src/main/python/utils/app.py
@@ -0,0 +1,10 @@
+"""
+Declare fbs application so that it can be imported in other modules.
+"""
+
+from fbs_runtime.application_context.PyQt5 import ApplicationContext
+app = ApplicationContext()
+
+def fileImporter(file):
+ # Helper function to fetch files from src/main/resources
+ return app.get_resource(file)