[Tutor] passing by reference

2011-03-13 Thread Vineeth Mohan
Hi, How are variables in python passed. By value or by referrence? For example if we consider a simple function below wherein the value of a does not get modified in the main function. def addition(a,b): a = a+1 return a+b if __name__ == '__main__': a = 10 b = 15 addit

[Tutor] help with re module and parsing data

2011-03-06 Thread vineeth
Hello all I am doing some analysis on my trace file. I am finding the lines Recvd-Content and Published-Content. I am able to find those lines but the re module as predicted just gives the word that is being searched. But I require the entire line similar to a grep in unix. Can some one tell m

Re: [Tutor] python module to search a website

2011-02-26 Thread vineeth
return the html link. I can ofcourse scrap the information from that link. Thanks Vin On 02/27/2011 12:04 AM, Bill Allen wrote: n Sat, Feb 26, 2011 at 21:11, vineeth <mailto:vineethrak...@gmail.com>> wrote: Hello all, I am looking forward for a python module to search a we

[Tutor] python module to search a website

2011-02-26 Thread vineeth
Hello all, I am looking forward for a python module to search a website and extract the url. For example I found a module for Amazon with the name "amazonproduct", the api does the job of extracting the data based on the query it even parses the url data. I am looking some more similar query

[Tutor] position of an element in list:

2010-07-23 Thread Vineeth Rakesh
Hello all, How to return the position of a character in a string. Say I have str1 = "welcome to the world" if i want to return the position of the first occurrence of "o" how to do it? Thanks Vin ___ Tutor maillist - Tutor@python.org To unsubscribe or

[Tutor] Help execution time calculation:

2010-07-14 Thread Vineeth Rakesh
Hello all, I want to calculate the execution time of a program. Say I have a function like below: def RepAdd(i): j = 0 while(j___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listi

[Tutor] Help return a pattern from list

2010-07-05 Thread Vineeth Rakesh
Hello all, Can some one help me to return a special pattern from a list. say list = ["something1.mp3","something2.mp3","something4.pdf","something5.odt"] now say I just need to return the files with .mp3 extension. How to go about doing this? Thanks Vin _