Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:same': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:How': 0.10; 'python': 0.11; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'supplied': 0.16; ':-)': 0.16; 'charset:iso-8859-15': 0.16; 'solution.': 0.20; '(in': 0.22; 'header:User-Agent:1': 0.23; "haven't": 0.24; 'header:X -Complaints-To:1': 0.27; 'host': 0.29; 'subject:the': 0.34; 'could': 0.34; 'there': 0.35; 'accessing': 0.36; 'hi,': 0.36; 'should': 0.36; 'application': 0.37; 'implement': 0.38; 'server': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'within': 0.65; 'determine': 0.67; 'started.': 0.68; 'received:93': 0.72; 'obvious': 0.74 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Malte Forkel Subject: How to determine whether client and server are on the same host Date: Mon, 25 Nov 2013 20:35:40 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: p5ddb3254.dip0.t-ipconnect.de User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1385408149 news.xs4all.nl 15933 [2001:888:2000:d::a6]:37538 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60446 Hi, I have a Python application that communicates with a server via telnet. Host and port of the server are supplied by the user when the application is started. How can I determine from within the application whether the server's host actually is the local host? (In that case I could implement an operation not available in the telnet-based protocol by directly accessing the local filesystem.) Sounds like there should be an obvious solution. Unfortunately, I haven't found it yet :-) Malte