def main(): os.chdir(sys.path[0]) conf = xml.etree.ElementTree.parse("resources/conf.xml") state = conf.findtext("program") if state == "0": source.main() elif state == "1": source2.main() elif state == "2": source2_2.main()
extract.main.go(gamedata) clean.main.go(gamedata, dbobj) load.main.go(gamedata, dbobj) afterclean2.main.go(gamedata, dbobj) tomorrow = dt + datetime.timedelta(days=1) time_elapsed = "Total time: %.2f sec" % (time.time() - step_time) logging.info(time_elapsed) def main(): files = [] try: dt = sys.argv[1] dt = datetime.date(*map(int,dt.split('-'))) if len(sys.argv) > 2: files = sys.argv[2:] except: dt = datetime.date.today() - datetime.timedelta(days=1) print dt getAll(dt,files) if __name__ == '__main__': main()
import source # Access the source source.main() # and execute main. #################### # source/__init__.py #################### import tkinter, time, os, sys, test.support import xml.sax._exceptions from tkinter import Label, Frame, LabelFrame, Entry, Button from tkinter.filedialog import askopenfilename from tkinter.messagebox import showinfo, showwarning, showerror from . import exe_queue, gui_logs, splash, teach_me, testbank ################################################################################ def main(): with test.support.captured_output('stderr') as stderr: tkinter.NoDefaultRoot() root = tkinter.Tk() with splash.Splash(root, 'images//QuizMe Logo.gif', 3): # Set up the root window. root.title('QuizMe 2.5') root.resizable(False, False) root.wm_iconbitmap(default='images//Icon.ico') # Create the program GUI. application = QuizMe(root) application.grid()
import source # Access the source source.main() # and execute main. #################### # source/__init__.py #################### import tkinter, time, os, sys, test.support import xml.sax._exceptions from tkinter import Label, Frame, LabelFrame, Entry, Button from tkinter.filedialog import askopenfilename from tkinter.messagebox import showinfo, showwarning, showerror from . import exe_queue, gui_logs, splash, teach_me, testbank ################################################################################ def main(): with test.support.captured_output('stderr') as stderr: tkinter.NoDefaultRoot() root = tkinter.Tk() with splash.Splash(root, 'images//QuizMe Logo.gif', 3): # Set up the root window. root.title('QuizMe 2.5') root.resizable(False, False) root.wm_iconbitmap(default='images//Icon.ico') # Create the program GUI. application = QuizMe(root) application.grid() mainloop(root)
# if len(sys.argv) > 2: # files = sys.argv[2:] # except: # dt = datetime.date.today() - datetime.timedelta(days=1) # from wikipedia, all days to the basketball season over the last 3 years # dts = [[(2011,1,24),(2011,6,12)],[(2011,12,25),(2012,06,21)],[(2012,10,30),(2013,06,20)]] dts = [[(2010,10,26),(2011,4,16)]] for dt_set in dts: start_date = dt_set[0] end_date = dt_set[1] # convert to a date object so we can just print them out each date d1 = datetime.date(start_date[0],start_date[1],start_date[2]) d2 = datetime.date(end_date[0],end_date[1],end_date[2]) # make a list of the dates list_of_dates = [d1 + datetime.timedelta(days=x) for x in range((d2-d1).days + 1)] # for each day, run scrape for all the basketball data!! for dt in list_of_dates: print dt scrapeDailyAuto(dt, files) if __name__ == '__main__': main()
#Second Thought import source source.main()
def main(): source.main()