Need help with my 1st python program

Dave Luzius dluzius at comcast.net
Sat May 8 14:52:33 EDT 2010


Pleaser help me with this. Here's a copy of the program, but it keeps 
calling for me to define pressure.

# A small program to fetch local barometer reading   from weather.com   
# and convert the value from   metric to 
imperial.                                                              
# My first attempt at Python.                                   
#--------------------------------------------------------------------
import urllib

# next line does the fetching
urllib.urlopen("http://xoap.weather.com/weather/local/USMI0060", pressure)

# next line does the conversion to imperial
imppress = 0.029875 * float(pressure)

  # next line shows the results.  
print imppress

as you can see, I'm stuck on what should be relatively simple.
TIA, Dave



More information about the Python-list mailing list