updated python bindings docs

This commit is contained in:
Arvid Norberg 2008-10-21 09:31:16 +00:00
parent 2fbfca60fb
commit 25edc23e90
2 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ h = ses.add_torrent(info, "./", storage_mode=storage_mode_sparse)
while (not h.is_seed()): while (not h.is_seed()):
s = h.status() s = h.status()
state_str = ['queued', 'checking', 'connecting', 'downloading metadata', \ state_str = ['queued', 'checking', 'downloading metadata', \
'downloading', 'finished', 'seeding', 'allocating'] 'downloading', 'finished', 'seeding', 'allocating']
print '%.2f%% complete (down: %.1f kb/s up: %.1f kB/s peers: %d) %s' % \ print '%.2f%% complete (down: %.1f kb/s up: %.1f kB/s peers: %d) %s' % \
(s.progress * 100, s.download_rate / 1000, s.upload_rate / 1000, \ (s.progress * 100, s.download_rate / 1000, s.upload_rate / 1000, \

View File

@ -114,7 +114,7 @@ A very simple example usage of the module would be something like this::
while (not h.is_seed()): while (not h.is_seed()):
s = h.status() s = h.status()
state_str = ['queued', 'checking', 'connecting', 'downloading metadata', \ state_str = ['queued', 'checking', 'downloading metadata', \
'downloading', 'finished', 'seeding', 'allocating'] 'downloading', 'finished', 'seeding', 'allocating']
print '%.2f%% complete (down: %.1f kb/s up: %.1f kB/s peers: %d) %s' % \ print '%.2f%% complete (down: %.1f kb/s up: %.1f kB/s peers: %d) %s' % \
(s.progress * 100, s.download_rate / 1000, s.upload_rate / 1000, \ (s.progress * 100, s.download_rate / 1000, s.upload_rate / 1000, \