Galaxie Shell 0.2.6 documentation


Navigation:   | Index   | Search   | Top   | Up   |
Table of Content: |

© Copyright 2020-2024, Galaxie Shell Team.

Top » Module code » glxshell.lib.command

Source code for glxshell.lib.command


from glxshell.lib.argparse import ArgumentParser


[docs] class Command(object): def __init__(self): self.__parser = None self.__exit_status = None self.__stdin = None self.__stdout = None self.__stderr = None self.parser = None self.exit_status = None self.stdin = None self.stdout = None self.stderr = None @property def parser(self): return self.__parser @parser.setter def parser(self, value): if value is None: self.__parser = None if not isinstance(value, ArgumentParser): raise TypeError("'parser' property value must be a ArgumentParser instance or None") if value != self.parser: self.__parser = value @property def exit_status(self): return self.__exit_status @exit_status.setter def exit_status(self, value): if value is None: self.__exit_status = 0 if type(value) != int: raise TypeError("'exit_status' property value must be a int type or None") if value != self.exit_status: self.__exit_status = value

Top » Module code » glxshell.lib.command

© Copyright 2020-2024, Galaxie Shell Team.
This page is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License (CC BY-NC-SA 4.0).
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

Last updated on None.
Created using Sphinx 8.0.2.