i've been trying to make this code work for the last 12 hours, i'm kinda new to programming so it might be obvious for you people, that's why I'm asking for your help
I'm making a menu python script that will execute functions in another .py file.
from adder import inputter
from finder_test import finder
def main():
print("")
print("Khalamm (v0.1) dictionary")
print("")
usrinput = input("/search or /add: ")
if usrinput == "/add":
inputter()
elif usrinput == "/search":
finder()
else:
print("No such command, try again")
main()
main()
when I run the script, it doesn't even ask for input, it just starts the "inputter()" funtion immediately. Could I get clarification on why? I've tried putting the if/elif/else statements in another function and then call it from "main()" but same result.
Aucun commentaire:
Enregistrer un commentaire