Exemplo 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.")
Exemplo 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")
Exemplo 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.")
Exemplo 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")