Re: [Tutor] Read lines opening with a particular set of characters from a file

2015-11-29 Thread Br. Sayan
It is exactly what Peter has said. Opened the file with 'U' and it worked like a charm. Thank you very much! On 28 November 2015 at 19:10, Peter Otten <__pete...@web.de> wrote: > Br. Sayan wrote: > > > I am doing the following : > > > > with open('

Re: [Tutor] Read lines opening with a particular set of characters from a file

2015-11-28 Thread Br. Sayan
the problem? On 27 November 2015 at 22:37, Laura Creighton wrote: > In a message of Fri, 27 Nov 2015 17:05:21 +0530, "Br. Sayan" writes: > >How can we read specific lines from a text files using python. File > >attached. > > > >Suppose

[Tutor] Read lines opening with a particular set of characters from a file

2015-11-27 Thread Br. Sayan
How can we read specific lines from a text files using python. File attached. Suppose we want to read lines starting with 'R|1|^^^' and 'O|1|' Should we use: line.startswith(("..", "..", "")) H|\^&|||C311^1|host|RSUPL^BATCH|P|1 P|1 O|1|9060^MANWAL ^1^^010|R1|^^^989/\^^^99

Re: [Tutor] Python ASTM Implementation

2015-11-13 Thread Br. Sayan
Well, doing $ python setup.py install did the installation. It can now import astm. Should I try with PySerial first, as the communication is through RS232 serial cable? Sayan On 13 November 2015 at 10:07, Br. Sayan wrote: > *Alan* > > ​I note that the most recent release of AST

Re: [Tutor] Python ASTM Implementation

2015-11-13 Thread Br. Sayan
apt-get if you are > using the Linux internal Python, rather than using pip. > I have not installed through pip. I just gave the setup script 777 permission and run it with ./setup.py . How do I do it with apt-get? I don't think it's in repository. Pls let me know. On 13 November 20

[Tutor] Python ASTM Implementation

2015-11-12 Thread Br. Sayan
Dear All, We have a Lab Analyzer(Cobas C311), which we want to interface with Pyhton. As you might be knowing that clinical lab analyzers use ASTM protocol. Python has a an ASTM module , but I need help in its implementation. In the first place, to my emba