Re: How to store a variable when a script is executing for next time execution?

2013-06-06 Thread Avnesh Shakya
Thanks. On Thu, Jun 6, 2013 at 4:49 PM, Cameron Simpson wrote: > On 06Jun2013 03:50, Avnesh Shakya wrote: > | hi, > |I am running a python script and it will create a file name like > filename0.0.0 and If I run it again then new file will create one more like > filename0.0.

How to store a variable when a script is executing for next time execution?

2013-06-06 Thread Avnesh Shakya
hi, I am running a python script and it will create a file name like filename0.0.0 and If I run it again then new file will create one more like filename0.0.1.. my code is- i = 0 for i in range(1000): try: with open('filename%d.%d.%d.json'%(0,0,i,)): pass continue

Output is not coming with defined color

2013-05-29 Thread Avnesh Shakya
hi, I am trying to display my output with different colour on terminal, but it's coming with that colour code. Please help me how is it possible? my code is - from fabric.colors import green, red, blue def colorr(): a = red('This is red') b = green('This is green') c = blue('This i

Re: How to create new python file with increament number, if doesn't exist?

2013-05-27 Thread Avnesh Shakya
Thanks On Mon, May 27, 2013 at 4:19 PM, Denis McMahon wrote: > On Mon, 27 May 2013 02:27:59 -0700, Avnesh Shakya wrote: > > > I want to create a new python file like 'data0.0.5', but if it is > > already exist then it should create 'data0.0.6', if it'

How to create new python file with increament number, if doesn't exist?

2013-05-27 Thread Avnesh Shakya
hi, I want to create a new python file like 'data0.0.5', but if it is already exist then it should create 'data0.0.6', if it's also exist then next like 'data0.0.7'. I have done, but with range, please give me suggestion so that I can do it with specifying range. I was trying this way and it'

Re: how to compare two json file line by line using python?

2013-05-26 Thread Avnesh Shakya
Thanks a lot, I got it. On Mon, May 27, 2013 at 11:03 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Sun, 26 May 2013 21:32:40 -0700, Avnesh Shakya wrote: > > > But I want to compare line by line and value by value. but i found that > > js

Re: how to compare two json file line by line using python?

2013-05-26 Thread Avnesh Shakya
not so I think sorting is required, but if i compare line by line that will be good, I am thinking in this way... On Mon, May 27, 2013 at 10:21 AM, rusi wrote: > On May 27, 9:32 am, Avnesh Shakya wrote: > > hi, > >how to compare two json file line by line using python? Actual

how to compare two json file line by line using python?

2013-05-26 Thread Avnesh Shakya
hi, how to compare two json file line by line using python? Actually I am doing it in this way.. import simplejson as json def compare(): newJsonFile= open('newData.json') lastJsonFile= open('version1.json') newLines = newJsonFile.readlines() print newLines sortedNew = sort

Re: How to run a python script twice randomly in a day?

2013-05-20 Thread Avnesh Shakya
Thanks a lot. I got it. On Tue, May 21, 2013 at 6:42 AM, Cameron Simpson wrote: > On 20May2013 15:05, Avnesh Shakya wrote: > | Thanks a lot. > > No worries, but ... > > AGAIN: > - please DO NOT top post. Post below, trimming the quoted material. > - please POST TO

How to run a python script twice randomly in a day?

2013-05-19 Thread Avnesh Shakya
hi, How to run a python script twice randomly in a day? Actually I want to run my script randomly in a day and twice only. Please help me.. how is it possible. Thanks -- http://mail.python.org/mailman/listinfo/python-list

python script is not running

2013-05-18 Thread Avnesh Shakya
hi, i want to run python script which generating data into json fromat, I am using crontab, but it's not executing... my python code-- try.py -- import json import simplejson as json import sys def tryJson(): saved = sys.stdout correctFile = file('data.json', 'a+') sys.stdout = c

how to run another file inside current file?

2013-05-17 Thread Avnesh Shakya
hi, I want to run a another file inside a ached.add_cron_job(..). how is it possible, please help me, I have a file otherFile.py for execution inside current file. I know it is very easy question but i m unable to get anything, please help me. example -- import otherFile from apscheduler.sche

Warning in python file when i m using pychecker.

2013-04-25 Thread Avnesh Shakya
hi, I am trying to run my file using pychecker, but it's showing warning. I am unable to get these warning. Please help me, how to remove these warning. I am using pychecker first time. avin@HP:~/github/UdacitySiteData$ pychecker udacity_to_jsonFinal.py Processing module udacity_to_jsonFinal

trying to open index.py using Indico software......

2013-03-29 Thread Avnesh Shakya
hi, please help me... I have installed indico software and apache2,when i try to run it using http://indico/index.py,then it's downloading index.py, when i put http://indico, then it's showing all thing properly,but it's not showing index.py but downloading it it's not showing any erro

how to install indico software?

2013-03-23 Thread Avnesh Shakya
please tell me someone, how to install indico software? I have link-- http://indico-software.org/wiki/Admin/Installation0.98 but i have problem, i have no sites-available folder inside apache, i m using window 7, please help me.. Thanks in advance -- http://mail.python.org/mailman/listinfo/pyth