Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'method.': 0.05; 'socket': 0.05; 'completeness': 0.07; 'override': 0.07; 'python': 0.09; "'''": 0.09; 'received:155': 0.09; 'subclass': 0.09; 'subject:Source': 0.09; 'cc:addr:python-list': 0.10; '2.7': 0.13; 'bind': 0.16; 'constructor.': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'from:addr:jpmorgan.com': 0.16; 'helps!': 0.16; 'imap4': 0.16; 'port)': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:159.53.110': 0.16; 'received:159.53.110.174': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:sj2.jpmchase.com': 0.16; 'securities,': 0.16; 'send,': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'wrote:': 0.17; 'thanks,': 0.18; 'question.': 0.20; 'object.': 0.22; 'cc:2**0': 0.23; 'received:169.254': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'accuracy': 0.27; 'host.': 0.29; 'implicitly': 0.29; 'methods.': 0.29; 'objects': 0.29; 'read,': 0.29; 'received:169': 0.29; "i'm": 0.29; 'connection': 0.30; 'header:Received:8': 0.30; 'helpful': 0.30; 'gets': 0.32; 'url:python': 0.32; 'help,': 0.32; 'could': 0.32; 'docs': 0.33; 'text': 0.34; 'but': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'method': 0.36; 'anything': 0.36; 'charset :us-ascii': 0.36; 'subject:: ': 0.38; 'url:docs': 0.38; 'called': 0.39; 'your': 0.60; 'link': 0.60; 'information,': 0.63; 'url:email': 0.63; 'more': 0.63; 'here': 0.65; 'legal': 0.65; '20,': 0.65; 'subject': 0.66; 'purchase': 0.67; 'sale': 0.76; 'received:169.254.8': 0.84; 'subject:Client': 0.84; 'url:open': 0.96 X-DKIM: OpenDKIM Filter v2.1.3 sj2.jpmchase.com qAKNGiHg015517 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpmorgan.com; s=smtpout; t=1353453404; bh=2XYVrZPimRqJV8oC0H57FXm1AudbResPmmrWvlwF7l0=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=I8uAQjruHhr7vOB+Ap4c1sy9djVbYAP0sF7mXUQcEjYWZT7mWAqASOgUP5NQXTtVx CQyFLCV2NKjkFybquROUYDoUAZSfj1hz0S0dWOtoqnRfcL1ojYvzh4tQihdy2uOfAL p6nUk73QJiqJRzmyBfxz7esUuxBNeHeqR0ZvY3vI= From: "Prasad, Ramit" To: "brintoul@controlledthinking.com" Subject: RE: Choosing Source Address to Bind Socket to in IMAP Client Thread-Topic: Choosing Source Address to Bind Socket to in IMAP Client Thread-Index: AQHNx3Ir2PneXNU4Eki5xNtcfprKPJfzWJBA Date: Tue, 20 Nov 2012 23:10:27 +0000 References: <72731eb3-1521-46f0-8601-8a2df58849d8@googlegroups.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.79.47] Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP-FWD: Yes Content-Type: text/plain; charset="us-ascii" Cc: "python-list@python.org" 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353453408 news.xs4all.nl 6932 [2001:888:2000:d::a6]:56469 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33683 brintoul@controlledthinking=2Ecom wrote:=0D=0A> =0D=0A> On Tuesday, Novembe= r 20, 2012 2:41:58 PM UTC-8, Prasad, Ramit wrote:=0D=0A> > brintoul at cont= rolledthinking=2Ecom wrote:=0D=0A> >=0D=0A> > Apologies, I misread your que= stion=2E=0D=0A> >=0D=0A> > According to the imaplib docs, you can subclass = IMAP4 and override=0D=0A> > `IMAP4=2Eopen` to create the socket and bind it= to the desired interface=2E=0D=0A> > You could also connect using IMAP4 an= d then close/reopen the socket=0D=0A> > inside the IMAP4 connection object= =2E=0D=0A> >=0D=0A> > I hope that is more help,=0D=0A> > Ramit=0D=0A> >=0D= =0A> =0D=0A> Thanks, yes, that helps! Just out of curiosity, can you give = me a quick link to the docs you are looking at?=0D=0A> I'm not seeing anyth= ing which gets very specific in the docs for Python 2=2E7 at docs=2Epython= =2Eorg =2E=2E=2E=0D=0A=0D=0A=0D=0AIt is not very specific or helpful but he= re is the text in question=2E=0D=0A=0D=0A'''=0D=0AIMAP4=2Eopen(host, port)= =0D=0A Opens socket to port at host=2E This method is implicitly called = by the IMAP4 constructor=2E The connection objects established by this meth= od will be used in the read, readline, send, and shutdown methods=2E You ma= y override this method=2E=0D=0A'''=0D=0Ahttp://docs=2Epython=2Eorg/2=2E7/li= brary/imaplib=2Ehtml#imaplib=2EIMAP4=2Eopen=0D=0A=0D=0A=0D=0A~Ramit=0D=0A= =0D=0A=0D=0AThis email is confidential and subject to important disclaimers= and=0D=0Aconditions including on offers for the purchase or sale of=0D=0As= ecurities, accuracy and completeness of information, viruses,=0D=0Aconfiden= tiality, legal privilege, and legal entity disclaimers,=0D=0Aavailable at h= ttp://www=2Ejpmorgan=2Ecom/pages/disclosures/email=2E