Re: Writing Python File at Specific Interval

2014-07-20 Thread Mark Lawrence
On 20/07/2014 12:15, subhabangal...@gmail.com wrote: Dear Group, Thank you for your kind suggestion. It worked. Regards, Subhabrata Banerjee. I'm pleased to see that you have a solution. In return would you please use the mailing list https://mail.python.org/mailman/listinfo/python-list or

Re: Writing Python File at Specific Interval

2014-07-20 Thread subhabangalore
On Thursday, July 10, 2014 5:21:01 AM UTC+5:30, Denis McMahon wrote: > On Wed, 09 Jul 2014 07:36:49 -0700, subhabangalore wrote: > > > > > The code (a basic crawler) would run every morning or evening, on a > > > predefined time. [This part is fine]. > > > > > > In the next part, I am trying

Re: Writing Python File at Specific Interval

2014-07-09 Thread Denis McMahon
On Wed, 09 Jul 2014 07:36:49 -0700, subhabangalore wrote: > The code (a basic crawler) would run every morning or evening, on a > predefined time. [This part is fine]. > > In the next part, I am trying to store the daily results to a new file. So what you want to do is store each day's results i

Re: Writing Python File at Specific Interval

2014-07-09 Thread Shubham Tomar
Hi Subhabrata, You can use open(name, 'w'), which creates the file if the file does not exist, but it will truncate the existing file. Alternatively, you can use open(name, 'a'); this will create the file if the file does not exist, but will not truncate the existing file. Ref.: open()

Re: Writing Python File at Specific Interval

2014-07-09 Thread Abhiram R
Looping in the list to improve on my suggestion or suggest an alternative On Wed, Jul 9, 2014 at 11:03 PM, Abhiram R wrote: > Hi Subha, > What is the current methodology you're using? If your code is already > being called every 24 hours or whatever, you can use a "touch" command > inside an os