-2
我有一個SQLite數據庫創建當前代碼:Python中創建的SQLite數據庫
import storage
import os
import audiotools
def store_dir(d):
store = storage.HashStore()
for root, bar, files in os.walk(d):
for filename in files:
filename = root + '/' + filename
try:
store.store_file(filename)
print ("Stored %s% filename")
except audiotools.UnsupportedFile:
print ('Skipping unsupported file %s') % filename
except Exception, e:
print (e)
def main():
d = input('Enter the path to the music directory: ')
store_dir(d)
print ("Done.")
if __name__ == '__main__':
main()
運行此代碼時,我得到一個語法錯誤味精。請幫忙 ! 在此先感謝
請包括錯誤堆棧跟蹤。 – tacaswell
以及在這段代碼中你在做什麼與sqlite? – tacaswell