#πŸ”’ Can someone help me with my project?

22 messages Β· Page 1 of 1 (latest)

vast path
#

Hello, my project is something like a command prompt or something like that
i need help for 2 things
1 - Being able to run other commands after one was already ran
Like when i use a command in the project i cant use the other ones after that
2 - Disabling/Enabling input
When something is loading, i dont want the user to be able to type anything and interrupt the text

sudden crystalBOT
#

@vast path

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

tender yew
#

for the first one you can create a loop and each time you ask in input command, and break the loop when command is something like say exit. I don't know about the second one though.

vast path
#

i dont want to be able to type when its loading

tender yew
#

Yeah I see... I can't think of a way to solve that though...

vast path
#

i dont have much knowledge about loops

tender yew
#

alright

#
while True:
    cmd = input("(cmd)-> ")
    
    if cmd == "help":
        pass
    
    if cmd == "...":
        pass
    
    // Write your commands

    if cmd == "exit":
        break
vast path
tender yew
#

uhh it will loop right so as long as the command is not exit, you will get to input another command after running one

vast path
#

@tender yew

#

Uhh

#

@tender yew

wheat surge
#

pass should not exist in the if statement

tender yew
#

remove the pass and replace it with your print statements

vast path
#

thank you all

sudden crystalBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.