can python do this?

2009-12-02 Thread Rounak
I am a complete newbie. I want to know if the following can be done 
using python or should I learn some other language:
(Basically, these are applescripts that I wrote while I used Mac OS)
1.Web Page Image to Wallpaper:
A script that takes the current image in a browser and sets it as a
wallpaper. 
http://forums.obdev.at/viewtopic.php?f=24&t=3462

2.Screenshot with name, format, Dropbox upload and public URL
I used to run this script,type the name for screenshot and press return.
The screenshot would be uploaded to Dropbox and public url would be
copied to clipboard.
http://forums.obdev.at/viewtopic.php?f=24&t=3448

3.Play, pause, set rating to track in iTunes (a music player) with
keyboard shortcuts without activating iTunes. I know there is no iTunes
for Linux but is there a scriptable player. See hundreds of scripts
for iTunes here: http://dougscripts.com/

Thanks.



I am a complete newbie. I want to know if the following can be done 
using python or should I learn some other language:
(Basically, these are applescripts that I wrote while I used Mac OS)
1.Web Page Image to Wallpaper:
A script that takes the current image in a browser and sets it as a
wallpaper. 
http://forums.obdev.at/viewtopic.php?f=24&t=3462

2.Screenshot with name, format, Dropbox upload and public URL
I used to run this script,type the name for screenshot and press return.
The screenshot would be uploaded to Dropbox and public url would be
copied to clipboard.
http://forums.obdev.at/viewtopic.php?f=24&t=3448

3.Play, pause, set rating to track in iTunes (a music player) with
keyboard shortcuts without activating iTunes. I know there is no iTunes
for Linux but is there a scriptable player. See hundreds of scripts
for iTunes here: http://dougscripts.com/

Thanks.






-- 
http://mail.python.org/mailman/listinfo/python-list


Re: can python do this?

2009-12-02 Thread Rounak

> Python can do anything Applescript can do with the appscript module -
> see . 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. On Mac, I am glad to use applescript.


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: can python do this?

2009-12-02 Thread Rounak

>  
> 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.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: can python do this?

2009-12-02 Thread Rounak
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 
import ImageGrab
  File "/usr/lib/python2.6/dist-packages/PIL/ImageGrab.py", line 34, in

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.




-- 
http://mail.python.org/mailman/listinfo/python-list