EmbASP-Python
dlv2_desktop_service.py
1 from platforms.desktop.desktop_service import DesktopService
2 from specializations.dlv2.dlv2_answer_sets import DLV2AnswerSets
3 
4 
6  """Extention of DesktopService for DLV2."""
7 
8  def __init__(self, exe_path):
9  super(DLV2DesktopService, self).__init__(exe_path)
10  self._load_from_stdin_option = "--stdin"
11 
12  def _get_output(self, output, error):
13  """Returns a new DLV2AnwerSets from given output and error."""
14  return DLV2AnswerSets(output, error)
15 
16  def start_async(self, callback, programs, options):
17  """Calls start_async method of a superclass."""
18  super(DLV2DesktopService, self).start_async(
19  callback, programs, options)
20 
21  def start_sync(self, programs, options):
22  """Calls start_sync method of a superclass and returns its output
23  object."""
24  return super(DLV2DesktopService, self).start_sync(programs, options)
platforms.desktop.desktop_service
Definition: desktop_service.py:1
specializations.dlv2.desktop.dlv2_desktop_service.DLV2DesktopService
Definition: dlv2_desktop_service.py:5
specializations.dlv2.desktop.dlv2_desktop_service.DLV2DesktopService.start_async
def start_async(self, callback, programs, options)
Definition: dlv2_desktop_service.py:16
platforms.desktop.desktop_service.DesktopService
Definition: desktop_service.py:11
specializations.dlv2.dlv2_answer_sets.DLV2AnswerSets
Definition: dlv2_answer_sets.py:5
specializations.dlv2.dlv2_answer_sets
Definition: dlv2_answer_sets.py:1
platforms.desktop.desktop_service.DesktopService._load_from_stdin_option
_load_from_stdin_option
Definition: desktop_service.py:17