[Tutor] easygui

Peter Otten __peter__ at web.de
Tue Aug 29 02:45:56 EDT 2017


Alex Kleider wrote:

> On 2017-08-27 07:18, Mats Wichmann wrote:
>> 
>> 
>> 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.
>> 
> 
> ... After first adjusting permissions:
> 
> $ chmod 755 example,py

The OP already did that. That's why he accidentally ran 'import' rather than 
importing easygui.

$ man import
...
       import - saves any visible window on an X server and outputs it as an 
image file. You can capture a single window, the entire screen, or any 
rectangular portion of the screen.
...

The screenshot will land in a file called easygui.



More information about the Tutor mailing list