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


Groups > comp.lang.python > #68350

Re: pickle.dump (obj, conn)

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 <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.022
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'attribute': 0.07; 'exception,': 0.09; 'url:faqs': 0.09; 'doing,': 0.16; 'tcp': 0.16; 'typeerror:': 0.16; 'url:catb': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'thu,': 0.19; '>>>': 0.22; "shouldn't": 0.24; 'header:In- Reply-To:1': 0.27; 'raise': 0.29; 'is?': 0.30; 'message- id:@mail.gmail.com': 0.30; '"",': 0.31; '13,': 0.31; 'file': 0.32; '(most': 0.33; 'actual': 0.34; 'subject: (': 0.35; 'connection': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'remote': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'recent': 0.39; 'expect': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'for:': 0.64; 'more': 0.64; 'mar': 0.68
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=pWSzekpB/dnFDoDncjG56qvhsdM5Mjna+5iZhYdaw1I=; b=f4H+FzJfNOHtnzLf4Zg9qDw4o7iMW2qlOTseRBkL0p9VEd5hFcXoZi9S77HjAfDx+o Cf3kn32B5GVfE3Mu5gwULnzpXYo8HHDySidKOAPh5g332HVghvSHNmJv8QfIhRRj7tMn p+m5BAIRja+eARaXmI+rNZijn5MlGlJs251JDNPljyvDzRi57eDku32T5uoxug4lktU5 TigPnwqjBGGN+QfnwtZSjX7l75QMXsREML0Thn7SEMl0LvPOyPmR9Y6w2AR3OLuefcuv 38v2WYX1gM1rCtVaiMGYO9ayBRGXJQ/GZ/wEHVnY2sRnhPTLYcJQivzOux3QlhLc++U9 FXoA==
X-Received by 10.68.240.36 with SMTP id vx4mr6077913pbc.140.1394760456272; Thu, 13 Mar 2014 18:27:36 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <1394750199.11584.YahooMailNeo@web140104.mail.bf1.yahoo.com>
References <1394750199.11584.YahooMailNeo@web140104.mail.bf1.yahoo.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Thu, 13 Mar 2014 19:26:55 -0600
Subject Re: pickle.dump (obj, conn)
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-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 <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8141.1394760459.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1394760459 news.xs4all.nl 2859 [2001:888:2000:d::a6]:49449
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68350

Show key headers only | View raw


On Thu, Mar 13, 2014 at 4:36 PM, Pedro Izecksohn <izecksohn@yahoo.com> wrote:
>   Shouldn't pickle.dump (obj, conn) raise an Exception if conn is a TCP
> connection that was closed by the remote host?

Can you be more specific about what you are doing, what you expect the
result to be, and what the actual result is?

http://www.catb.org/esr/faqs/smart-questions.html#beprecise

If I try using pickle.dump with a socket, I do get an exception, but
perhaps not the one you are looking for:

>>> pickle.dump([1,2,3], sock)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: file must have a 'write' attribute

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


Thread

Re: pickle.dump (obj, conn) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-13 19:26 -0600

csiph-web