Ask coding questions

← Back to all posts
Python code doesn't work, so I need debugging
silvxrcat (1)

Hi! My code doesn't work. It's a custom terminal I made, but it can't run commands. Example: run exec addfile (your username). It should work, but all it does is do nothing. It can't run commands. I made a parser and maybe that's the problem, but if you can please in detail explain how I could fix this.

Thanks, and have a good foo bar :)

Answered by InvisibleOne (3264) [earned 5 cycles]
View Answer
InvisibleOne (3264)

Your while True loop isn't breaking.

silvxrcat (1)

@InvisibleOne can you show me how to fix it?

InvisibleOne (3264)

After your else statement on line 14 add break @silvxrcat