[BangPypers] Python "Wat"s
Pranjal Mittal
pranjal.mittal.ece10 at iitbhu.ac.in
Wed Sep 11 17:12:01 CEST 2013
Here you go-
import socket
socket.gethostbyaddr(socket.gethostname())[2]
On Wed, Sep 11, 2013 at 8:16 PM, ashish makani <ashish.makani at gmail.com>wrote:
> Found this quick, nifty way to determine the ip address of the machine your
> py script is running on
>
> import commands
> commands.getoutput("/sbin/ifconfig").split("\n")[1].split()[1][5:]
>
> ( via http://stackoverflow.com/a/3177266/559456 )
>
> cheers
> ashish
>
> *The only way to do great work is to love what you do. If you haven’t found
> it yet, keep looking. Don’t settle. As with all matters of the heart,
> you’ll know when you find it.” - Steve Jobs (1955 - 2011)*
>
>
> On Tue, Sep 10, 2013 at 10:23 PM, Gopalakrishnan Subramani <
> gopalakrishnan.subramani at gmail.com> wrote:
>
> > We must be thankful for the people who invented the keyboard and stopped
> > with single SPACE and TAB keys for column indentation.
> >
> > Every time you edit, mind compile the Python code on production critical
> > time, there could be a landmine hidden in the white space on nano or
> remote
> > vi.
> >
> >
> >
> >
> >
> > On Tue, Sep 10, 2013 at 10:14 AM, Shabda Raaj <shabda at agiliq.com> wrote:
> >
> > > This is a popular talk on quircks of ruby/js
> > >
> > > https://www.destroyallsoftware.com/talks/wat
> > >
> > > What are the quircks/unexpected behavior you find in Python? (Aka
> Python
> > > "wats").
> > >
> > > --
> > > Thanks,
> > > Shabda
> > >
> > > Agiliq.com - Building Amazing Apps
> > > agiliq.com/blog/ | github.com/agiliq
> > > US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj
> > > Our Android Apps <
> https://play.google.com/store/apps/developer?id=Agiliq
> > >
> > > | Our
> > > iOS Apps <https://itunes.apple.com/us/artist/agiliq/id407918088>
> > > _______________________________________________
> > > BangPypers mailing list
> > > BangPypers at python.org
> > > https://mail.python.org/mailman/listinfo/bangpypers
> > >
> > _______________________________________________
> > BangPypers mailing list
> > BangPypers at python.org
> > https://mail.python.org/mailman/listinfo/bangpypers
> >
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>
--
--
B.Tech. 2014
Indian Institute of Technology, BHU,
Varanasi, 221005
Uttar Pradesh,
India
More information about the BangPypers
mailing list