ok, let's wait for the next release then...

Thank you Jim for the info!

Regards,
Juan Ignacio Saitua.




Jim Bublitz <[EMAIL PROTECTED]> 
12/04/06 02:07 PM
Please respond to
[EMAIL PROTECTED]


To
[email protected]
cc
[EMAIL PROTECTED]
Subject
Re: [PyKDE] How to pass UDSEntry to KIO.NetAccess.stat






On Monday 04 December 2006 05:59, [EMAIL PROTECTED] wrote:
> Hi,
>
> I'm a newbie in python and pyKde and was trying to use NetAccess.stat. 
My
> problem is, that the UDSEntry parameter returns always empty.
>
> I tried with the following sample code:
> ------------------------------------------------
> import sys
> from kio import KIO
> from kdecore import KApplication,KURL
>
> app=KApplication(sys.argv, "KIO.NetAccess Testing")
> myURL = KURL("/usr/bin/python")
>
> if KIO.NetAccess.exists(myURL):
>         udsEntry=[]
>         if KIO.NetAccess.stat(myURL, udsEntry):
>                 #It doesn't get any UDSAtom...len (udsEntry) is always 0
>                 print "Number of UDSAtoms in UDSEntry: ", len(udsEntry)
> ------------------------------------------------
>
> Maybe what I'm doing is completely wrong, I don't know, so please help! 
I
> really would appreciate any hint.
>
> P.D: I'm using kubuntu 6.10 with pykde-3.15.2, pyqt-3.16, sip-4.4.5 and
> kde-3.5.5

The KIO.NetAccess.stat methods in PyKDE aren't coded correctly. The list 
(your 
udsEntry variable) should be a return value, not an argument. It should 
be:

   result, udsEntry = KIO.NetAccess.stat (myURL)

where result is bool and udsEntry is a Python list. But the error is in 
PyKDE, 
and if you re-code that way it still won't work until I fix PyKDE.

I'm still trying to get a snapshot together with some other fixes, but it 
will 
be a while - not in the next few days at any rate.

Jim


_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to