[pygtk] nautilus-python

Germán Poó Caamaño gpoo at ubiobio.cl
Wed May 23 22:00:35 WST 2007


On Fri, 2007-04-27 at 09:01 +0200, Dimitri Van Landuyt wrote:
> Dear pygtk mailing list;
> 
> I am trying to write a nautilus extension in python, and running into a
> problem. For my project, I need access to the GnomeVFSFileInfo object
> linked to the nautilus file by using the method get_vfs_file_info() on
> the file passed to my property page. However, when executing this
> method, my Nautilus (on Ubuntu Feisty) seems go in an endless loop and
> after a while crashes. This is also confirmed on other distributions.
> Is there an alternative way to access the gnomevfs object linked to a 
> NautilusFile? Any reason why this happens? What am I doing wrong?
> 
> code:
> 
> import gnomevfs
> import nautilus
> 
> def get_property_pages(self, files):
>         if len(files) != 1:
>             return
>         file = files[0]
> 	file_info = gnomevfs.get_file_info(file_uri)
> 
> At the final step my script hangs...
>         
> Thanks in advance for help!

You should create a class that inherits from
nautilus.PropertyPageProvider and then override the method
get_property_page.

-- 
Germán Poó Caamaño
Concepción - Chile



More information about the pygtk mailing list