On 08/26/2017 07:07 PM, George Sconyers via Tutor wrote:
Hello all. Need some help with easygui which my son is trying to run for a book 
he is working in. Using Python 2.7 we downloaded easygui and put it in an 
executable path.
Code is:import easyguieasygui.msgbox("Hello there")
No popup occurs, cusor changes to a cross and no longer process mouse clicks. 
When we click on the bash shell the program terminates, cursor returns to 
normal, and the following error is delivered:
script.py: line 2: syntax error near unexpected token  '"Hello there"'script.py: line 2: 
'easygui.msgbox("Hello there")'
We also tried:import easyguimsgbox("Hello there")
Returns the error message:script.py: line 2: syntax error near unexpected token  '"Hello 
there"'script.py: line 2: 'msgbox("Hello there")'
Checked on "easygui. sourceforge. net/tutorial.html#msgbox" and it appears I am 
using the correct syntax. Probably a stupid mistake but I am stumped.
ThanksGeorge

Sent from Yahoo Mail for iPhone
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


I tried it on Ubuntu 16.04 using python 2.7 and easygui version .96-3.

It worked for me using the following code in idle but should also work in the python interpreter shell:

Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "copyright", "credits" or "license()" for more information.
>>> import easygui
>>> easygui.msgbox("Hello There")
'OK'
>>>

A popup box came up and I could press OK in the box and the box would disappear.

I wonder if you are running this in a text only environment and that is why the box is not showing up.

I am still a newbie when it comes to programming but I am willing to help if I can.

Good luck George,

Eric

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to