我正在将一组zli文件从一个文件夹复制到另一个文件夹。现在我需要解压缩该文件夹中的每个文件。我使用Pycharm从Windows运行python,文件夹在Linux服务器上。如何才能到达当前文件夹并解压缩每个文件?在from __future__ import with_statement
from fabric.api import *
import ConfigParser, paramiko, shutil, os, glob, zlib
def get_Connection():
config = ConfigParser.RawConfigParser()
config.read('config.cfg')
env.user = config.get('UK_CDN','db.user_name' )
env.password = config.get('UK_CDN','db.password' )
host = config.get('UK_CDN','db.ip' )
with settings(hide('warnings', 'running', 'stdout', 'stderr'), warn_only=True, host_string=host):
paramiko.util.log_to_file('ENC_Analysis.log')
files = run('ls -ltr /home/ndsuser/enc/data/dbSchema_1/catalogue_24802')
run('rm -rf /usr/rosh/ENC_Analysis/*')
run('cp /home/ndsuser/enc/data/dbSchema_1/catalogue_24802/* /usr/rosh/ENC_Analysis/')
count = run('ls -l /usr/rosh/ENC_Analysis/ | wc -l')
os.chdir('/usr/rosh/ENC_Analysis/')
for file in os.listdir('/usr/rosh/ENC_Analysis/'):
print file
如果我运行这个代码,我会得到如下问题。在
^{pr2}$
我知道这个问题是因为系统无法在Windows机器中找到路径。如何从Windows机器访问Linux服务器中的路径?在