[pygtk] gnomevfs.async.get_file_info problem

Ogz comp.ogz at gmail.com
Mon Jul 18 20:59:14 WST 2005


İ found my mistake: when i use gnomevfs.async.get_file_info in the
button on_click event that open a filedialog at the remote host, it
worked fine.  I have a line like:
filedialog2.filechooserdialog2.set_current_folder_uri(uri)
 
in the same funciton i used the gnomevfs.async.get_file_info(). 
So what i learned is, if i close the filechooserdialog, and trying use
an url like (user at host/path) doesnt work for get_file_info :)

Sı it seems when it is closed, the connection is also closed.


On 7/18/05, Gustavo J. A. M. Carneiro <gjc at inescporto.pt> wrote:
> 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.
> 
> 
>


More information about the pygtk mailing list