Python 中怎么 copy 文件和目录
<div class="hl-main"><span style="color: #808080;">>>> import shutil>>> dir(shutil)['Error', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '_samefile', 'abspath', 'copy', 'copy2', 'copyfile', 'copyfileobj', 'copymode', 'copystat', 'copytree', 'destinsrc', 'move', 'os', 'rmtree', 'stat', 'sys']>>> shutil.copyfile('d:/c.sql','d:/cc.sql')>>>from http://www.pythonid.com/html/fenleiwenzhang/normalproblem/20070705/78.htmlmulu:>>> import shutil>>> shutil.copytree('d:/test','d:/testd')>>> <div class="hl-main"><div class="hl-main">From http://www.pythonid.com/html/fenleiwenzhang/normalproblem/20070705/79.html
页:
[1]