我在python脚本文件中使用了以下3个变量。
sourcePath,knoxPath,redShiftKeyFolderPath
我想传递这些变量的值&使用下面的脚本执行它们。
import sys, subprocess
knoxPath = r"C:\sunil_plus\dataset\knoxFile.xlsx"
redShiftKeyFolderPath = r"C:\sunil_plus\redShift"
sourcePath = 'C:\sunil_plus\dataset\Source1'
subprocess.call([sys.executable, r"D:\Sunil_Work\1_redShift.py", 'htmlfilename.htm']) # want to pass knoxPath, redShiftKeyFolderPath, sourcePath
sourcePath = 'C:\sunil_plus\dataset\Source2'
subprocess.call([sys.executable, r"D:\Sunil_Work\2_redShift.py", 'htmlfilename.htm']) # want to pass knoxPath, redShiftKeyFolderPath, sourcePath
sourcePath = 'C:\sunil_plus\dataset\Source3'
subprocess.call([sys.executable, r"D:\Sunil_Work\3_redShift.py", 'htmlfilename.htm']) # want to pass knoxPath, redShiftKeyFolderPath, sourcePath
另外,我想得到脚本文件的输出。