X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=hooke%2Finteraction.py;h=168c905f0ce08edaefa354e6d570c9adad1a76ab;hb=09f3ad6b64e4eee56c2fdec59aa69affc52dd9bd;hp=97ac0b29fcc599944266a72fb687e98e52aa83da;hpb=fd8479a81b918f0f19431bfb1a6ede17f9a84588;p=hooke.git diff --git a/hooke/interaction.py b/hooke/interaction.py index 97ac0b2..168c905 100644 --- a/hooke/interaction.py +++ b/hooke/interaction.py @@ -2,15 +2,15 @@ # # This file is part of Hooke. # -# Hooke is free software: you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation, either -# version 3 of the License, or (at your option) any later version. +# Hooke is free software: you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # -# Hooke is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. +# Hooke is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +# Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with Hooke. If not, see @@ -86,6 +86,14 @@ class Response (Interaction): super(Response, self).__init__(type) self.value = value +class EOFResponse (Response): + """End of user input. + + After this point, no more user interaction is possible. + """ + def __init__(self): + super(EOFResponse, self).__init__('EOF', None) + class BooleanRequest (Request): def __init__(self, msg, default=None): super(BooleanRequest, self).__init__( @@ -124,7 +132,8 @@ class SelectionResponse (Response): class PointRequest (Request): def __init__(self, msg, curve, block=0, default=None): super(PointRequest, self).__init__('point', msg, default) - self.options = options + self.curve = curve + self.block = block class PointResponse (Response): def __init__(self, value):