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

From "Prasad, Ramit" <ramit.prasad@jpmorgan.com>
Subject RE: Choosing Source Address to Bind Socket to in IMAP Client
Date 2012-11-20 23:10 +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>
Newsgroups comp.lang.python
Message-ID <mailman.116.1353453408.29569.python-list@python.org> (permalink)

Show all headers | 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