Thanks for your reply Nilamo, I see my mistake now.
content = os.popen("sed -n '/time/, +3p' mon").read()
The solution I used was string concatenation:
works for my purpose.
content = os.popen("sed -n '/time/, +3p' mon").read()
The solution I used was string concatenation:
str1 = "sed -n '/" + str(time)+ "/, +3p' mon" content = os.popen(str1).read()It may not be the best or indeed the only solution but it
works for my purpose.