Esempio n. 1
0
def main(argv):

    # Create class object
    #
    myDates = PrimeDates() 

    # Read in file
    #
    myDates.read(argv[1])
    myDates.convert()
    
    # Exit Gracefully
    #
    print("Program Finished successfully.")
Esempio n. 2
0
def main(argv):

    # grab data file from the command line input
    #
    fname = argv[1]

    # instatiate a class
    #
    myObj = PrimeDates()

    # check if file exists
    #
    if os.path.isfile(fname):
        # if file exits, read file
        #
        myObj.read(fname)
        # convert to itegers
        #
        myObj.convert()
    else:
        # print error message
        #
        print("Error: file does not exist")
Esempio n. 3
0
def main(argv):

    # Create class object
    #
    myDates = PrimeDates()

    # Read in file
    #
    myDates.read(argv[1])
    myDates.convert()

    # Exit Gracefully
    #
    print("Program Finished successfully.")
Esempio n. 4
0
def main(argv):

    #grab data file from the command line input
    #
    fname = argv[1]

    #instatiate a class
    #
    myObj = PrimeDates()

    #check if file exists
    #
    if os.path.isfile(fname):
        #if file exits, read file
        #
        myObj.read(fname)
        #convert to itegers
        #
        myObj.convert()
    else:
        #print error message
        #
        print("Error: file does not exist")