Exemplo n.º 1
0
    def populateYorN(self,symbolList,ID_NameKey,freq):
        print()
        print('Populate SQL Table for: ')
        # print('SS: ',self.symbol)
        for i in self.symbolList:
            print(i.upper())
        populateSQL = input("Enter 'y' for yes or anything else for 'no': ")
        print()

        if populateSQL == 'y':
            createOrExisting = input("Create new table('newyesnew') or update existing ('u')? ")
            if createOrExisting == 'newyesnew' or createOrExisting == 'u':
                import stkSQLFill1
                stkSQLFill1.main(self.symbolList,createOrExisting,ID_NameKey,freq)
            else:
                print()
                print("'{0}' is an incorrect entry. Try again".format(createOrExisting))
                print()
                return False
        else:
            return
Exemplo n.º 2
0
    def populateYorN(self,symbolList):
        counter = 1
        print()
        print('Populate {} SQL Table for: '.format(self.freq))
        for i in self.validSymbols:
            print("{0}: {1}".format(counter,i))
            counter += 1

        populateSQL = input("Enter 'y' for yes or anything else for 'no': ")
        print()

        if populateSQL == 'y':
            createOrExisting = input("Create new table('newyesnew') or update existing ('u')? ")
            if createOrExisting == 'newyesnew' or createOrExisting == 'u':
                import stkSQLFill1
                # print("sssL: ",self.validSymbols)
                stkSQLFill1.main(self.validSymbols,createOrExisting,99,self.freq)
            else:
                print()
                print("'{0}' is an incorrect entry. Try again".format(createOrExisting))
                print()
                return False
        else:
            return
Exemplo n.º 3
0
    def populateYorN(self, symbolList, ID_NameKey, freq):
        print()
        print('Populate SQL Table for: ')
        # print('SS: ',self.symbol)
        for i in self.symbolList:
            print(i.upper())
        populateSQL = input("Enter 'y' for yes or anything else for 'no': ")
        print()

        if populateSQL == 'y':
            createOrExisting = input(
                "Create new table('newyesnew') or update existing ('u')? ")
            if createOrExisting == 'newyesnew' or createOrExisting == 'u':
                import stkSQLFill1
                stkSQLFill1.main(self.symbolList, createOrExisting, ID_NameKey,
                                 freq)
            else:
                print()
                print("'{0}' is an incorrect entry. Try again".format(
                    createOrExisting))
                print()
                return False
        else:
            return