我的代碼在今天早些時候工作得很好,直到我改變了我正在使用的幾個庫。Python 2.7.5變量名稱語法錯誤
File "wimmer.py", line 29
category = raw_input('Give me a category: ')
^
SyntaxError: invalid syntax
我不太清楚什麼是錯的:現在,當我嘗試運行代碼,我得到這個錯誤。有什麼建議麼?
代碼:(壓痕稍微偏離)
browser = Browser()
book = open_workbook(join('googleurls.xls'), formatting_info=True, on_demand=True)
testcell = book.sheet_by_index(0).cell(0,15).value
print ('The test link is: %s' % (testcell))
raw_input("Press ENTER to continue")
with book as myfile:
for i in range(0, 9):
line = book.sheet_by_index(0).cell(i,15).value
#for line in myfile:
browser.visit(line)
print ('The link is: %s' % (line))
print ('The search term is: %s' % (myfile.cell(i, 0))
#enter terminal prompts
category = raw_input('Give me a category: ')
print ('Your category was %s' % (category))
#put this in the excel sheet in the right column
fusion = raw_input('Fuse with another? ')
print('Term was fused with %s' % (fusion))
#put this in the excel sheet in the right column
translate = raw_input('Change translation to -? ')
print('Term was translated to %s' % (translate))
#put this in the excel sheet in the right column
raw_input("Press ENTER to continue") #moves onto next link
那條線很好。檢查上面的一個(s)缺少括號/括號/等。 – iCodez
你能展示周圍的線條嗎? –
我對[這個問題]的評論(http://stackoverflow.com/questions/26917678/python-programming-syntax-error-for-game)was soooo true ... – Matthias