<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 &lt;jbublitz@nwinternet.com&gt;</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>
&gt; Hi,<br>
&gt;<br>
&gt; I'm a newbie in python and pyKde and was trying to use NetAccess.stat.
My<br>
&gt; problem is, that the UDSEntry parameter returns always empty.<br>
&gt;<br>
&gt; I tried with the following sample code:<br>
&gt; ------------------------------------------------<br>
&gt; import sys<br>
&gt; from kio import KIO<br>
&gt; from kdecore import KApplication,KURL<br>
&gt;<br>
&gt; app=KApplication(sys.argv, &quot;KIO.NetAccess Testing&quot;)<br>
&gt; myURL = KURL(&quot;/usr/bin/python&quot;)<br>
&gt;<br>
&gt; if KIO.NetAccess.exists(myURL):<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; udsEntry=[]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; if KIO.NetAccess.stat(myURL, udsEntry):<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #It doesn't
get any UDSAtom...len (udsEntry) is always 0<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;Number
of UDSAtoms in UDSEntry: &quot;, len(udsEntry)<br>
&gt; ------------------------------------------------<br>
&gt;<br>
&gt; Maybe what I'm doing is completely wrong, I don't know, so please
help! I<br>
&gt; really would appreciate any hint.<br>
&gt;<br>
&gt; P.D: I'm using kubuntu 6.10 with pykde-3.15.2, pyqt-3.16, sip-4.4.5
and<br>
&gt; 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>
 &nbsp; 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>