Mailingliste - Einträge 2006

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qftestJUI] jython - string functions ?

  • Subject: Re: [qftestJUI] jython - string functions ?
  • From: Karlheinz Kellerer <Karlheinz.Kellerer@?.de>
  • Date: 30 Aug 2006 17:15:46 +0200

Hi Claudia,

('AUFT/06/02542',) means, "rows" is a tuple that contains just one string element.

Therefore you only need to use


to access the first element.

For more information about tuples and Python's string functions you may want to consult
the Pyton Tutorial, available at

Best regards, 

m-claudia@?.de writes:

> Hi,
> I'm working on a jython server script, which should read a value from the database. With 
> rows = cursor.fetchone() I get the needed value, which is stored as for instance "('AUFT/06/02542',)". 
> To work with it, I need to cut all the additional characters like ( ' and ,. At the end, I should have "AUFT/06/02542". How can I do this in the Server Script ? Are there any jython-string-functions ? 
> I already tryed to convert the jython-object to a java-String to use the substring-method, but that doesn't work.  
> Thanks for help.
> Regards, Claudia

Karlheinz Kellerer                     Karlheinz.Kellerer@?.de
Quality First Software GmbH          
Tulpenstr. 41                               Tel: +49 8171 919877
DE-82538 Geretsried                         Fax: +49 8171 919876