に私は私が窓から手動で実行できるコマンドは、コマンドプロンプトしており、期待どおりに動作します:、WindowsのCMDパイソンsubprocess.call
> gridcoinresearchd sendmany "Default" {"""x9Bqs6dTm17tsiEyZ9m4j5Yd8N2dpqw""":1.00000000} 2 "Hello World"
だから私は(私のsubprocess.callを構築する)から、以下のようにいくつかの変数は他の変数から派生しています。
その後、call_insert = [val for pair in zip(quotes, quotes, quotes, address, quotes, quotes, quotes, colon, call_amount, comma) for val in pair]
call_insert = str("{"+(''.join(call_insert))+"}")
account_label = str('"'+(raw_input("Choose Account Label: "))+'"')
message = str('"'+(raw_input("Enter if you wish to send a message: "))+'"')
:
subprocess.call(['gridcoinresearchd', 'sendmany', account_label, call_insert, "2", message], shell=True)
私は、ターゲット・プログラムからのエラーを取得subprocess.call使用して:私は手動で変数を作る場合
error: Error parsing JSON:{x9Bqs6dTm17tsiEyZ9m4j5Yd8N2dpqw:1.00000000}
を:
call_insert = str("""{"x9Bqs6dTm17tsiEyZ9m4j5Yd8N2dpqw":1.00000000}""")
私のsubprocess.call()が動作します。
これは、私は、私のsubprocess.call()文字列に必要な引用符をwindowsコマンドプロンプトがどのように解釈しているのか混乱していると思います。
私はそれが理にかなっていると思います。