xiaozhuaia 发表于 2017-4-25 10:24:44

python拷贝、设置环境变量

#!/usr/bin/python
#FileName:setDbgServerBridge.py
import os
path=os.environ["HOME"] + "/lib"
if os.path.exists(path)==False :
os.makedirs(path)
else:
print "exists"
dstFile=path + "/libeclipse_ct_debug_core_utility_DbgServerBridge.so"
srcFile="./libeclipse_ct_debug_core_utility_DbgServerBridge.so"
commandLine = "cp ./libeclipse_ct_debug_core_utility_DbgServerBridge.so " +dstFile
os.system(commandLine)
os.environ["LD_LIBRARY_PATH"]=path


代码见附件
页: [1]
查看完整版本: python拷贝、设置环境变量