Galaxie Shell 0.2.6 documentation


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

© Copyright 2020-2024, Galaxie Shell Team.

Top » Module code » glxshell.utilities.clear

Source code for glxshell.utilities.clear

import sys

from glxshell.lib.argparse import ArgumentParser


parser_clear = ArgumentParser(
    name="clear",
    description="Clear screen",
)


[docs] def glxsh_clear(): """ Internal function it clear the screen """ try: sys.stdout.write("\x1b[2J\x1b[H") return 0 except (Exception, ArithmeticError) as error: # pragma: no cover sys.stderr.write("clear: %s\n" % error) return 1

Top » Module code » glxshell.utilities.clear

© 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.