[Tutor] [Installing Spyder IDE]:Help

2010-02-25 Thread vanam
. Is that something or dependency i have missed to install? -- Raghavendra Vanam -- Raghavendra Vanam ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] [File Input Module]Replacing string in a file

2010-01-28 Thread vanam
display the string on the console ie. by below piece of code import fileinput x = fileinput.input('data.txt',inplace=0) for line in x: print line, x.close() It wouldnt print with the same Font size on the console (This wont prove anything wr

Re: [Tutor] Replacing the string in a file

2010-01-22 Thread vanam
2010 at 12:42 PM, Shashwat Anand wrote: > You can try it by reading all data as string, replacing the string and then > write it to target file via opeing it in +w mode. > > f = open('data.txt', 'rw').read().replace('Python', 'PYTHON') > f1

[Tutor] Replacing the string in a file

2010-01-21 Thread vanam
ot my goal. 7. Closed the files outside for loop -- log.close() -- Raghavendra Vanam ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] adding more text to a file (Vanam)

2010-01-20 Thread vanam
;) > out_file.write("\n") > out_file.close > > now i want to add like say 5 persons to the txt file, but whenever i enter a > new person it just overwrites the previous, im sure its because of the "w" > but how exactly do i need to change my code to add more text instead of > overwriting? > > > > -- Raghavendra Vanam ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Usage of for loop

2009-01-05 Thread vanam
of code but of no avail. a = ["cat", "window","defenestrate"] for x in a: print x, len(x) i cant understand what x is doing here and what is the purpose of it can anyone help me out here? -- Raghavendra Vanam ___ Tutor

[Tutor] Recursive function

2008-07-17 Thread vanam
ut("enter 2nd letter=") c = raw_input("enter 3rd letter=") def cmp(): d = (a+b+c); if (d=='PAN'): print "word" 'd' "is correct" else: print "Try Again" CALL(); def CALL(): cmp(); cmp() --

[Tutor] Explanation of Pickle

2007-01-29 Thread vanam
can any one explain about pickle i read in the book but they have not provided any example for that so please explain with a simple example -- Vanam ___ Tutor maillist - Tutor@python.org http

[Tutor] Diff between opening files in 'r' and 'r+' mode

2007-01-29 Thread vanam
t i saw on interpreter(In curly braces) when i ran the script [MY QUESTION]:1.from where the above in curly braces is printed?and i have written only 'hai' to the text file 2.Should i recall again the opening of the file in 'r' mode to read the file? -- Vanam ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Python Branches

2007-01-23 Thread vanam
able to develop any application using py2.5?One more thing is what is tkinter?Can any one explain what are all branches in python and how it could be used? -- Vanam ___ Tutor maillist - Tutor@python.org http

Re: [Tutor] Difference between filter and map

2007-01-23 Thread vanam
results and diff between filter and map On 1/23/07, Kent Johnson <[EMAIL PROTECTED]> wrote: vanam wrote: > ya i am sure about that i am using python editor which has python > intrepreter attached to it i got the same output for both filter and map > def squ(n): >y = n*n >

Re: [Tutor] Difference between filter and map

2007-01-23 Thread vanam
ya i am sure about that i am using python editor which has python intrepreter attached to it i got the same output for both filter and map def squ(n): y = n*n print y filter(y,range(3))->0 1 4 map(y,range(3))->0 1 4 On 1/23/07, Kent Johnson <[EMAIL PROTECTED]> wrote: vanam wro

[Tutor] Difference between filter and map

2007-01-23 Thread vanam
*x filter(squ,range(1,3))->1,4(output) map(squ,range(1,3)->1,4(output) -- Vanam ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Inputting elements of a list

2007-01-22 Thread vanam
->this would sort out elements in that list. my question is in the above script all the elements that list carry are defined i want to input some elements in the list how could it be done -- Vanam ___ Tu