Thanks all !.. Ultimately daniels suggestion worked perectly for me... 1.get the geo ip database from here http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz 2. get the geo ip script from here http://blogstatic.micropledge.com/2009/07/geoip.py.txt <http://blogstatic.micropledge.com/2009/07/geoip.py.txt>3. place geoip.py in your site packages. 4. try it out:- >>>import geoip >>>geoip.country('202.21.128.102') 'NZ' works perfectly... Thanks Vivek
On Thu, Aug 19, 2010 at 1:41 AM, Daniel Fetchinson < [email protected]> wrote: > > Well another of my naive questions .. please bear with me:- > > I know that I would be able to find a visitor's ip address using :- > > ip=request.environ.get("X_FORWARDED_FOR", request.environ["REMOTE_ADDR"]) > > now based on the ip address how do I get to know the exact geo location > of > > the visitor and if someone is generous enough, it would be great if they > > could let me know how do I show him a page based on his location(Kindly > try > > to put in as much detail as possible here.. who knows this mail just > might > > help some other newbie like me next time) > > There are lots of python modules for this, try googling for "geo ip > python". > > Cheers, > Daniel > > > > -- > Psss, psss, put it down! - http://www.cafepress.com/putitdown > > -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<turbogears%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en. > > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

