Traceback <most recent call last>:
File "wexec.py", line 37, in <module>
urlopen = urllib.urlopen('%xs' % (hcon))
NameError: name 'hcon' is not defined
我通过在 python 中执行此代码得到了这个问题:
def hell():
hcon = raw_input(Fore.RED + Style.BRIGHT + "Website: ")
h1 = httplib.HTTPConnection('%s' % (hcon))
urlopen = urllib.urlopen('%s' % (hcon))
hell()
正如你所看到的,我认为它没有任何问题。但是有些东西给了它这个错误。我该怎么办?