![]() |
2010-06-11
, 18:09
|
Posts: 3,617 |
Thanked: 2,412 times |
Joined on Nov 2009
@ Cambridge, UK
|
#2
|
![]() |
2010-06-11
, 19:02
|
Posts: 52 |
Thanked: 8 times |
Joined on Apr 2010
|
#3
|
![]() |
2010-06-11
, 19:06
|
Posts: 52 |
Thanked: 8 times |
Joined on Apr 2010
|
#4
|
![]() |
2010-06-11
, 19:22
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#5
|
![]() |
2010-06-11
, 19:27
|
Posts: 52 |
Thanked: 8 times |
Joined on Apr 2010
|
#6
|
![]() |
2010-06-11
, 19:31
|
Posts: 3,617 |
Thanked: 2,412 times |
Joined on Nov 2009
@ Cambridge, UK
|
#7
|
The Following 2 Users Say Thank You to Rob1n For This Useful Post: | ||
![]() |
2010-06-11
, 19:44
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#8
|
like i said, the messagebox is insignificant, the whole comparison is going wrong.
text = QString("C") temp = QStringList( [ "org.freedesktop.DBus", "org.freedesktop.Notifications", "cat" ] ) current = QString("") for s in temp: current = QString(s) if not current.startsWith(text, Qt.CaseInsensitive): print "no match" else: print "match"
~/test $python temp.py no match no match match
![]() |
2010-06-11
, 21:09
|
Posts: 3,319 |
Thanked: 5,610 times |
Joined on Aug 2008
@ Finland
|
#9
|
The Following User Says Thank You to attila77 For This Useful Post: | ||
![]() |
2010-06-11
, 21:13
|
Posts: 52 |
Thanked: 8 times |
Joined on Apr 2010
|
#10
|
MATCH: ('org.freedesktop.Notifications' is compared with 'C')
NON-MATCH: ('org.freedesktop.DBus' is compared with 'C')
I cannot see how it thinks the first one starts with a 'C' and the second one doesn't.
I have retrieved a list of all of the DBUS services in string format and I am filtering those strings through a text box by a user-entered string. Is there some sort of format problem here?
(PS: I put the message box in to see which ones it was actually removing from the list)