On Sat, Aug 18, 2007 at 03:37:22AM -0400, Richard Heck wrote:
> 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

We used to require only a pretty old version of python which did not
provide that '+='.

I am not sure what the current policy is, though.

Andre'

Reply via email to