lines = urllib.urlopen(url).read() print lines -Thadeus
On Mon, Nov 23, 2009 at 3:30 PM, Yash <yash.171...@gmail.com> wrote: > > When I run some function in web2py by opening it's url in browser i > get the output. > But when i run the url using urllib module in python using python code > It doesn't give output. > say application name is TLS > and in default.py i have made a function trial as > def trial(): > print "yash" > return dict() > by opening the url > http://172.17.11.243/TLS/default/trial > query runs and output comes i.e. yash gets printed on terminal. > but see the code try.py > try.py as given below > import urllib > urllib.urlopen('http://172.17.11.243/TLS/default/trial') > python try.py doesn't give output i.e. it doesn't print yash on > terminal. > I don't know why is this happening > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---