If it's machine setup, then please use either puppet or chef or func. You'll get a lot by way of features.
-- Ram On 4/15/11, Nitin Kumar <nitin.n...@gmail.com> wrote: > the reason for the same is: > > We got to machine setup, one is US and one in India, according to machine > location we need to use local server. > So I was looking for IP which help me differentiate the position of client > Machine to use that to chose server. > > thanks > Nitin K > > On Thu, Apr 14, 2011 at 6:28 PM, Santosh Rajan <santra...@gmail.com> wrote: > >> I think the solution below will give you all the ip addresses including >> 127.0.0.1. In any case this is not an easy one to solve. Depends on a lot >> of >> factors. You might want to revisit your original question on why you want >> the ip address? and which ip address (local or inet)?, and investigate >> wether you really need the ip address to solve the problem? >> >> On Thu, Apr 14, 2011 at 5:46 PM, Sudharshan Gupta < >> sudharshan.gu...@in.fiorano.com> wrote: >> >> > Hi nitin, >> > >> > I think this works >> > import socket >> > socket.gethostbyname(socket.gethostname()) >> > socket.gethostbyname_ex(socket.gethostname()) >> > >> > >> > >> > >> > >> > Nitin Kumar wrote: >> > >> >> Hi All, >> >> >> >> Is anyone aware how to fetch mac machine IP using python? >> >> >> >> >> >> >> > >> > >> > -- >> > Thanks & Regards >> > Sudharshan >> > >> > >> > _______________________________________________ >> > BangPypers mailing list >> > BangPypers@python.org >> > http://mail.python.org/mailman/listinfo/bangpypers >> > >> >> >> >> -- >> http://about.me/santosh.rajan >> >> “The *young man* knows the rules but the *old man* knows the >> exceptions”. *Oliver >> Wendell Holmes* >> _______________________________________________ >> BangPypers mailing list >> BangPypers@python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > Nitin K > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Sent from my mobile device ================== Belenix: www.belenix.org _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers