Fibonacci series recursion error

2011-04-29 Thread lalit
import os def fib(n): if n == 1: return(n) else: return (fib(n-1)+fib(n-2)) list=fib(20) print(list) The above function return the return (fib(n-1)+fib(n-2)) RuntimeError: maximum recursion depth exceeded in comparison [36355 refs] can any one help -- http:

NameError: global name 'Response' is not defined

2008-04-24 Thread Lalit
" I am getting error of : global name 'Response' is not defined It seems I am missing some package. I am not really sure. I installed python 2.5 and through easy_install imported pakages (pylons). Any clues would be appreciated Thanks Lalit -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax error in python

2008-02-20 Thread Lalit
On Feb 20, 2:03 pm, Lalit <[EMAIL PROTECTED]> wrote: > Hi > I am executing following commands.>>> test = > os.path.isfile('c:\\src\\kasjdfl.txt') > >>> print test > > True > working fine but for below statement it is giv

syntax error in python

2008-02-20 Thread Lalit
Hi I am executing following commands. >>> test = os.path.isfile('c:\\src\\kasjdfl.txt') >>> print test True working fine but for below statement it is giving syntax error. >>> if (os.path.isfile('c:\\src\\kasjdfl.txt')) SyntaxError: invalid syntax any idea what is incorrect in my synt

Re: copying files through Python

2008-02-16 Thread Lalit Krishna
Hi this is the code which I wrote till now. It is giving permission denied error for sub folders of source directory. Does anyone have any idea what is going wrong import os import shutil def copytreetosinglefolder(src, dst): names = os.listdir(src) if (os.path.isdir(dst)==False): os.mkdir(dst)

copying files through Python

2008-02-13 Thread Lalit
I am new to python. Infact started yesterday and feeling out of place. I need to write a program which would transfer files under one folder structure (there are sub folders) to single folder. Can anyone give me some idea like which library files or commands would be suitable for this file transfer

AJAX Calander like Google Calender

2007-03-02 Thread lalit
Hi all, I would like to make the the calender cery similar to google event calander in python. can any one help me where i will get library that uses AJAX is this feasible reg, Lalit -- http://mail.python.org/mailman/listinfo/python-list