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


Groups > comp.lang.python > #73729

Re:Writing Multiple files at a times

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'output': 0.05; 'preferably': 0.05; 'attribute': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:files': 0.09; 'wrote': 0.14; 'received:80.91.229.3': 0.16; 'received:97': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Writing': 0.16; 'url.': 0.16; 'trying': 0.19; 'help.': 0.21; 'appears': 0.22; 'instance,': 0.24; 'string,': 0.24; 'define': 0.26; 'holds': 0.26; 'order.': 0.26; 'header:X-Complaints-To:1': 0.27; 'file': 0.32; 'class': 0.32; 'add': 0.35; 'done': 0.36; 'operating': 0.37; 'to:addr :python-list': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'kindly': 0.61; "you're": 0.61; 'email addr:gmail.com': 0.63; 'information': 0.63; 'group,': 0.63; 'dear': 0.65; 'close': 0.67; 'line,': 0.68; 'subject': 0.69; 'coming,': 0.84; 'subject:times': 0.84; 'subject::': 0.85; 'esteemed': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dave Angel <davea@davea.name>
Subject Re:Writing Multiple files at a times
Date Sun, 29 Jun 2014 09:33:04 -0400 (EDT)
Organization news.gmane.org
References <b8951113-5171-4441-b490-4d731eb56cec@googlegroups.com>
Mime-Version 1.0
Content-Type multipart/mixed; boundary="----=_Part_2_1114015048.1404048784188"
X-Gmane-NNTP-Posting-Host 97.73.240.15
X-Newsreader PiaoHong.Usenet.Client.VIP:1.54
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.11325.1404048700.18130.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404048700 news.xs4all.nl 2954 [2001:888:2000:d::a6]:38709
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73729

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

subhabangalore@gmail.com Wrote in message:
> Dear Group,
> 
> I am trying to crawl multiple URLs. As they are coming I want to write them as string, as they are coming, preferably in a queue. 
> 
> If any one of the esteemed members of the group may kindly help.
> 

>From your subject line,  it appears you want to keep multiple files open, and write to each in an arbitrary order.  That's no problem,  up to the operating system limits.  Define a class that holds the URL information and for each instance,  add an attribute for an output file handle. 

Don't forget to close each file when you're done with the corresponding URL. 

-- 
DaveA

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


Thread

Writing Multiple files at a times subhabangalore@gmail.com - 2014-06-29 03:49 -0700
  Re: Writing Multiple files at a times Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-06-29 12:17 +0100
  Re:Writing Multiple files at a times Dave Angel <davea@davea.name> - 2014-06-29 09:33 -0400
    Re: Writing Multiple files at a times Roy Smith <roy@panix.com> - 2014-06-29 10:01 -0400
      Re: Writing Multiple files at a times subhabangalore@gmail.com - 2014-06-29 10:32 -0700
        Re: Writing Multiple files at a times Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-29 19:21 +0000
  Re: Writing Multiple files at a times subhabangalore@gmail.com - 2014-06-30 12:23 -0700
    Re: Writing Multiple files at a times Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-30 23:22 +0000

csiph-web