A web scraper build to search specific information for a given compound (and its pseudonyms)

Create the GUI configuration if not yet existent

+7
+7
GUI/gui.py
··· 1 1 from Tkinter import * 2 2 import os 3 + import shutil 3 4 from tkFileDialog import asksaveasfilename 4 5 5 6 from configImporter import * ··· 11 12 if not in_source: 12 13 current_dir = os.path.dirname(os.path.abspath(__file__)) 13 14 config_file = current_dir + '../' + config_file 15 + if not os.path.isfile(config_file): 16 + try: 17 + shutil.copyfile(os.path.dirname(os.path.abspath(__file__)) + "/../GUI.cfg.sample", config_file) 18 + except IOError: 19 + print "GUI configuration couldn't be found and couldn't be created." 20 + sys.exit() 14 21 self.configurator = ConfigImporter(config_file) 15 22 self.sourceloader = sourceloader 16 23 self.finish_with_search = False