[Tutor] extracting lines between patterns.

2012-05-14 Thread Bala subramanian
Friends, Could someone please give some hint on how to extract lines between two patterns in a file. I use the re module to compile my patterns but not able to figure out how i can use these patterns to extract the lines lying in between. Thanks, Bala __

Re: [Tutor] extracting lines between patterns.

2012-05-14 Thread Russel Winder
On Mon, 2012-05-14 at 09:31 +0200, Bala subramanian wrote: > Friends, > Could someone please give some hint on how to extract lines between two > patterns in a file. I use the re module to compile my patterns but not able > to figure out how i can use these patterns to extract the lines lying in >

Re: [Tutor] extracting lines between patterns.

2012-05-14 Thread delegbede
Give an example. Let's see what you've tried and then it becomes clear what help is needed. Regards. Sent from my BlackBerry wireless device from MTN -Original Message- From: Bala subramanian Sender: tutor-bounces+delegbede=dudupay@python.org Date: Mon, 14 May 2012 09:31:41 To:

Re: [Tutor] (no subject)

2012-05-14 Thread Keitaro Kaoru
sorry if i keep missing this up. hey. Austin here for some reason this command. all it does it produces the error message at the bottom.. itll say my name and the persons name im trying to send the message to but thats it. heres the command. ###

Re: [Tutor] (no subject)

2012-05-14 Thread Keitaro Kaoru
and i also realized my real name isnt on google i am austin but im guessing u see keitaro kaoru or whatever yeha this is a very old email account and i cant change the name i use.. lol i made my signature austin tho maybe thatll help On Mon, May 14, 2012 at 5:58 AM, Keitaro Kaoru wrote: > sorry i

Re: [Tutor] hello~

2012-05-14 Thread Keitaro Kaoru
i resent it but if that doesnt work. cause i sent it to myself also looks fine on my gmail.. but heres a link to pastebin http://pastebin.com/Jp7VJKGB maybe thatll help? On Mon, May 14, 2012 at 1:43 AM, Russel Winder wrote: > On Mon, 2012-05-14 at 00:19 +0100, Mark Lawrence wrote: > [...] >> Sor

Re: [Tutor] extracting lines between patterns.

2012-05-14 Thread Bala subramanian
The code is given below. Here i try to extract lines that are between the two patterns atomtype and mol.type #!/usr/bin/env python import re mypat=re.compile(r'^[ atomtypes ]$[ moleculetype ]',re.MULTILINE) data=open('test.dat').read() extr=re.findall(mypat,data) print extr The data file is somet

Re: [Tutor] (no subject)

2012-05-14 Thread Dave Angel
On 05/14/2012 05:58 AM, Keitaro Kaoru wrote: > sorry if i keep missing this up. > > hey. Austin here for some reason this command. all it does it produces the > error message at the bottom.. itll say my name and the persons name im > trying to send the message to but thats it. heres the command. I

Re: [Tutor] List Indexing Issue

2012-05-14 Thread Bala subramanian
Hi, I would suggest you to use the biopython package. It has a PDB parser with which you can extract any specific information like atom name, residue, chain etc as you wish. Bala On Wed, May 9, 2012 at 3:19 AM, Jerry Hill wrote: > On Tue, May 8, 2012 at 4:00 PM, Spyros Charonis > wrote: > > Hel

Re: [Tutor] extracting lines between patterns.

2012-05-14 Thread Russel Winder
On Mon, 2012-05-14 at 12:23 +0200, Bala subramanian wrote: [...] > mypat=re.compile(r'^[ atomtypes ]$[ moleculetype ]',re.MULTILINE) [...] mypat=re.compile(r'^\[ atomtypes \]$(.*)^\[ moleculetype \]$',re.MULTILINE | re.DOTALL) -- Russel. =

Re: [Tutor] syntax error

