Writing files at run time
Dave Angel
davea at davea.name
Mon Jun 30 21:05:31 EDT 2014
subhabangalore at 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
More information about the Python-list
mailing list