[PyKDE] KURL.List

Russell Valentine russ at coldstonelabs.org
Wed Sep 17 07:56:01 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I am having problems understanding how to use KURL.List

for example in C++ I would do something like this.

urls= KFileDialog::getOpenURLs(...)
for( KURL::List::ConstIterator it = urls.begin(); it != urls.end(); it++){
    KURL url = (*it);
    openDocumentFile(url);
}


How do I do something like this in python and pykde?

I've tried:

it=urls.begin()
while it != urls.end():
    self.view.openDocument(it)
    it = it+1

and

for i in range(urls.count()):
    self.view.openDocument(urls[0])

and

for url in urls:
    self.view.openDocument(url)

and

for i in range(urls.count()):
    self.view.openDocument(*urls.at(i))

and

for i in range(urls.count()):
    self.view.openDocument(urls.at(i))


I think I'm missing some big concept. I can't seem to figure it out, I
would be grateful for any help.


Russell Valentine
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/Z/c0O0EDJO5MgRYRAnT1AJ9bHx9jNZltKPbqsgxfYqyTOMCgwwCdEqOw
wzJCPXoUpCAyKLzoKvN3tkk=
=U0hi
-----END PGP SIGNATURE-----




More information about the PyQt mailing list