Martin Vermeer wrote:
On Sat, Aug 18, 2007 at 01:27:57AM -0400, Richard Heck wrote:
Martin Vermeer wrote:
Attached my attempt. I am a complete amateur with python
and work with layout2layout also for the first time, so...
does this make sense? FWIW it works.
Well, I don't know anything about layout2layout, but I know a little
python...
+ if format == 4:
+ # Handle conversion to long CharStyle names
+ match = re_CharStyle.match(lines[i])
+ if match:
+ lines[i] = "InsetLayout CharStyle:%s" % (match.group(3))
+ i = i + 1
You can do i += 1 in python, here and below.
If you say so... there are 11 more instances of this in the
file, not my doing ;-)
Yes, I promise. And in case you don't know, you can use python
interactively. Just type "python" at a prompt, and then try:
[EMAIL PROTECTED] src]$ python
Python 2.4.4 (#1, Oct 23 2006, 13:58:00)
[GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> i=0
>>> i
0
>>> i+=1
>>> i
1
>>>
Richard
--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto