RE: Convert StringIO to string

2006-10-16 Thread Jonathan Bowlas
Of Rob Williscroft Sent: 16 October 2006 14:37 To: python-list@python.org Subject: Re: Convert StringIO to string Jonathan Bowlas wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Hi listers, > > I've written this little script to generate some html but I cannot get > it to co

RE: Convert StringIO to string

2006-10-16 Thread Jonathan Bowlas
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('\n')

RE: Convert StringIO to string

2006-10-16 Thread Jonathan Bowlas
Ahh thanks, I'll give that a try. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 16 October 2006 14:00 To: python-list@python.org Subject: Re: Convert StringIO to string Jonathan Bowlas wrote: > But obviously replace()

Convert StringIO to string

2006-10-16 Thread Jonathan Bowlas
Hi listers, I've written this little script to generate some html but I cannot get it to convert to a string so I can perform a replace() on the >, < characters that get returned. from StringIO import StringIO def generator_file(rsspath,titleintro,tickeropt): scripter=StringIO()

Re:Newbie help - test for data type

2006-07-31 Thread Jonathan Bowlas
Thanks Bruno, I’ll use this.   Much appreciated.   Jon   -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Desthuilliers Sent: 31 July 2006 10:37 To: python-list@python.org Subject: Re: [OT]Newbie help - test for data type   Jonathan

Re: Newbie help - test for data type

2006-07-31 Thread Jonathan Bowlas
for data type   Jonathan Bowlas wrote: > Hi Listers, > > I have a requirement to test for a data type could someone tell me if this > is possible in python? > > Basically I have a ZPT in Zope that users can select checkboxes in a form > which pass arguments for a pyt

Newbie help - test for data type

2006-07-31 Thread Jonathan Bowlas
Hi Listers, I have a requirement to test for a data type could someone tell me if this is possible in python? Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is only one checkbox selected it is passed as a stri

testing for data type

2006-07-29 Thread Jonathan Bowlas
Hi Listers,   I have a requirement to test for a data type could someone tell me if this is possible in python?   Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is only one checkbox selected it is pa