Beispiel #1
0
 def get_definition(widget, msg):
     """
     gets the definition of a word using definition.Definition
     :param: widget is the widget which calls the function
     :return: none
     """
     defined = definition.Definition(widget.value).get()
     widget.outputdiv.text = " ".join(defined)
Beispiel #2
0
    def serve(cls, req):
        wp = jp.WebPage()

        word = req.query_params.get('w')
        defined = definition.Definition(word).get()

        response = {"word": word, "definition": defined}

        wp.html = json.dumps(response)

        return wp
Beispiel #3
0
 def get_definition(widget, msg):
     defined = definition.Definition(widget.value).get()
     widget.outputdiv.text = " ".join(defined)
Beispiel #4
0
 def get_definition(widget, msg):
     # defined = definition.Definition(widget.inputbox.value).get() - button
     defined = definition.Definition(widget.value).get()
     widget.outputdiv.text = " / ".join(defined)