#acl AdminGroup:read,write,delete,revert EditorGroup:read,write StudentGroup:read,write All:read #format wiki #language de #pragma section-numbers off {{{#!python #!/usr/bin/env python fl = raw_input("If you want to scan the file L5058011_01120090712_MTL.txt , type L5 and press enter! \n if you wish to scan any other file, enter the complete filename!") print"\n\n\n" print "you entered ", fl print"\n\n\n" if fl=="L5": infile = open("L5058011_01120090712_MTL.txt","r") else: infile = open(fl,"r") text = infile.readlines() strt = raw_input("line starting with? ") print"\n\n\n" print "you entered ", strt print"\n\n\n" print "the following lines begin with",strt for line in text: line_stripped=line.strip() if line_stripped.startswith(strt)==True: print line }}}