Re: [Tutor] Search error code in a logfile and print all lines until the error code

2018-11-30 Thread Steven D'Aprano
On Thu, Nov 29, 2018 at 06:23:42PM +0530, Asad wrote: [...] > It gives me error : > > IOPub data rate exceeded. > The notebook server will temporarily stop sending output > to the client in order to avoid crashing it. > To change this limit, set the config variable > `--NotebookApp.iopub_data_rat

Re: [Tutor] Search error code in a logfile and print all lines until the error code

2018-11-29 Thread Alan Gauld via Tutor
On 29/11/2018 12:53, Asad wrote: > Hi All , > > I need some help to print error lines from a log file : I don;t have time right now for a detailed analysis but there are some obvious starting points: > f4 = open (r"file1.log", 'r') > string2=f4.readlines() > for i in range(len(string2)):

[Tutor] Search error code in a logfile and print all lines until the error code

2018-11-29 Thread Asad
Hi All , I need some help to print error lines from a log file : for example the following logfile : SQL> SQL> SET PAGESIZE 0 SQL> SELECT 'Starting apply for patch 26925263/21857460 on ' || 2 SYSTIMESTAMP FROM dual; Starting apply for patch 26925263/21857460 on 28-JUN-18 07.46.34