from tkinter import *

def runSimplex():
    global e
    string = e.get()
    print(string)
    global TextArea
    dasinput = TextArea.get("0.0",END)
    print(dasinput)

root = Tk()

root.title('Name')

# label above the screen that asks for info
Label(root, text="Input the objective function typing variables x1,x2,...:").pack(side=TOP, padx=15, pady=10)

# Radio button to capture the max, min option
var = IntVar()
for text, value in [('Minimize', 1), ('Maximize', 2)]:
    Radiobutton(root, text=text, value=value, variable=var).pack(anchor=W)
var.set(1)

# Entry that gets the input
e = StringVar()
e = Entry(root, width=40)
e.pack()
e.focus_set()

# label above the screen that asks for info
Label(root, text="Type your constraints below:").pack(side=TOP, padx=15, pady=10)

# Entry that gets the constraints
# Entry that gets the input
cs = StringVar()
#text = Text(root, height=10, width=50)
#text.pack()

TextArea = Text()
ScrollBar = Scrollbar(root)
ScrollBar.config(command=TextArea.yview)
TextArea.config(yscrollcommand=ScrollBar.set)
ScrollBar.pack(side=RIGHT, fill=Y)
TextArea.pack(expand=YES, fill=BOTH)


b = Button(root,text='Run Simplex',command=runSimplex)
b.pack(side='bottom')
root.mainloop()

@@ -14,16 +14,43 @@
 import *
+%0Aimport ast as cp%0Aimport re
 %0A%0Adef ru
@@ -105,16 +105,47 @@
   print(
+'objective function entered:', 
 string)%0A
@@ -213,23 +213,213 @@
   print(
-dasinpu
+'constraints as entered:', dasinput)%0A    parseobjective(string)%0A%0Adef parseobjective(obje):%0A    newstr = re.sub('%5B* _%5D', '', obje)%0A    tokenresult = re.split(%22(%5B+-/*%5D)%22, newstr)%0A    print(tokenresul
 t)%0A%0Aroot
@@ -1366,16 +1366,17 @@
 BOTH)%0A%0A%0A
+%0A
 b = Butt

I did split the term into tokens using mathematical operators as delimiters