1
我有一個調用python腳本的Adobe Air程序。我不認爲動作3.0正在進行適當的調用。代碼:從Actionscript調用python
var file:File;
var args:Vector.<String> = new Vector.<String>;
file = new File().resolvePath("/usr/bin/python");
var pyScript:File;
pyScript = File.applicationDirectory.resolvePath("python/mac/merge.py");
var tempOutPath:String = File.applicationStorageDirectory.resolvePath("out.pdf").nativePath;
args.push(pyScript.nativePath, "-w", "-o", tempOutPath, "-i");
for(var x:int; x < numFilesToProcess; x++){
var pdfPath:String = File(pdfs.getItemAt(x)).nativePath;
args.push(pdfPath);
}
callNative(file, args);
在終端(蘋果機),以下工作正常:
python merge.py -w -o out.pdf -i file1.pdf file2.pdf
的args.push(pyScript.native ....行是問題的一個我會很感激一些幫助