From: Grant Edwards on
On 2009-12-02, Rounak <irounakjain(a)gmail.com> wrote:
>
>> Python can do anything Applescript can do with the appscript module -
>> see <http://appscript.sourceforge.net/py-appscript/index.html>. And,
>> naturally, very much more.
>
> wait, sorry, i forgot to mention. I am now on Linux. I want to
> know what python can do in Linux.

Python can do pretty much anything except kernel modules.

--
Grant Edwards grante Yow! I want you to MEMORIZE
at the collected poems of
visi.com EDNA ST VINCENT MILLAY
... BACKWARDS!!
From: Rounak on

>
> http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux
>
the first solution in this thread requires python imaging library which
I did find here: http://www.pythonware.com/products/pil/faq.htm
But i would like to know if there are easier ways to install this
instead of compiling it from the source.

From: Diez B. Roggisch on
Rounak wrote:

>
>>
>>
http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux
>>
> the first solution in this thread requires python imaging library which
> I did find here: http://www.pythonware.com/products/pil/faq.htm
> But i would like to know if there are easier ways to install this
> instead of compiling it from the source.

Did you bother checking your distributions package management?

Diez
From: Bruno Desthuilliers on
Rounak a écrit :
>>
>> http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux
>>
> the first solution in this thread requires python imaging library which
> I did find here: http://www.pythonware.com/products/pil/faq.htm
> But i would like to know if there are easier ways to install this
> instead of compiling it from the source.
>

Depends on your linux distro - but PIL is a fairly stable and widely
used lib, so I fail to imagine any modern distro not having a packaged
PIL install (rpm, ebuild, whatever).
From: Rounak on
Thanks Allan, I did find PIL in Synaptic Package Manager and installed
it successfully. However, I cannot use it. The reason is:
1. I had installed python3 using sudo apt-get install python3 but python
2 still remains. And it seems Scite (my python editor) is looking for
python 2.

Terminal Output:
$ python -V
Python 2.6.4
$ python3 -V
Python 3.1.1+

Output from Scite:
>python -u "sshot.py"
Traceback (most recent call last):
File "sshot.py", line 1, in <module>
import ImageGrab
File "/usr/lib/python2.6/dist-packages/PIL/ImageGrab.py", line 34, in
<module>
import _grabscreen
ImportError: No module named _grabscreen
>Exit code: 1

How to make Scite use python3 where it will hopefully find the just
installed PIL.