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
#π Can someone help me with my project?
22 messages Β· Page 1 of 1 (latest)
@vast path
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.
Closes after a period of inactivity, or when you send !close.
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.
i dont want to be able to type when its loading
the second one is smth like this
Yeah I see... I can't think of a way to solve that though...
okay then can you show me an example code of this
i dont have much knowledge about loops
alright
while True:
cmd = input("(cmd)-> ")
if cmd == "help":
pass
if cmd == "...":
pass
// Write your commands
if cmd == "exit":
break
ok thanks but how do i make it open another input to run another command after i run one
uhh it will loop right so as long as the command is not exit, you will get to input another command after running one
oh okay i forgot the while True: part
but now it doesnt print anything
@tender yew
Uhh
@tender yew
pass should not exist in the if statement
remove the pass and replace it with your print statements
thank you all
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.