I am working with python plugins.I have my field variable = “t_0″.”survey” I wanted to store only survey into another variable.Which function to use to get survey from “t_0″.”survey”?
I tried a=field.split(".") when i try to print a ,it gives
<PyQt4.QtCore.QStringList object at 0x01247228>
Is there any delete function or to find position of “.” from the string..?
If i try lstrip() or ljust() ,it gives error saying
AttributeError: 'QString' object has no attribute 'lstrip'..
If
ais aQString, then callinga.splitproduces aQStringList, just as callingspliton a Pythonstrproduces alist:You can either cast
QStringListto a Python list:or just extract the second element:
And perhaps get rid of the
QStringwrapping: