擅长:python、mysql、java
<p>这是你的循环。在</p>
<pre><code>else:
#print "Does not exist"
newMetaFile=FileNm+"_BaseMetadata.xml"
= Tkinter.Tk()
file = tkFileDialog.askopenfile(parent=root,mode='rb',title='Choose a xml base file to match with: '+File)
if file != None:
=os.path.abspath(file.name)
file.close()
print metafile
shutil.copy2(metafile,newMetaFile)
print "copied"
else:
shutil.copy2('L:\Data_Admin\QA\Metadata_python_toolset\Master_Metadata.xml', newMetaFile)
tree=et.parse(newMetaFile)
print "Processing: "+str(File)
</code></pre>
<p>最后你想说:</p>
^{pr2}$
<p>这就结束了循环</p>
<p>或者你可以用这个(例子)</p>
<pre><code>x=0
for y in z:
x+=1
if x == 20:
break
</code></pre>
<p>这将运行循环20次
哦,在第二次之后你需要缩进。在</p>