Python-Caja Context Menu Entry

I added an item to the context menu but I have a little problem with this script, I can't pass it the file(s) notepadqq needs to open:

    import os
    import urllib
    from gi.repository import Caja, GObject
    class ColumnExtension(GObject.GObject, Caja.MenuProvider):
            def __init__(self):

    def menu_activate_cb(self, menu, file):
            os.system("notepadqq pid=$!")

    def get_file_items(self, window, file):
        item = Caja.MenuItem(name='NotepadMenuProvider::Notepad', 
                                         label='Edit with Notepadqq', 
        item.connect('activate', self.menu_activate_cb, file)
        return item,
1 Like