0

.Popen() と .shlex() を使用して、deluge-console 経由でファイルをロードするスクリプトを取得するのに問題があります。gnome-terminal で xubuntu と byobu を使用しています。

def torrentLoad(url): #client_run = subprocess.Popen(['deluged']]) sourceList = torrentWrite(sortXML(url)) print(sourceList) for s in sourceList: sleep(2) delugeList = ['deluge-console', 'add', s] load = subprocess.Popen(delugeList, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = load.communicate() print(out, err) 変数 sourceList には、xml を解析して torrent ファイルの場所のリストを返す関数が含まれています。(例: '/home/YOURHOME/Documents/torrents/file.torrent')

理論的には、これはコマンドをフィードするはずです: deluge-console add /home/YOURHOME/Documents/torrents/file.torrent をターミナルに直接追加します。私もByobuを運営しています。それがこれに関与するかどうかはわかりません。

私が得ている出力はnoddaです。助けてくれてありがとう。

4

0 に答える 0