From f921be2ee18314def95138929bc1a39b834f21b0 Mon Sep 17 00:00:00 2001
From: Alan De Smet <alan.desmet@ssec.wisc.edu>
Date: Thu, 14 Jul 2016 16:12:04 -0500
Subject: [PATCH] Can specify files to load in gui on command line

If present, the first one or two arguments to "glance gui" will be automatically loaded as File A and File B.
---
 pyglance/glance/compare.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pyglance/glance/compare.py b/pyglance/glance/compare.py
index b1ab3dc..a0cb766 100644
--- a/pyglance/glance/compare.py
+++ b/pyglance/glance/compare.py
@@ -40,6 +40,7 @@ from glance.util        import clean_path, rsync_or_copy_files, get_glance_versi
 from glance.load        import get_UV_info_from_magnitude_direction_info, load_variable_data, open_and_process_files, handle_lon_lat_info, handle_lon_lat_info_for_one_file
 from glance.lonlat_util import VariableComparisonError
 from glance.constants   import *
+from glance.gui_constants import A_CONST, B_CONST
 
 LOG = logging.getLogger(__name__)
 
@@ -1444,6 +1445,10 @@ glance inspectStats A.hdf
         
         LOG.debug("Launching Glance GUI")
         temp_controller = gui_control.GlanceGUIController(get_glance_version_string())
+        if len(args) >= 1:
+            temp_controller.newFileSelected(A_CONST, args[0])
+        if len(args) >= 2:
+            temp_controller.newFileSelected(B_CONST, args[1])
         temp_controller.launch_gui()
     
     def help(command=None):
-- 
GitLab