Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'argument': 0.04; 'socket': 0.05; 'completeness': 0.07; 'welcome.': 0.07; 'python': 0.09; 'subject:Source': 0.09; 'to:addr:comp.lang.python': 0.09; 'underlying': 0.09; 'cc:addr:python-list': 0.10; 'bind': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'hello:': 0.16; 'help...': 0.16; 'imap4': 0.16; 'securities,': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'wrote:': 0.17; 'specify': 0.17; 'assumes': 0.22; 'cc:2**1': 0.24; 'machine': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:" 20': 0.26; 'accuracy': 0.27; 'interface': 0.27; 'this?': 0.28; 'fine': 0.28; 'run': 0.28; 'url:06': 0.29; 'source': 0.29; 'maybe': 0.29; 'url:python': 0.32; 'could': 0.32; 'received:google.com': 0.34; 'third': 0.34; 'thanks': 0.34; 'programming.': 0.35; 'received:209.85': 0.35; 'url:org': 0.36; 'url:library': 0.36; 'client': 0.36; 'address.': 0.36; 'quite': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'url:docs': 0.38; 'help': 0.40; 'your': 0.60; 'from:no real name:2**0': 0.60; 'helps': 0.63; 'information': 0.63; 'information,': 0.63; 'url:email': 0.63; 'legal': 0.65; '20,': 0.65; 'started.': 0.65; 'subject': 0.66; 'purchase': 0.67; 'url:2011': 0.72; 'url:wordpress': 0.75; 'sale': 0.76; 'flippant': 0.84; 'subject:Client': 0.84 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=path:newsgroups:date:in-reply-to:complaints-to:injection-info :nntp-posting-host:references:user-agent:x-google-web-client :x-google-ip:mime-version:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=b4SYJ0TfcXcMNPNb7rnTUiksO15ifTXlH7Gi60enwUk=; b=lzyRR5oeYXYCc0exW4AxjLJre8Hw+Q6D44IUijYhhgTnj70CJJzolci4smZO26OYFh hI7Kgn+0c0YI5WpzBJTm5kBCH6M2Phfd41UCrLd3TcUlsWyLpxj2dHiCxvGDh7VmmD/D o09LQ6/CXNaoARZEiERfChyuGSjEU77brkb15lUrXAMQqbvRKyFq3tllCDl68hxzrXAv I2ojBVm6u5ayxE0ZHLvRd1vx1BUMvuldoCCZ4qG+7biAJaSM6C8+7SLd4y7Q2PdQGg+S gzDw4d7bu5R07f90CnAMepzXLmvafKY4pAGqLaNGVsft6Cb7vXuCPw8XlGQFiixK3Tol Cp6Q== Newsgroups: comp.lang.python Date: Tue, 20 Nov 2012 14:12:30 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2600:4401:c001:1016:186d:a9f7:9d2a:ef7b; posting-account=EjjbUAoAAACUM4MjU1iSfrSUM9caQEYG References: <72731eb3-1521-46f0-8601-8a2df58849d8@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 2600:4401:c001:1016:186d:a9f7:9d2a:ef7b MIME-Version: 1.0 Subject: Re: Choosing Source Address to Bind Socket to in IMAP Client From: brintoul@controlledthinking.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQn1rD854b1EZ1Njo+Ef4kSfV84fb8MKyP95barN3Agg3416F2d0u5ZHt/uQUgnRRbyW3oTf Cc: "python-list@python.org" , "brintoul@controlledthinking.com" 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: , Message-ID: Lines: 71 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353449554 news.xs4all.nl 6901 [2001:888:2000:d::a6]:43979 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33674 On Tuesday, November 20, 2012 1:59:34 PM UTC-8, Prasad, Ramit wrote: > brintoul at controlledthinking.com wrote: >=20 > >=20 >=20 > > Hello: >=20 > >=20 >=20 > > I have a multihomed machine that I would like to run the Python imaplib= 's IMAP4 client on. I would like to be >=20 > > able to specify which interface the underlying socket will bind to as i= ts source address. How could I best do >=20 > > this? >=20 >=20 >=20 > One assumes by programming. >=20 >=20 >=20 > >=20 >=20 > > Thanks for any help... >=20 >=20 >=20 > You are quite welcome. :) >=20 >=20 >=20 > On a less flippant note, maybe some links would help you=20 >=20 > get started. >=20 >=20 >=20 > http://www.doughellmann.com/PyMOTW/imaplib/ >=20 > http://yuji.wordpress.com/2011/06/22/python-imaplib-imap-example-with-gma= il/=20 >=20 > http://docs.python.org/2/library/imaplib.html >=20 >=20 >=20 >=20 >=20 > ~Ramit >=20 >=20 >=20 >=20 >=20 > This email is confidential and subject to important disclaimers and >=20 > conditions including on offers for the purchase or sale of >=20 > securities, accuracy and completeness of information, viruses, >=20 > confidentiality, legal privilege, and legal entity disclaimers, >=20 > available at http://www.jpmorgan.com/pages/disclosures/email. While I appreciate your attempt at humor, this is not information which hel= ps me. Perhaps you are not familiar with the basics of socket programming.= This is all fine and dandy, and it is good to "know what you don't know". = If you're interested, look at the third argument to "create_connection": h= ttp://docs.python.org/2/library/socket.html