[pygtk] gnomevfs.async.get_file_info problem

Gustavo J. A. M. Carneiro gjc at inescporto.pt
Mon Jul 18 20:14:18 WST 2005


On Mon, 2005-07-18 at 11:24 +0300, Ogz wrote:
> Here is my code:
> 
> def fileinfo_callback(handle, results):
>         for uri, exc_type, info in results:
>                 print uri
>                 print info

  Can you print exc_type?  Maybe there was an error?

>                 if not exc_type:
>                         try:
>                                 print  info.size
>                         except ValueError:
>                                 pass
> 
> 
> this function is defined abeve the main Window class, so it is global.
> 
> In the main window,  which is created by tepache using glade i am
> using a code for a button's on_click event
>  
> uri = server + "/" + self.Txt_add.get_text()
> gnomevfs.async.get_file_info(uri,fileinfo_callback, options =
> gnomevfs.FILE_INFO_DEFAULT)
> 
> and here is the output:
> 
> file:oguz at 192.168.2.210:22/home/oguz/identity.pub
> <gnomevfs.FileInfo '(null)'>
> 
> so i can not get the size of the file. I dont know what the problem
> is, if you help i will be happy.
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Gustavo J. A. M. Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3086 bytes
Desc: not available
Url : http://localhost.localdomain/pipermail/pygtk/attachments/20050718/c23ef8e2/smime.bin


More information about the pygtk mailing list