+ # function to set the status message of the required additional files to be copied to
+ # the destination directory. If any required additional file is missing in the script
+ # path then warn the user to copy those files manually to the destination directory
+ def set_required_files_status (self):
+ search_script_path = os.path.join (sys.path[0], "search.py")
+ star_image_path = os.path.join (sys.path[0], "star.gif")
+ stargrey_image_path = os.path.join (sys.path[0], "star-grey.gif")
+
+ # if search.py exists in script directory
+ if os.path.exists (search_script_path):
+ self.status_search_py.setText ('<span style="color:darkgreen;">will be \
+ automatically copied to destination dir</span>')
+ else:
+ self.status_search_py.setText ('<span style="color:darkred;">cannot be found.\
+ You must copy it manually to cgi-bin</span>')
+
+ # if star.gif exists in script directory
+ if os.path.exists (star_image_path):
+ self.status_star_gif.setText ('<span style="color:darkgreen;">will be \
+ automatically copied to destination dir</span>')
+ else:
+ self.status_star_gif.setText ('<span style="color:darkred;">Cannot be found. \
+ You must copy it manually to destination dir</span')
+
+ # if star-grey.gif exists in script directory
+ if os.path.exists (stargrey_image_path):
+ self.status_stargrey_gif.setText ('<span style="color:darkgreen;">will be \
+ automatically copied to destination dir</span>')
+ else:
+ self.status_stargrey_gif.setText ('<span style="color:darkred;">cannot be found. \
+ You must copy it manually to destination dir</span')
+