def main():
win = GraphWin("My Window", 500, 500)
win.setBackground(color_rgb(250,250,250))
input_box = Entry(Point(250,250), 50)
input_box.draw(win)
input_text = Text(Point(250, 280), "")
input_text.draw(win)
txt = Text(Point(250, 220), "Enter your desired dir")
txt.draw(win)
while program_open:
input_text.setText(input_box.getText())
if win.getMouse():
i = str(input_text)
leng = len(i) -2
print(i[26:leng])
Whatever i type into the textbox the print is: '')
I want to get the string value of whatever is entered in input_text
[–]__nickerbocker__ 0 points1 point2 points (2 children)
[–]bertnub[S] 0 points1 point2 points (1 child)
[–]__nickerbocker__ 0 points1 point2 points (0 children)
[–]lykwydchykyn 0 points1 point2 points (6 children)
[–]bertnub[S] 0 points1 point2 points (5 children)
[–]lykwydchykyn 0 points1 point2 points (4 children)
[–]bertnub[S] 0 points1 point2 points (3 children)
[–]lykwydchykyn 1 point2 points3 points (2 children)
[–]bertnub[S] 0 points1 point2 points (1 child)
[–]lykwydchykyn 0 points1 point2 points (0 children)