hi guys , I rented a gps from the airport and it had no problem giving me the directions , while using it , I kept wondering how it picks the routes , and can python be used to program these devices and how ? a short code would be much appreciated thanks ali

It's not gps, but it may interest you - googlemaps 1.0.2 - Easy geocoding, reverse geocoding, driving directions, and local search in Python via Google. Just import googlemaps.py from tar.gz.

Simple example:

>>> from googlemaps import GoogleMaps
>>> gmaps = GoogleMaps()
>>> address = 'Constitution Ave NW & 10th St NW, Washington, DC'
>>> destination = gmaps.latlng_to_address(38.887563, -77.019929)
>>> directions = gmaps.directions(address, destination)
>>> for step in directions['Directions']['Routes'][0]['Steps']:
	print step['descriptionHtml']

Head <b>east</b> on <b>Constitution Ave NW</b> toward <b>9th St NW</b>
Turn right onto <b>7th St NW</b>
Turn left onto <b>Independence Ave SW</b><div class="google_note">Destination will be on the right</div>

thanks , the example was helpful , I will look at the suggested site thanks again