merged python 3 support from RC_0_16

This commit is contained in:
Arvid Norberg
2012-07-16 01:12:39 +00:00
parent 0657690b1c
commit bcfba9e485
4 changed files with 23 additions and 9 deletions

View File

@@ -5,6 +5,7 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
import sys
import atexit
import libtorrent as lt
import time
import os.path
@@ -36,7 +37,7 @@ class UnixConsole:
new[6][termios.VMIN] = 1
termios.tcsetattr(self.fd.fileno(), termios.TCSADRAIN, new)
sys.exitfunc = self._onexit
atexit.register(self._onexit)
def _onexit(self):
termios.tcsetattr(self.fd.fileno(), termios.TCSADRAIN, self.old)
@@ -239,7 +240,7 @@ def main():
for f in args:
e = lt.bdecode(open(f, 'rb').read())
info = lt.torrent_info(e)
print 'Adding \'%s\'...' % info.name()
print('Adding \'%s\'...' % info.name())
atp = {}
try: