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

时间:2016-05-07 05:49:34

标签: python python-3.x

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')

1 个答案:

答案 0 :(得分:1)

错误在第553行。您缺少右括号。

第553行应该是:

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