[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] calculate the sum of a variable - python

2011-03-06 Thread Marc Tompkins
On Sun, Mar 6, 2011 at 11:27 PM, nookasree ponamala wrote: > Thanks a lot Marc. This works now. > > Sree. > > Glad to hear it. Welcome to the list, by the way. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http:/

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread nookasree ponamala
Thanks a lot Marc. This works now.   Sree. --- On Mon, 3/7/11, Marc Tompkins wrote: From: Marc Tompkins Subject: Re: [Tutor] calculate the sum of a variable - python To: "nookasree ponamala" Cc: "Wayne Werner" , tutor@python.org Date: Monday, March 7, 2011, 10:54 AM On Sun, Mar 6, 2011 at

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread Marc Tompkins
On Sun, Mar 6, 2011 at 8:46 PM, nookasree ponamala wrote: > Thanks for the reply Wayne, but still it is not working, > > when I used int It throws the below error: > File "", line 2, in > File "", line 3, in summary > File "", line 3, in > ValueError: invalid literal for int() with base 10

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread Wayne Werner
On Sun, Mar 6, 2011 at 10:46 PM, nookasree ponamala wrote: > Thanks for the reply Wayne, but still it is not working, > > when I used int It throws the below error: > File "", line 2, in > File "", line 3, in summary > File "", line 3, in > ValueError: invalid literal for int() with base 1

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread nookasree ponamala
Thanks for the reply Wayne, but still it is not working,   when I used int It throws the below error:   File "", line 2, in   File "", line 3, in summary   File "", line 3, in ValueError: invalid literal for int() with base 10: "'"   I tried using float and the error is: Traceback (most recent ca

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread Wayne Werner
On Sun, Mar 6, 2011 at 9:31 PM, nookasree ponamala wrote: > Hi : > > I'm a Senior SAS Analyst. I'm trying to learn Python. I would appreciate if > anybody could help me with this. It works fine if I give input instead of > reading a text file. I don't understand where I'm going wrong. > > I'm try

[Tutor] calculate the sum of a variable - python

2011-03-06 Thread nookasree ponamala
Hi : I'm a Senior SAS Analyst. I'm trying to learn Python. I would appreciate if anybody could help me with this. It works fine if I give input instead of reading a text file. I don't understand where I'm going wrong. I'm trying to read a text file and find out the following: 1. Sum of amt for

[Tutor] BLAS Implementation on Python

2011-03-06 Thread Mahesh Narayanamurthi
Hello, I am thinking of implementing a BLAS package in pure python. I am wondering if this is a good idea. My design goals are: [1] Efficient manipulation of Matrices and Vectors using pure python objects and python code. [2] Targetted to run on Python3 [3] Extensive use of defensive pro

Re: [Tutor] c++ data types in python script

2011-03-06 Thread Arthur Mc Coy
Thank you, sorry for duplicating. I hope moderators can delete it if needed. Wish you well, Arthur On Sun, Mar 6, 2011 at 11:18 AM, Stefan Behnel wrote: > Arthur Mc Coy, 06.03.2011 09:56: > > I've used SWIG module to embed python inside c++ app. >> > > Given that this deals with an advanced to

Re: [Tutor] c++ data types in python script

2011-03-06 Thread Stefan Behnel
Arthur Mc Coy, 06.03.2011 09:56: I've used SWIG module to embed python inside c++ app. Given that this deals with an advanced topic (C-level extensions), I find comp.lang.python (python-list), where you also posted this, a more appropriate place for discussion than the Python tutor mailing li

[Tutor] c++ data types in python script

2011-03-06 Thread Arthur Mc Coy
Hi people, I've used SWIG module to embed python inside c++ app. I pass a list of objects (with lots of different properties of types string, float, custom types like URL, Software and finally of list of strings). Now I'm in python. URL and Software has str() method that converts their value to s