Example #1
0
 def Update(self, event, region):
     fetchData(1, str(self.fetch_region_numb(region)))
Example #2
0
        settings = settings_file.readline()
        settings_file.close()
        settings = settings.replace("[","")
        settings = settings.replace("]","")
        settings = settings.replace(" ","")
        settings = settings.replace("'","")
        settings_list = settings.split(",")
        return settings_list
        
        
        
            
    
 
 
# Run the program
if __name__ == "__main__":
    app = wx.App(False)
    importedData = fetchData(0, "")
    if importedData == -1:
        warn = wx.MessageDialog(None, "You must be connected to the internet to initialize \nthis program for the first time.", 'Error Code: 1', wx.OK)
        ret = warn.ShowModal()
    elif importedData == -2:
        warn = wx.MessageDialog(None, "pulledvals.dat file has been corrupted.  Delete the file and\nrun the program again while connected to the internet.", 'Error Code: 2', wx.OK)
        ret = warn.ShowModal()
    else:
        frame = MyForm()
        frame.Show()
        app.MainLoop()