重定向到 Python 中的网站
Redirecting to a website in Python
我在 Python 第一天,我刚刚制作了这个管理员登录页面脚本。
如果它在您输入正确的用户名和密码时将您重定向到一个网站,我会很高兴。
我已经在 Whosebug 上搜索过这个,但我找不到 "easy"。
有什么建议吗?
print ("Pannello di Log-In in caricamento")
import time
time.sleep (2)
username=raw_input ("USERNAME: ")
if username=="admin":
time.sleep (1)
print (" ")
else:
time.sleep (1)
print (" ")
password=raw_input ("PASSWORD: ")
if password=="psw":
time.sleep (1)
print ("LOGGING-IN")
else:
time.sleep (1)
print ("LOGGING-IN")
从 python 打开网页:
import webbrowser
webbrowser.open('http://example.com') # Go to example.com
我在 Python 第一天,我刚刚制作了这个管理员登录页面脚本。 如果它在您输入正确的用户名和密码时将您重定向到一个网站,我会很高兴。 我已经在 Whosebug 上搜索过这个,但我找不到 "easy"。 有什么建议吗?
print ("Pannello di Log-In in caricamento")
import time
time.sleep (2)
username=raw_input ("USERNAME: ")
if username=="admin":
time.sleep (1)
print (" ")
else:
time.sleep (1)
print (" ")
password=raw_input ("PASSWORD: ")
if password=="psw":
time.sleep (1)
print ("LOGGING-IN")
else:
time.sleep (1)
print ("LOGGING-IN")
从 python 打开网页:
import webbrowser
webbrowser.open('http://example.com') # Go to example.com