Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.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: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'attribute': 0.05; 'that?': 0.05; 'ok.': 0.07; 'python': 0.09; "'w')": 0.09; 'errno': 0.09; 'errors,': 0.09; 'ioerror': 0.09; 'open()': 0.09; 'subject:into': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; ':-)': 0.13; 'deprecated.': 0.16; 'handlers.': 0.16; 'people?': 0.16; 'singular': 0.16; 'subject:writing': 0.16; 'subprocess': 0.16; 'suggestion.': 0.16; 'cc:2**0': 0.23; 'work.': 0.23; 'errors': 0.23; 'seems': 0.23; 'cc:no real name:2**0': 0.24; 'script': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:[ 10': 0.26; 'received:209.85.212': 0.28; 'error': 0.30; 'getting': 0.33; 'problem': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'thanks': 0.34; 'built-in': 0.35; 'open': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'think': 0.40; 'your': 0.60; 'from:no real name:2**0': 0.60; 'person,': 0.65; 'wish': 0.70; 'oscar': 0.84; 'recover': 0.84; 'received:209.85.212.56': 0.91; 'seriously,': 0.91; 'convinced': 0.93 X-Received: by 10.49.58.167 with SMTP id s7mr788894qeq.5.1361269624522; Tue, 19 Feb 2013 02:27:04 -0800 (PST) Newsgroups: comp.lang.python Date: Tue, 19 Feb 2013 02:27:04 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=92.40.254.242; posting-account=EvoLHwoAAAAe6MGgc84vdAuhA1J1BvTN References: <76620a9e-45fe-499d-b1bf-06b1d2a91c25@googlegroups.com> <16e85bd1-6e5d-4d70-95bf-cc6b986a9f7c@googlegroups.com> <8f26ac4d-4732-46ac-bf4e-877696b22241@googlegroups.com> <85cd2254-0800-4448-9117-9175bbfd10f6@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 92.40.254.242 MIME-Version: 1.0 Subject: Re: improving performance of writing into a pipe From: mikprog@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 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: , Message-ID: Lines: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361269632 news.xs4all.nl 6901 [2001:888:2000:d::a6]:35086 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39204 > > Once you get your script working you can try to provoke errors, and for > > those errors you can recover from you can write error handlers. For IOError > > and Python < 3.3 that may involve inspecting the errno attribute and > > conditionally reraising. Ok. > By the way, I don't think > > > >> > PIPEPATH = ["/tmp/mypipe"] > > >> > self.process = os.popen( self.PIPEPATH, 'w') > > > > can work. As a few people already told you the built-in open() Few people? I thought Oscar was a singular person, not a group of people :-) Seriously, I am convinced by that approach (thanks) and I wish to go that way, but the problem I am getting now is that the open fails and then I can't go on. Also, I am now looking at the subprocess as os.popen seems deprecated. Any opinion on that? Thanks for your suggestion. Mik