예제 #1
0
파일: plugin.py 프로젝트: bigdrum/snaked
    def __init__(self, project):
        """:type project: rope.base.project.Project()"""
        self.project = project
        self.hints_monitor = None

        if project.ropefolder:
            self.hints_filename = os.path.join(project.ropefolder.real_path, 'ropehints.py')
            self.hints_monitor = gio.File(self.hints_filename).monitor_file()
            weak_connect(self.hints_monitor, 'changed', self, 'on_hints_file_changed')
        else:
            self.hints_filename = None

        self.refresh_hints()
예제 #2
0
def connect(sender, signal, obj, attr, idle=False, after=False):
    return Handler(weak_connect(
        sender, signal, obj, attr, idle=idle, after=after), sender)