Monday, August 18, 2008

How to connect your ipod nano to your laptop

First insert the USB connector in to the laptop and then connect the ipod jack to your ipod nano. When ever i reverse this process my ipod nano hangs and has to be reset. To reset press the center and menu key together for a few seconds.

Monday, August 04, 2008

Python Exceptions >>> raise

A neat trick i found in the python tutorial:

If you need to determine whether an exception was raised but don't intend to handle it, a simpler form of the raise statement allows you to re-raise the exception:

>>> try:
... raise NameError, 'HiThere'
... except NameError:
... print 'An exception flew by!'
... raise
An exception flew by!
Traceback (most recent call last):
File "", line 2, in ?
NameError: HiThere

For more read the Errors and Exceptions section