On Wed, 1 Feb 2017 07:10:39 -0800 (PST), Νίκος Βέργος wrote: > # Give user the file requested > url = "http://superhost.gr/data/files/%s" % realfile > > user, password = 'user', 'passwd' > > r = requests.get( url, auth = (user, password) ) # send auth unconditionally > r.raise_for_status() >========================== > > How can i ASK the user for http auth data and store them isntead of > giving them to the script?
Maybe like this? user = raw_input("User: ") password = raw_input("Password: ") -- To email me, substitute nowhere->runbox, invalid->com. -- https://mail.python.org/mailman/listinfo/python-list