Question

The following code gives me an error.

import easygui
result = easygui.enterbox(message="Enter your name", title="Name query", argDefaultText="Ian Ozsvald")

This is the error.

Traceback (most recent call last): File "/Volumes/CHROME USB/STORAGE/TKinker GUI/easygui inputbox.py", line 2, in result = easygui.enterbox(message="Enter your name", title="Name query", argDefaultText="Ian Ozsvald") TypeError: enterbox() got an unexpected keyword argument 'message'

I'm running Python 2.5 on OS X Snow Leopard.

Was it helpful?

Solution

easygui.enterbox has no argument message, nor argDefaultText.

What you want is:

import easygui
result = easygui.enterbox(msg='Enter your name', title='Name query', default='Ian Ozsvald')

The signature of the enterbox function can be found here:

http://easygui.sourceforge.net/download/version0.95/pydoc/easygui.html#-enterbox

alternate link http://www.ferg.org/easygui/easygui.html#-enterbox

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top