-1

I am reading Automate the boring stuff with python and when I am running the program in the terminal it is not prompting for a input. I want to give many lines as input. How can I do this?

1 Answers1

1

The the example in the book expects you to give your input when you are running program like,

python foo.py username password

If you want to be prompted while running use something like below in your script,

username = input("enter your username")
password = input("enter your password")

and then copy using pyperclip

pyperclip.copy(username)
Prakash Palnati
  • 3,231
  • 22
  • 35
  • phoneAndEmail.py program is a bit different right? As noted in the book if i want to copy and paste from a webpage im not able to do. When i run the code in the terminal i directly get output as "there are no phone numbers " – Pavan Gudiwada Jun 30 '17 at 11:47
  • Not different I would say, your string has to match the regex patterns specified or your are not copying any strings at all.. If my answer for username and password resolved your question, please accept it as answer. – Prakash Palnati Jul 03 '17 at 09:33