Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 9:22:46 μ.μ. UTC+2, ο χρήστης Chris  
> You should use the input() function (called raw_input() in Python 2)
> for a user name, and the getpass module for the password:

i have just tried:

        # Give user the file requested
        url = "http://superhost.gr/data/files/%s"; % realfile
        
        username = getpass.getuser()
        password = getpass.getpass()
        
        r = requests.get( url, auth = (username, password) )# ask user for 
authentication data
        r.raise_for_status() 


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to