Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python-libtorrent-torrent\u-info方法_Python_Python 2.x_Torrent_Libtorrent - Fatal编程技术网

python-libtorrent-torrent\u-info方法

python-libtorrent-torrent\u-info方法,python,python-2.x,torrent,libtorrent,Python,Python 2.x,Torrent,Libtorrent,我一直在使用pythonlibtorrent检查在包含多个文件的torrent中哪些片段属于一个文件 我正在使用下面的代码对torrent文件进行迭代 info = libtorrent.torrent_info('~/.torrent') for f in info.files(): print f 但这会返回,我不知道如何从中提取信息 我不知道torrent\u info属性会返回各种文件的片值信息。非常感谢您的帮助。该API已记录在案并已发布。显然,Python API不能总是完

我一直在使用
pythonlibtorrent
检查在包含多个文件的torrent中哪些片段属于一个文件

我正在使用下面的代码对torrent文件进行迭代

info = libtorrent.torrent_info('~/.torrent')
for f in info.files():
    print f
但这会返回
,我不知道如何从中提取信息

我不知道
torrent\u info
属性会返回各种文件的片值信息。非常感谢您的帮助。

该API已记录在案并已发布。显然,Python API不能总是完全像C++那样。但通常情况下,接口采用文件索引并返回该文件的某些属性