Is there a way to get functions to interact correctly with easygui integerbox?

12 views Asked by At

When I use easygui.integerbox in a function to define a variable, instead of the variable being an integer, it comes up with 'None' instead when the variable is used in a print(). It also doesn't allow me to have an upperbound higher than 99, even when I change it to upperbound=999.

import easygui

def intpage(content):
easygui.integerbox(content)

num = intpage("number")

print(num)

When I used easygui's enterbox it worked fine, so why not for the integerbox. I can't use the enterbox instead of the integerbox because I need the variable value to be in integer format, and not any other non-integer characters.

import easygui,

def entpage(content):
easygui.enterbox(content)

words = entpage("Words")

print(words)

Does anyone have any ideas as to why this is happening, and any solutions? (Also any ideas on how to properly increase the upperbound would be nice.)>

0

There are 0 answers