Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #33683

RE: Choosing Source Address to Bind Socket to in IMAP Client

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 <ramit.prasad@jpmorgan.com>
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" <ramit.prasad@jpmorgan.com>
To "brintoul@controlledthinking.com" <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> <mailman.105.1353448752.29569.python-list@python.org> <ff63b325-4295-43c9-aa07-488a581ce5aa@googlegroups.com> <mailman.112.1353451280.29569.python-list@python.org> <ad71a3b0-72e2-43dc-bf3e-30b564f8ad79@googlegroups.com>
In-Reply-To <ad71a3b0-72e2-43dc-bf3e-30b564f8ad79@googlegroups.com>
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" <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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.116.1353453408.29569.python-list@python.org> (permalink)
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

Show key headers only | View raw


brintoul@controlledthinking.com wrote:
> 
> On Tuesday, November 20, 2012 2:41:58 PM UTC-8, Prasad, Ramit wrote:
> > brintoul at controlledthinking.com wrote:
> >
> > Apologies, I misread your question.
> >
> > According to the imaplib docs, you can subclass IMAP4 and override
> > `IMAP4.open` to create the socket and bind it to the desired interface.
> > You could also connect using IMAP4 and then close/reopen the socket
> > inside the IMAP4 connection object.
> >
> > I hope that is more help,
> > Ramit
> >
> 
> Thanks, yes, that helps!  Just out of curiosity, can you give me a quick link to the docs you are looking at?
> I'm not seeing anything which gets very specific in the docs for Python 2.7 at docs.python.org ...


It is not very specific or helpful but here is the text in question.

'''
IMAP4.open(host, port)
    Opens socket to port at host. This method is implicitly called by the IMAP4 constructor. The connection objects established by this method will be used in the read, readline, send, and shutdown methods. You may override this method.
'''
http://docs.python.org/2.7/library/imaplib.html#imaplib.IMAP4.open


~Ramit


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Choosing Source Address to Bind Socket to in IMAP Client brintoul@controlledthinking.com - 2012-11-20 13:14 -0800
  Re: Choosing Source Address to Bind Socket to in IMAP Client Chris Angelico <rosuav@gmail.com> - 2012-11-21 08:47 +1100
    Re: Choosing Source Address to Bind Socket to in IMAP Client brintoul@controlledthinking.com - 2012-11-20 14:00 -0800
      Re: Choosing Source Address to Bind Socket to in IMAP Client Chris Angelico <rosuav@gmail.com> - 2012-11-21 09:35 +1100
    Re: Choosing Source Address to Bind Socket to in IMAP Client brintoul@controlledthinking.com - 2012-11-20 14:00 -0800
  RE: Choosing Source Address to Bind Socket to in IMAP Client "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-20 21:58 +0000
    Re: Choosing Source Address to Bind Socket to in IMAP Client brintoul@controlledthinking.com - 2012-11-20 14:12 -0800
      RE: Choosing Source Address to Bind Socket to in IMAP Client "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-20 22:41 +0000
        Re: Choosing Source Address to Bind Socket to in IMAP Client brintoul@controlledthinking.com - 2012-11-20 14:55 -0800
          RE: Choosing Source Address to Bind Socket to in IMAP Client "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-11-20 23:10 +0000
        Re: Choosing Source Address to Bind Socket to in IMAP Client brintoul@controlledthinking.com - 2012-11-20 14:55 -0800
    Re: Choosing Source Address to Bind Socket to in IMAP Client brintoul@controlledthinking.com - 2012-11-20 14:12 -0800

csiph-web