Changeset 4393 for palm/trunk/SCRIPTS/palm_jm
- Timestamp:
- Feb 4, 2020 9:24:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palm_jm
r2825 r4393 25 25 # ----------------- 26 26 # $Id$ 27 # Removed PALM_BIN dependency 28 # 29 # 2825 2018-02-20 21:48:27Z maronga 27 30 # Modified header 28 31 # … … 77 80 78 81 82 79 83 # Determine PALM directories 80 84 try: 81 devnull = open(os.devnull, 'w') 82 out = sub.check_output("echo $PALM_BIN", shell=True, stderr=sub.STDOUT) 83 palm_bin = out.rstrip() 84 palm_dir = out.split("palm")[0] + "palm/" + out.split("palm")[1].split("/")[1] 85 out = None 86 85 devnull = open(os.devnull, 'w') 86 palm_dir = os.getcwd() 87 palm_bin = palm_dir + '/trunk/SCRIPTS' 87 88 job_dir = palm_dir + '/JOBS' 88 89 user_dir = palm_dir + '/USER_CODE' 89 90 with open(palm_bin + '/palm_jm', 'r') as fh: 91 # file found 92 out = None 90 93 except: 91 print "Error. $PALM_BIN is not set."94 print ('Error. palm_jm probably called in wrong directory.') 92 95 raise SystemExit 93 94 96 95 97 96 98 # MainWindow class 97 99 class JobManager(QtGui.QMainWindow): 98 100 101 99 102 def __init__(self): 103 100 104 super(JobManager, self).__init__() 101 102 self.InitUi() 103 105 106 self.InitUi() 107 104 108 105 109 # Initialized MainWindow UI 106 110 def InitUi(self): 107 111 112 print(palm_bin + '/palm_jm_files/palm_jm.ui') 113 108 114 # Load predefined mainwindow 109 115 uic.loadUi(palm_bin + '/palm_jm_files/palm_jm.ui', self) 110 116 111 117 self.palm_logo.setPixmap(QtGui.QPixmap(palm_dir + "/trunk/SCRIPTS/palmrungui_files/logo.png")) 112 113 118 114 119 115 120 # Display MainWindow 116 121 self.show() 122 117 123 QtGui.QApplication.processEvents() 118 124 125 119 126 self.load_jobs() 120 127 121 122 128 def update_all(self): 123 129
Note: See TracChangeset
for help on using the changeset viewer.