Statistics
| Revision:

gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / reporters / guireporter.py @ 745

History | View | Annotate | Download (696 Bytes)

1
""" reporter used by gui.py """
2

    
3
import sys
4

    
5
from pylint.interfaces import IReporter
6
from pylint.reporters import BaseReporter
7
from pylint.reporters.ureports.text_writer import TextWriter
8

    
9

    
10
class GUIReporter(BaseReporter):
11
    """saves messages"""
12

    
13
    __implements__ = IReporter
14
    extension = ''
15

    
16
    def __init__(self, gui, output=sys.stdout):
17
        """init"""
18
        BaseReporter.__init__(self, output)
19
        self.gui = gui
20

    
21
    def handle_message(self, msg):
22
        """manage message of different type and in the context of path"""
23
        self.gui.msg_queue.put(msg)
24

    
25
    def _display(self, layout):
26
        """launch layouts display"""
27
        TextWriter().format(layout, self.out)