How to determine whether client and server are on the same host

Chris Angelico rosuav at
Wed Nov 27 00:15:53 CET 2013

On Wed, Nov 27, 2013 at 10:08 AM, Walter Hurry <walterhurry at> wrote:
> Easy enough with ifconfig and grep. I presume that there is also a way on
> Windows, but others will have to contribute that.

Since the server runs Linux, inability to run /sbin/ifconfig could
safely be interpreted as "we're not running on the server". But I
think this actually gains little over "is there a file called
/tmp/_this_is_malte_forkel_on_his_server_9515343_", which would be
fairly safe.


More information about the Python-list mailing list