I'm writing a backup script. It gathers all files with predefined extentions, splits them up in categories and copies them to new folders (if the user wants it). Part of my code is asking the user if he/she wants to copy these items. I've written a function for it.
- Code: Select all
def AskPrint(type, action):
while not (inp.lower() == 'y' or inp.lower() == 'n') :
if inp=='y' :
As long as I start the script within IDLE(python GUI) everything works fine. However, if I run this script from the command line(python <scriptnamehere>), I go into an endless loop. Now I'm wondering why. Is there a difference between input in IdLE and input from cmd?
if you're interested in the complete script, let me know, I'll post it.