擅长:python、mysql、java
<p>您需要<code>return</code>来自<code>initiate_values</code>的字典:</p>
<pre><code>def initiate_values(directory):
for file in glob.glob(os.path.join(directory, '*.[xX][lL][sS]')):
title = os.path.basename(file).lower()
if title == 'etc.xls':
wb = xlrd.open_workbook(file)
wb = wb.sheet_by_name(u'Sheet1')
return get_values(file, wb) # added `return'
return {} # or some other value
</code></pre>