Eric, Having played around with problems of this kind for quite some time I find them challenging even if I don't really have time to get sidetracked. Your description of the problem makes it all the more challenging, because its 'expressionist' quality adds the challenge of guessing what you mean. I'd like to take a look at your data, if you would post a segment on which to operate, the same data the way it should look in the end. In most cases this is pretty self-explanatory. Explain the points that might not be obvious to a reader who knows nothing about your mission.
Frederic ----- Original Message ----- From: <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: <python-list@python.org> Sent: Sunday, August 27, 2006 11:35 PM Subject: newbe question about removing items from one file to another file > def simplecsdtoorc(filename): > file = open(filename,"r") > alllines = file.read_until("</CsInstruments>") > pattern1 = re.compile("</") > orcfilename = filename[-3:] + "orc" > for line in alllines: > if not pattern1 > print >>orcfilename, line > > I am pretty sure my code isn't close to what I want. I need to be able > to skip html like commands from <defined> to <undefined> and to key on > another word in adition to </CsInstruments> to end the routine > > I was also looking at se 2.2 beta but didn't see any easy way to use it > for this or for that matter search and replace where I could just add > it as a menu item and not worry about it. > > thanks for any help in advance > > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list