2012-05-14 Thread bob gailer
I have changed the subject to "syntax error". Please always post a meaningful subject. On 5/14/2012 5:58 AM, Keitaro Kaoru wrote: sorry if i keep missing this up. hey. Austin here for some reason this command. all it does it produces the error message at the bottom.. The code you sent has num

Re: [Tutor] syntax error

2012-05-14 Thread bob gailer
On 5/14/2012 6:14 AM, Keitaro Kaoru wrote: hello~ is NOT a good subject i resent it but if that doesnt work. cause i sent it to myself also looks fine on my gmail.. but heres a link to pastebin http://pastebin.com/Jp7VJKGB There are still numerous errors that prevent the program from compili

Re: [Tutor] extracting lines between patterns.

2012-05-14 Thread Alan Gauld
On 14/05/12 08:31, Bala subramanian wrote: Friends, Could someone please give some hint on how to extract lines between two patterns in a file. I use the re module to compile my patterns but not able to figure out how i can use these patterns to extract the lines lying in between. Without much

[Tutor] Multiple DBs per application?

2012-05-14 Thread leam hall
All, Just a general question. If you have an application with different data types where it might be better to use one database over another, are there issues with having multiple databases used by the application? Thanks! Leam -- Mind on a Mission _

Re: [Tutor] pip errors for numpy, scipy matplotlib

2012-05-14 Thread Bjorn Madsen
Hi Jerry, Sorry the missing details - but well spotted: I do use ubuntu and it was with the 12.04 upgrade that I experienced the issue. Your advice was spot on - sudo apt-get install python-numpy solved the job, and when I ran pip afterwards I received the message that "requirements are already sat

Re: [Tutor] Multiple DBs per application?

2012-05-14 Thread Alan Gauld
On 14/05/12 20:33, leam hall wrote: Just a general question. If you have an application with different data types where it might be better to use one database over another, are there issues with having multiple databases used by the application? No, you can usuially have multiple databases ope

Re: [Tutor] Multiple DBs per application?

2012-05-14 Thread Leam Hall
On 05/14/2012 06:44 PM, Alan Gauld wrote: On 14/05/12 20:33, leam hall wrote: Just a general question. If you have an application with different data types where it might be better to use one database over another, are there issues with having multiple databases used by the application? No, y

Re: [Tutor] Multiple DBs per application?

2012-05-14 Thread bob gailer
On 5/14/2012 3:33 PM, leam hall wrote: All, Just a general question. If you have an application with different data types where it might be better to use one database over another, are there issues with having multiple databases used by the application? BY "database" do you mean a table (as in

[Tutor] table to dictionary and then analysis

2012-05-14 Thread questions anon
I am completely new to dictionaries and I am not even sure if this is what I need to use. I have a text file that I would like to run summary stats on particular months, years and climate indices (in this case the climate indices are rainfall and fire area, so not actualy climate indices at all).

Re: [Tutor] table to dictionary and then analysis

2012-05-14 Thread bob gailer
On 5/14/2012 10:16 PM, questions anon wrote: I am completely new to dictionaries and I am not even sure if this is what I need to use. I have a text file that I would like to run summary stats on particular months, years and climate indices (in this case the climate indices are rainfall and fir

Re: [Tutor] Multiple DBs per application?

2012-05-14 Thread bob gailer
On 5/14/2012 7:55 PM, Leam Hall wrote: On 05/14/2012 06:44 PM, Alan Gauld wrote: On 14/05/12 20:33, leam hall wrote: Just a general question. If you have an application with different data types where it might be better to use one database over another, are there issues with having multiple dat

Re: [Tutor] table to dictionary and then analysis

2012-05-14 Thread questions anon
Thanks Bob, sql does appear to be very simple although I cannot get the queries to work. Can you suggest a site that has examples for what I am trying to do. I have done some googling but it has not been successful so far. On Tue, May 15, 2012 at 1:38 PM, bob gailer wrote: > On 5/14/2012 10:1