2

Im running the following code on my Nokia E71. But after the text input, the program closes abruptly. I have a GPRS connection on my phone,but i still seem to be having some problem with urllib.urlopen

The code is as follows :

import appuifw,urllib

amountInDollars = appuifw.query(u"Enter amount in Dollars","text") data=urllib.urlopen("http://www.google.com").read()
appuifw.note(u"Hey","info")

Any way to fix this problem ? Thank You

sammr
  • 21
  • 2

1 Answers1

2

Rewriting to:

import appuifw,urllib

amountInDollars = appuifw.query(u"Enter amount in Dollars","text") 
f=urllib.urlopen("http://www.google.com")
data=f.read()
f.close()
appuifw.note(u"Hey","info")

it should work now.

brsata
  • 81
  • 6