[Tutor] problems in a python script

Mário Gamito webmaster@dte.ua.pt
Tue Jul 29 07:39:54 2003


Hi,

I've downloaded the 30 days trial version of editize and followed the 
instructions in http://plone.org/Members/tlynch/HowToIntegrateEditize
to install it.

Everything runs smoothly  until the creation of munge.py as explained in 
the above link. I get an error saying

  " Script line 4
     inputvalue = inputvalue.replace("\r", "")
     ^
SyntaxError: invalid syntax"

A curious thing is that when i save it, not only i get the above error, 
but also the lines begining with double cardinal (##) are gone!!!

Also the text refers to "Note: you might need to edit the line calling 
munge in wysiwyg_support to reflect the name of your folder where all 
the Editize stuff is stored."

Where is this is done ?

Thank you in advance for your time and patience.

Warm Regards,
Mário Gamito




munge.py
-----------------------------------------------------
## Script (Python) "munge"
    ##bind container=container
    ##bind context=context
    ##bind namespace=
    ##bind script=script
    ##bind subpath=traverse_subpath
    ##parameters=inputvalue
    ##title=

    # to guard against files that might contain only
    # returns or linefeeds, we will delete each separately
    # rather than trying: replace("\r\n", "")
    inputvalue = inputvalue.replace("\r", "")
    inputvalue = inputvalue.replace("\n", "")
    inputvalue = inputvalue.replace("'", "'")

    return inputvalue
------------------------------------------------------------