Re: Determine ip address
codecraig wrote:
> hi,
>how can i use python to figure the ip address of the machine which
> the python script is running on? I dont mean like 127.0.0.1but i
> want the external IP address (such as ipconfig on windows displays).
I use the following (all on one line):
external_ip = os.popen("/sbin/ifconfig eth0|/bin/grep inet|/bin/awk
'{print $2}' | sed -e s/.*://", "r").read().strip()
Cheers,
Andy
--
http://mail.python.org/mailman/listinfo/python-list
Re: Python & SQLite
dcrespo wrote: > Does PySQLite run on Linux? Yes! >From my Gentoo laptop: andyvaio root # emerge -av pysqlite These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] dev-python/pysqlite-0.5.1 0 kB Total size of downloads: 0 kB Do you want me to merge these packages? [Yes/No] Cheers, Andy -- http://mail.python.org/mailman/listinfo/python-list
