Files
deluge/library/test.py

27 lines
628 B
Python
Raw Normal View History

2006-12-01 18:07:03 +00:00
#/*
#Copyright: A. Zakai ('Kripken') <kripkensteiner@gmail.com> http://6thsenseless.blogspot.com
#
#2006-15-9
#
#This code is licensed under the terms of the GNU General Public License (GPL),
#version 2 or above; See /usr/share/common-licenses/GPL , or see
#http://www.fsf.org/licensing/licenses/gpl.html
#*/
2006-12-03 18:20:15 +00:00
import pytorrent
2006-12-01 18:07:03 +00:00
from time import sleep
2006-12-03 18:20:15 +00:00
manager = pytorrent.manager("PT", "0500", "pytorrent - testing only", "test_state.dat")
2006-12-01 18:07:03 +00:00
2006-12-03 18:20:15 +00:00
my_torrent = manager.add_torrent("ubuntu.torrent", ".", True)
print "Unique ID:", my_torrent
2006-12-01 18:07:03 +00:00
while True:
print "STATE:"
2006-12-03 18:20:15 +00:00
print manager.get_state(my_torrent)
2006-12-01 18:07:03 +00:00
print ""
2006-12-03 18:20:15 +00:00
sleep(2)