Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing Help...!

Status
Not open for further replies.

walha2006

Programmer
Feb 8, 2010
1
DE
I need Help by Parsing :
i need to
I want to open a file with Python (*. txt) and search the key words (LoopStart, SEND, CONT ....) , then call the functions of these key words ,should I use pypython? I need to create a grammar or not ?Please Help...

Script exp :

LOOPSTART [TEST_FLASHMODE] COUNT [1]
DIAG [SET_ENERGIESPARMODE_NORMAL] SEND [31,01,0F,0C,00] EXPECT[71,01,0F,0C,*] TIMEOUT [0] SOURCE[F1] TARGET [10]
 
You need to know a little more about the structure of the text you're searching. Let's say you find "LoopStart" on some line. Is the text you're interested in on the same line? Is it before or after the keyword, "LoopStart"? The same question needs to be answered for each/every keyword.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top