Changing Unicode object to Tuple Type

laxmikiran.bachu at gmail.com laxmikiran.bachu at gmail.com
Thu May 24 08:43:41 EDT 2007


On May 24, 5:11 pm, "Diez B. Roggisch" <d... at nospam.web.de> wrote:
> laxmikiran.ba... at gmail.com schrieb:
>
> > Can we have change a unicode string Type object  to a Tuple type
> > object.. If so how ????
>
> Why? Are you getting an error that makes you think that's a good idea?
>
> Tuples are basically structs, unicode objects are strings. There is no
> canonical way to convert them. Tell us more about the problem you want
> to be solved, and we might help you better.
>
> diez

**********

I have to get few strings from an application(strings of different
languages..ex: korean,japanese,french etc.,). The data returned by the
application was in the  format of the xml.
Hence I was using pyRXP to get the data. I was not able to get all the
strigs in different languages. Now I wanted to use pyRXPU to get all
the strings of that application.When Iam using pyRXPU iam getting the
following error.

Traceback (most recent call last):
  File "D:\LanguageScripts\Screens.py", line 106, in
test_1_01_DoSomething
    TitlenSoftkeyfn()
  File "D:\LanguageScripts\EventLog_Screens.py", line 66, in
TitlenSoftkeyfn
    titleBar = root.TitleBar.currentText
  File "D:\LanguageScripts\XmlWrapper.py", line 35, in __getattr__
    tagName, attrs, children, spare = child
ValueError: need more than 1 value to unpack


Here the child is of the format unicode..

When pyRXP is used it was of the format tuple... I was just trying to
find out if there is some way that I make this code work.




More information about the Python-list mailing list