Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # A sample text parser which operates on conf.t
- # Author : Shubham Somani
- def return_parameters():
- contents=open("conf.t")
- list=[]
- flag=0
- for word in contents:
- if "@subsection" in word:
- s=word.split("@subsection")
- #print s[1].strip()
- if flag==1:
- list.append("end of subsection")
- list.append(s[1].strip())
- flag=1
- if "@findex" in word and flag==1:
- s=word.split("@findex")
- #print s[1].strip()
- list.append(s[1].strip())
- print list
- return_parameters()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement