Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Clear screen #97

Open
sepandhaghighi opened this issue Aug 27, 2024 · 2 comments
Open

[Feature]: Clear screen #97

sepandhaghighi opened this issue Aug 27, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sepandhaghighi
Copy link
Owner

Describe the feature you want to add

Clear screen in reset mode

Describe your proposed solution

No response

Describe alternatives you've considered, if relevant

No response

Additional context

No response

@sepandhaghighi sepandhaghighi added the enhancement New feature or request label Aug 27, 2024
@sepandhaghighi sepandhaghighi added this to the nafas v0.8 milestone Aug 27, 2024
@oscarArismendi
Copy link

Hi,

I’d like to help with this issue. Could you please provide an example or clarify when the "reset mode" is used?

Thank you!

@sepandhaghighi
Copy link
Owner Author

Hi @oscarArismendi

We are delighted that you are interested in contributing to this project.

Here :

input("Press [R] to restart or any other key to exit."))

We ask the user to enter a character to either terminate the program or restart it. In the case of a restart, we need to clear the screen. To achieve this, you can use a function like the following:

def clear_screen():
    """
    Clear screen function.

    :return: None
    """
    if sys.platform == "win32":
        os.system('cls')
    else:
        os.system('clear')

Before starting please review CONTRIBUTING.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants