Q:

Tkinter entry boxes

I need to count from a starting input value to an ending value using tkinter entry boxes but the 2 output files are blank except for brackets and I know that the csv outputs work it's just getting the user input that is the issue. Thanks for any help.
There is the current code.
import csv
from tkinter import *

# Variables/Arrays
oddArray = []
evenArray = []

def main():
    for i in range(oute1, oute2):
        x = i
        # Odds
        if(x % 2 == 1):
            oddArray.append(x)
        # Evens
        elif(x % 2 == 0):
            evenArray.append(x)

    with open("odd_labels", "w") as outputFile1:
        writer1 = csv.writer(outputFile1)
        writer1.writerow([oddArray])

    with open("even_labels", "w") as outputFile2:
        writer2 = csv.writer(outputFile2)
        writer2.writerow([evenArray])

# gui framework
myGui = Tk()
# myGui.geometry('225x50')
# myGui.title("Label Creator")

Label(myGui, text="Starting value: ").grid(row=0)
Label(myGui, text="Ending value: ").grid(row=1)

a = IntVar()
b = IntVar()

e1 = Entry(myGui, textvariable=a).grid(row=0, column=1)
e2 = Entry(myGui, textvariable=b).grid(row=1, column=1)

oute1 = a.get()
oute2 = b.get()

Button(myGui, text="Start", command=main).grid(row=3)

myGui.mainloop()

A:

The problem is how you create your entry fields.
When you use the grid manager at the end of a widget creation then you are unable to use .get() on it because the grid manager is returning None. To avoid this you need to make sure you create your widget first then define where it goes on a separate line.
Change:
e1 = Entry(myGui, textvariable=a).grid(row=0, column=1)
e2 = Entry(myGui, textvariable=b).grid(row=1, column=1)

to:
e1 = Entry(myGui, textvariable=a)
e1.grid(row=0, column=1)
e2 = Entry(myGui, textvariable=b)
e2.grid(row=1, column=1)

I notived your oute1 and oute2 are both only created on the start of the program. You need to move them into a function and it should work fine in your main function.
Try this:
import csv
from tkinter import *

myGui = Tk()

oddArray = []
evenArray = []

Label(myGui, text="Starting value: ").grid(row=0)
Label(myGui, text="Ending value: ").grid(row=1)

a = IntVar()
b = IntVar()

e1 = Entry(myGui, textvariable=a)
e1.grid(row=0, column=1)
e2 = Entry(myGui, textvariable=b)
e2.grid(row=1, column=1)

def main():
    oute1 = a.get()
    oute2 = b.get()
    for i in range(oute1, oute2):
        x = i
        # Odds
        if(x % 2 == 1):
            oddArray.append(x)
        # Evens
        elif(x % 2 == 0):
            evenArray.append(x)

    with open("odd_labels", "w") as outputFile1:
        writer1 = csv.writer(outputFile1)
        writer1.writerow([oddArray])

    with open("even_labels", "w") as outputFile2:
        writer2 = csv.writer(outputFile2)
        writer2.writerow([evenArray])

Button(myGui, text="Start", command=main).grid(row=3)

myGui.mainloop()

