Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'exception': 0.03; 'python': 0.09; "'w')": 0.09; 'subject:into': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'benjamin': 0.16; 'cc:name:python list': 0.16; 'clue?': 0.16; 'code?': 0.16; 'mkfifo': 0.16; 'subject:writing': 0.16; 'utc,': 0.16; 'wrote:': 0.17; 'trying': 0.21; 'pipe': 0.22; 'monday,': 0.23; 'cc:no real name:2**0': 0.24; 'cc:2**1': 0.24; 'command': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'cc:addr:gmail.com': 0.27; 'guess': 0.27; "doesn't": 0.28; 'run': 0.28; 'idea,': 0.29; 'queue': 0.29; 'e.g.': 0.30; 'file': 0.32; 'another': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'open': 0.35; 'created': 0.36; 'subject:: ': 0.38; 'from:no real name:2**0': 0.60; 'more': 0.63; '2013': 0.84; 'oscar': 0.84 X-Received: by 10.49.12.97 with SMTP id x1mr782037qeb.25.1361205105298; Mon, 18 Feb 2013 08:31:45 -0800 (PST) Newsgroups: comp.lang.python Date: Mon, 18 Feb 2013 08:31:45 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=92.40.254.112; posting-account=EvoLHwoAAAAe6MGgc84vdAuhA1J1BvTN References: <76620a9e-45fe-499d-b1bf-06b1d2a91c25@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 92.40.254.112 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 , mikprog@gmail.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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361205114 news.xs4all.nl 6923 [2001:888:2000:d::a6]:43226 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39107 On Monday, February 18, 2013 3:21:53 PM UTC, Oscar Benjamin wrote: [..] > > Can you not open the pipe file directly in Python code? e.g. > > > > fout = open('/tmp/mypipe', 'w') > > fout.write(data) > > > > I guess that this would be more efficient than using os.popen to run echo. > > that's an idea, thanks Oscar. However I get an exception while trying to open the queue: fout = open('/tmp/mypipe', 'w') I have tried it in a command line and the call doesn't return until in another terminal I open the same queue for reading (???) I have created the queue with: mkfifo /tmp/mypipe any clue? mik