Re: [Tutor] Python gmail script for conky

2013-01-20 Thread Don Jennings

On Jan 19, 2013, at 8:15 PM, tutor-requ...@python.org wrote:

> Date: Sat, 19 Jan 2013 18:27:46 -0500
> From: Polo Heysquierdo 
> To: Tutor@python.org
> Subject: [Tutor] Python gmail script for conky
> Message-ID:
>   
> Content-Type: text/plain; charset="iso-8859-1"
> 
> I'm getting the following error on my script for conky.
> 
> "Traceback (most recent call last):
>  File "/home/troll/.gmail/gmail.py", line 1, in 
>import urllib.request
> ImportError: No module named request"

(Probably someone will beat me to the punch since I get the digest of this 
list, still…)

Most likely, you are using python 2 to run python 3 code as the urllib.request 
is available in python 3 (see note at top of this page [1]).

Take care,
Don

[1] http://docs.python.org/2/library/urllib.html
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Traffic Light

2013-01-20 Thread Russel Winder
On Sat, 2013-01-19 at 12:31 -0800, anthonym wrote:
> Hello All,
> 
> I am new to Python and taking a course now.  One of my exercises is to
> create a traffic light using tkinter.   The exercise also requires that I
> create radio buttons that allow the user to click on the color and the
> corresponding light will come on.

A side-note here rather than a direct contribution to your problem at
hand:  radio buttons are not a good way of implementing traffic lights
if internationalization is a factor. In the UK and other places, there
is a state where both red and yellow are on at the same time.

-- 
Russel.
=
Dr Russel Winder  t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077   xmpp: rus...@winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


signature.asc
Description: This is a digitally signed message part
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor