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


Groups > comp.lang.python > #73769

Re:Writing files at run time

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!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.028
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'parameter': 0.09; 'predefined': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:files': 0.09; 'runs': 0.10; 'wrote': 0.14; 'changes': 0.15; 'link,': 0.16; 'received:80.91.229.3': 0.16; 'received:97': 0.16; 'received:plane.gmane.org': 0.16; 'storing': 0.16; 'subject:Writing': 0.16; 'subject:run': 0.16; 'urllib': 0.16; 'files.': 0.16; 'trying': 0.19; 'solution.': 0.20; 'written': 0.21; 'coding': 0.22; 'issue.': 0.22; 'header:X-Complaints-To:1': 0.27; 'generally': 0.29; 'getting': 0.31; 'anyone': 0.31; 'file': 0.32; 'there.': 0.32; 'run': 0.32; 'url:python': 0.33; 'subject:time': 0.33; 'could': 0.34; 'created': 0.35; 'but': 0.35; 'there': 0.35; 'to:addr:python-list': 0.38; 'files': 0.38; 'issue': 0.38; 'previous': 0.38; 'to:addr:python.org': 0.39; 'changed': 0.39; 'received:org': 0.40; 'how': 0.40; 'new': 0.61; 'kindly': 0.61; 'discuss': 0.62; 'email addr:gmail.com': 0.63; 'show': 0.63; 'name': 0.63; 'kind': 0.63; 'group,': 0.63; 'different': 0.65; 'dear': 0.65; 'minutes': 0.67; 'results': 0.69; 'stored,': 0.84; 'thanking': 0.84; 'url:lang': 0.84; 'subject::': 0.85; 'esteemed': 0.91; 'sitting': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dave Angel <davea@davea.name>
Subject Re:Writing files at run time
Date Mon, 30 Jun 2014 21:05:31 -0400 (EDT)
Organization news.gmane.org
References <7038fda7-a755-49e0-9ec9-1ae11338d3b3@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 97.73.240.9
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.11354.1404176644.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404176644 news.xs4all.nl 2865 [2001:888:2000:d::a6]:44953
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73769

Show key headers only | View raw


subhabangalore@gmail.com Wrote in message:
> Dear Group,
> 
> In my previous post["https://groups.google.com/forum/#!topic/comp.lang.python/ZYjsskV5MgE"] I was trying to discuss some issue on file writing. 
> 
> I got an associated issue. 
> 
> I am trying to crawl a link, through urllib and trying to store its results in different files. As discussed I could work out a solution for this and with your kind help trying to learn some new coding styles. 
> 
> Now, I am getting an associated issue. 
> 
> The crawler I am trying to construct would run daily-may be at a predefined time. 
> [I am trying to set the parameter with "time" module]. 
> 
> Now, in the file(s) data are stored, are assigned or created at one time.
> 
> Data changes daily if I crawl daily newspapers. 
> 
> I generally change the name of the files with a sitting for few minutes before a run. But this may not be the way. 
> 
> I am thinking of a smarter solution. 
> 
> If anyone of the esteemed members may kindly show a hint, how the name of the storing files may be changed automatically as crawler runs every day, so that data may be written there and retrieved. 
> 
> Thanking you in advance,
> Regards,
> Subhabrata Banerjee. 
>  
> 

Make a directory name from datetime. datetime. now () and put the
 files there. 

-- 
DaveA

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


Thread

Writing files at run time subhabangalore@gmail.com - 2014-06-30 12:59 -0700
  Re:Writing files at run time Dave Angel <davea@davea.name> - 2014-06-30 21:05 -0400

csiph-web