[Tutor] easygui
Mats Wichmann
mats at wichmann.us
Sun Aug 27 09:18:03 EDT 2017
On 08/27/2017 02:14 AM, Alan Gauld via Tutor wrote:
> On 27/08/17 03:07, 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.
>
> I'm not sure what the current status of easygui is, I read
> somewhere that it had been discontinued. But if you are
> still finding a download for 2.7 then it should
> presumably work... Ok, I see that the code is still
> available, and being Tkinter based should still work
> but the project was frozen in 2013.
>
>> Using Python 2.7 we downloaded easygui and put it in an executable path.
>> Code is:import easyguieasygui.msgbox("Hello there")
>
> The code appears to be mangled by the mail system. I assume you mean
>
> import easygui
> easygui.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,
>
> I assume from the bash reference that you are using either Linux
> or MacOSX?
>
>> script.py: line 2: syntax error near unexpected token '"Hello there"
>> 'script.py: line 2: 'easygui.msgbox("Hello there")'
>
> How exactly are you running the program?
> The message format does not look like a normal Python
> traceback message.
Indeed, that's an error from bash running the script, not Python.
If you're on Linux (or Mac), and your script is named example.py, run it as:
python example.py
or perhaps less intuitively, stick a first line in it to tell the system
to have Python run it, so your script looks like this (there are
possible variants on that magic first line, but this one should work
whichever your platform is, as long as it is the first line):
#!/usr/bin/env python
import easygui
easygui.msgbox("Hello there")
and you can then run the script directly.
More information about the Tutor
mailing list