Changeset 2484 for palm/trunk/SCRIPTS
- Timestamp:
- Sep 20, 2017 2:22:42 PM (7 years ago)
- Location:
- palm/trunk/SCRIPTS
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palm_jm
r2068 r2484 16 16 # 17 17 # Copyright 1997-2016 Leibniz Universitaet Hannover 18 # --------------------------------------------------------------------------------#18 ##--------------------------------------------------------------------------------# 19 19 # 20 20 # Current revisions: … … 25 25 # ----------------- 26 26 # $Id$ 27 # Adapted for palmrun with USER_CODE always stored under /JOBS/name/USER_CODE/. 28 # Added PALM logo 29 # 30 # 2068 2016-11-11 21:59:39Z maronga 27 31 # 28 32 # 2067 2016-11-11 21:55:49Z maronga … … 68 72 palm_dir = out.split("palm")[0] + "palm/" + out.split("palm")[1].split("/")[1] 69 73 out = None 70 71 # remove this line on release 72 # palm_dir = '/home/maronga/PUB/thinktank/maronga/job_manager' 73 74 74 75 job_dir = palm_dir + '/JOBS' 75 76 user_dir = palm_dir + '/USER_CODE' … … 95 96 # Load predefined mainwindow 96 97 uic.loadUi(palm_bin + '/palm_jm_files/palm_jm.ui', self) 98 99 self.palm_logo.setPixmap(QtGui.QPixmap(palm_dir + "/trunk/SCRIPTS/palmrungui_files/logo.png")) 100 101 97 102 98 103 # Display MainWindow … … 100 105 QtGui.QApplication.processEvents() 101 106 102 self.load_jobs()107 #self.load_jobs() 103 108 104 109 … … 149 154 self.list_input.addItem(str(list_of_files[i])) 150 155 151 job_to_show = user_dir + "/" + self.list_jobs.currentItem().text()156 job_to_show = job_dir + "/" + self.list_jobs.currentItem().text() + "/USER_CODE" 152 157 153 158 if ( os.path.isdir(job_to_show) ): … … 199 204 shutil.copy(tmp_file, new_file) 200 205 201 # copy and rename user code (if present) 202 user_code_to_copy = user_dir + "/" + old_job_name 203 new_user_code_dir = user_dir + "/" + new_job_name 204 205 # check if a job exists with the new job name 206 if ( os.path.isdir(new_user_code_dir) ): 207 notify = QtGui.QMessageBox.warning(self,'Create new user code directory',"Error. Could not create user code directory. A user code directory with the new name already exists.") 206 207 208 209 new_user_dir = job_dir + "/" + new_job_name + "/USER_CODE" 210 211 # check if user code exists in the new job directory 212 if ( os.path.isdir(new_user_dir) ): 213 notify = QtGui.QMessageBox.warning(self,'Create new user code directory',"Error. Could not create user code directory. A user code directiory with the new name already exists.") 208 214 self.setEnabled(True) 209 215 return 210 216 else: 211 os.makedirs(new_user_code_dir) 212 213 if ( os.path.isdir(user_code_to_copy) ): 214 215 list_of_files = os.listdir(user_code_to_copy) 217 os.makedirs(new_user_dir) 218 219 220 # copy user code files (if present) 221 user_to_copy = job_dir + "/" + old_job_name + "/USER_CODE" 222 223 if ( os.path.isdir(user_to_copy) ): 224 225 list_of_files = os.listdir(user_to_copy) 216 226 217 227 for i in range(0,len(list_of_files)): 218 228 219 tmp_file = user_ code_to_copy + "/" + list_of_files[i]220 new_file = new_user_ code_dir + "/" + list_of_files[i]229 tmp_file = user_to_copy + "/" + list_of_files[i] 230 new_file = new_user_dir + "/" + list_of_files[i] 221 231 shutil.copy(tmp_file, new_file) 222 232 … … 269 279 shutil.copy(tmp_file, new_file) 270 280 271 # copy and rename user code (if present) 272 user_code_to_copy = user_dir + "/" + old_job_name 273 new_user_code_dir = user_dir + "/" + new_job_name 274 275 # check if a job exists with the new job name 276 if ( os.path.isdir(new_user_code_dir) ): 277 notify = QtGui.QMessageBox.warning(self,'Create new user code directory',"Error. Could not create user code directory. A user code directory with the new name already exists.") 278 self.setEnabled(True) 279 return 281 282 new_user_dir = job_dir + "/" + new_job_name + "/USER_CODE" 283 284 # check if user code exists in the new job directory 285 if ( os.path.isdir(new_user_dir) ): 286 notify = QtGui.QMessageBox.warning(self,'Create new user code directory',"Error. Could not create user code directory. A user code directiory with the new name already exists.") 287 self.setEnabled(True) 288 return 280 289 else: 281 os.makedirs(new_user_code_dir) 282 283 if ( os.path.isdir(user_code_to_copy) ): 284 285 list_of_files = os.listdir(user_code_to_copy) 290 os.makedirs(new_user_dir) 291 292 293 # copy user code files (if present) 294 user_to_copy = job_dir + "/" + old_job_name + "/USER_CODE" 295 296 if ( os.path.isdir(user_to_copy) ): 297 298 list_of_files = os.listdir(user_to_copy) 286 299 287 300 for i in range(0,len(list_of_files)): 288 301 289 tmp_file = user_ code_to_copy + "/" + list_of_files[i]290 new_file = new_user_ code_dir + "/" + list_of_files[i]302 tmp_file = user_to_copy + "/" + list_of_files[i] 303 new_file = new_user_dir + "/" + list_of_files[i] 291 304 shutil.copy(tmp_file, new_file) 292 305 … … 345 358 sel_files = self.list_user.selectedItems() 346 359 347 input_dir = user_dir + "/" + sel_job + "/"360 input_dir = job_dir + "/" + sel_job + "/USER_CODE/" 348 361 349 362 open_files = "" -
palm/trunk/SCRIPTS/palm_jm_files/palm_jm.ui
r2065 r2484 198 198 </property> 199 199 </widget> 200 <widget class="QLabel" name="palm_logo"> 201 <property name="geometry"> 202 <rect> 203 <x>630</x> 204 <y>340</y> 205 <width>79</width> 206 <height>72</height> 207 </rect> 208 </property> 209 <property name="text"> 210 <string/> 211 </property> 212 <property name="pixmap"> 213 <pixmap>../../../../nesting_version/trunk/SCRIPTS/palm_jm_files/palm_logo_black_and_blue.png</pixmap> 214 </property> 215 <property name="scaledContents"> 216 <bool>true</bool> 217 </property> 218 </widget> 200 219 </widget> 201 220 <widget class="QMenuBar" name="menubar"> -
palm/trunk/SCRIPTS/palmrungui.py
r2480 r2484 25 25 # ----------------- 26 26 # $Id$ 27 # Added PALM logo 28 # 29 # 2480 2017-09-19 06:24:14Z maronga 27 30 # option -A (project account number) added 28 31 # … … 93 96 def __init__(self, parent=None): 94 97 super(Mainwindow, self).__init__() 95 96 98 self.setupUi(self) 99 100 self.palm_logo.setPixmap(QtGui.QPixmap(palm_dir + "/trunk/SCRIPTS/palmrungui_files/logo.png")) 101 97 102 self.recent_jobs(50) 98 103 commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline") … … 100 105 101 106 self.tabWidget.setCurrentIndex(0) 107 102 108 103 109 filename = "%s/.palmrun.gui.default" % (version_path) … … 842 848 ############################## 843 849 def setup_gui(self, palmrun_str): 850 851 self.palm_logo.setPixmap(QtGui.QPixmap(palm_dir + "/trunk/SCRIPTS/palmrungui_files/logo.png")) 852 844 853 # Some initial settings 845 854 user = "" -
palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui
r2480 r2484 202 202 <x>0</x> 203 203 <y>0</y> 204 <width>5 41</width>205 <height> 331</height>204 <width>571</width> 205 <height>296</height> 206 206 </rect> 207 207 </property> … … 341 341 <x>320</x> 342 342 <y>0</y> 343 <width>2 01</width>343 <width>251</width> 344 344 <height>281</height> 345 345 </rect> … … 490 490 <x>0</x> 491 491 <y>305</y> 492 <width> 581</width>492 <width>431</width> 493 493 <height>206</height> 494 494 </rect> … … 685 685 <x>10</x> 686 686 <y>105</y> 687 <width> 561</width>687 <width>431</width> 688 688 <height>20</height> 689 689 </rect> … … 767 767 </property> 768 768 </widget> 769 </widget> 770 <widget class="QLabel" name="palm_logo"> 771 <property name="geometry"> 772 <rect> 773 <x>490</x> 774 <y>440</y> 775 <width>77</width> 776 <height>72</height> 777 </rect> 778 </property> 779 <property name="text"> 780 <string>TextLabel</string> 781 </property> 782 <property name="scaledContents"> 783 <bool>true</bool> 784 </property> 769 785 </widget> 770 786 </widget>
Note: See TracChangeset
for help on using the changeset viewer.