Ok, I think I'm explaining this badly because I've used getvalue() in the script I originally submitted to the list, see below:

 

from StringIO import StringIO

 

def generator_file(rsspath,titleintro,tickeropt):

      scripter=StringIO()

      scripter.write('<script type="text/_javascript_">\n')

      scripter.write('new rss_ticker(%s, %s, %s)\n' % (rsspath, titleintro, tickeropt))

      scripter.write('</script>\n')

      return scripter.getvalue()

 

 

The problem is this script returns the following:

 

&lt;script type="text/_javascript_"&gt;

new rss_ticker(www.bbc.co.uk, True, True) &lt;/script&gt;

 

And I want to replace the &lt; and &gt; characters for < or > so it actually renders correctly in a browser so I'm returned this:

 

<script type="text/_javascript_">

new rss_ticker(www.bbc.co.uk, True, True) </script>

 

So what am I doing wrong?

 

J

 

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to