<br><font size=2 face="Courier New">ok, let's wait for the next release
then...</font>
<br>
<br><font size=2 face="Courier New">Thank you Jim for the info!</font>
<br>
<br><font size=2 face="Courier New">Regards,</font>
<br><font size=2 face="Courier New">Juan Ignacio Saitua.</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Jim Bublitz <jbublitz@nwinternet.com></b>
</font>
<p><font size=1 face="sans-serif">12/04/06 02:07 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
jbublitz@nwinternet.com</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">pykde@mats.imk.fraunhofer.de</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top><font size=1 face="sans-serif">jisaitua@covenco.cl</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">Re: [PyKDE] How to pass UDSEntry
to KIO.NetAccess.stat</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>On Monday 04 December 2006 05:59, jisaitua@covenco.cl
wrote:<br>
> Hi,<br>
><br>
> I'm a newbie in python and pyKde and was trying to use NetAccess.stat.
My<br>
> problem is, that the UDSEntry parameter returns always empty.<br>
><br>
> I tried with the following sample code:<br>
> ------------------------------------------------<br>
> import sys<br>
> from kio import KIO<br>
> from kdecore import KApplication,KURL<br>
><br>
> app=KApplication(sys.argv, "KIO.NetAccess Testing")<br>
> myURL = KURL("/usr/bin/python")<br>
><br>
> if KIO.NetAccess.exists(myURL):<br>
> udsEntry=[]<br>
> if KIO.NetAccess.stat(myURL, udsEntry):<br>
> #It doesn't
get any UDSAtom...len (udsEntry) is always 0<br>
> print "Number
of UDSAtoms in UDSEntry: ", len(udsEntry)<br>
> ------------------------------------------------<br>
><br>
> Maybe what I'm doing is completely wrong, I don't know, so please
help! I<br>
> really would appreciate any hint.<br>
><br>
> P.D: I'm using kubuntu 6.10 with pykde-3.15.2, pyqt-3.16, sip-4.4.5
and<br>
> kde-3.5.5<br>
<br>
The KIO.NetAccess.stat methods in PyKDE aren't coded correctly. The list
(your <br>
udsEntry variable) should be a return value, not an argument. It should
be:<br>
<br>
result, udsEntry = KIO.NetAccess.stat (myURL)<br>
<br>
where result is bool and udsEntry is a Python list. But the error is in
PyKDE, <br>
and if you re-code that way it still won't work until I fix PyKDE.<br>
<br>
I'm still trying to get a snapshot together with some other fixes, but
it will <br>
be a while - not in the next few days at any rate.<br>
<br>
Jim<br>
<br>
</tt></font>
<br>