On Tue, 14 Jul 2009 20:10:32 +0100, wrote:
Can i become more precise like instead of printing all lines for PHE and
ASP is it possible that for PHE python will print only those lines which
will have information about H and HA and for ASP it will print those
lines
which will have information
On 14 juil, 19:33, amr...@iisermohali.ac.in wrote:
> Dear all,
>
> Can anyone tell me that suppose i have a file having content like:
>
> _Atom_name
> _Atom_type
> _Chem_shift_value
> _Chem_shift_value_error
> _Chem_shift_ambiguity_code
> 1 1 PHE H H
On Tue, 2009-07-14 at 23:03 +0530, amr...@iisermohali.ac.in wrote:
> Dear all,
>
> Can anyone tell me that suppose i have a file having content like:
>
> _Atom_name
> _Atom_type
> _Chem_shift_value
> _Chem_shift_value_error
> _Chem_shift_ambiguity_code
> 1 1
I think what Grant is saying is that you should read the documentation
for the re module.
David
On Tue, Jul 14, 2009 at 3:12 PM, Grant Edwards wrote:
> On 2009-07-14, amr...@iisermohali.ac.in wrote:
>
>> Can i become more precise like instead of printing all lines
>> for PHE and ASP is it possib
On 2009-07-14, amr...@iisermohali.ac.in wrote:
> Can i become more precise like instead of printing all lines
> for PHE and ASP is it possible that for PHE python will print
> only those lines which will have information about H and HA
> and for ASP it will print those lines which will have
> inf
Can i become more precise like instead of printing all lines for PHE and
ASP is it possible that for PHE python will print only those lines which
will have information about H and HA and for ASP it will print those lines
which will have information about HA and HB.
Thanks
> On Tue, 14 Jul 2009 1
On Tue, 14 Jul 2009 18:48:06 +0100, David Gibb wrote:
[Something top-posted, which I've shuffled down]
On Tue, Jul 14, 2009 at 1:33 PM, wrote:
Dear all,
Can anyone tell me that suppose i have a file having content like:
_Atom_name
_Atom_type
_Chem_shift_value
_Chem_shift_
try something like:
for line in open("filename").readlines():
if (re.search("PHE|ASP",line):
print line
On Tue, Jul 14, 2009 at 1:33 PM, wrote:
> Dear all,
>
> Can anyone tell me that suppose i have a file having content like:
>
> _Atom_name
> _Atom_type
> _Chem_shift_va
Dear all,
Can anyone tell me that suppose i have a file having content like:
_Atom_name
_Atom_type
_Chem_shift_value
_Chem_shift_value_error
_Chem_shift_ambiguity_code
1 1 PHE H H 8.49 0.02 1
2 1 PHE HAH 4.60