这段代码的语法错误是什么?Python 3.4版

2024-04-24 03:39:52 发布

您现在位置:Python中文网/ 问答频道 /正文

print ('\t -m, --method\t\tHTTP Method to use \'get\' or \'post\'  or \'random\'\t\t(default: get)')

语法错误:无效语法

enter image description here

enter image description here

    print (GOLDENEYE_BANNER)
print 
print (' USAGE: ./goldeneye.py <url> [OPTIONS]')
print
print (' OPTIONS:')
print ('\t Flag\t\t\tDescription\t\t\t\t\t\tDefault')
print ('\t -u, --useragents\tFile with user-agents to use\t\t\t\t(default: randomly generated)')
print ('\t -w, --workers\t\tNumber of concurrent workers\t\t\t\t(default: {0})'.format(DEFAULT_WORKERS))

print ('\t -s, --sockets\t\tNumber of concurrent sockets\t\t\t\t(default: {0})'.format(DEFAULT_SOCKETS)
print ('\t -m, --method\t\tHTTP Method to use \'get\' or \'post\'  or \'random\'\t\t(default: get)')
print ('\t -d, --debug\t\tEnable Debug Mode [more verbose output]\t\t\t(default: False)')
print ('\t -h, --help\t\tShows this help')

Tags: oroftodefaultgetuserandompost
1条回答
网友
1楼 · 发布于 2024-04-24 03:39:52

错误在第553行。缺少右括号。你知道吗

第553行应该是:

print('\t -s,  sockets\t\tNumber of concurrent sockets\t\t\t\t(default: {0})'.format(DEFAULT_SOCKETS))

相关问题 更多 >