diff options
author | Jeffrey C. Ollie <jeff@ocjtech.us> | 2008-08-12 22:43:32 -0500 |
---|---|---|
committer | Jeffrey C. Ollie <jeff@ocjtech.us> | 2008-08-12 22:43:32 -0500 |
commit | 0656c6f358edb67a5a57b5a24fb95facb6b603b3 (patch) | |
tree | 15245bd2a9d7876cb1975b5dde7a2c6f22ea7174 | |
parent | 590eadfa40bdc93dbe6876a641d5b91c8ea9db9c (diff) | |
download | nohgooee-0656c6f358edb67a5a57b5a24fb95facb6b603b3.tar.gz nohgooee-0656c6f358edb67a5a57b5a24fb95facb6b603b3.tar.xz nohgooee-0656c6f358edb67a5a57b5a24fb95facb6b603b3.zip |
Get rid of the obsolete python support module.
-rw-r--r-- | BitTorrent/Connecter.py | 1 | ||||
-rw-r--r-- | BitTorrent/ConvertedMetainfo.py | 2 | ||||
-rw-r--r-- | BitTorrent/Storage.py | 2 | ||||
-rw-r--r-- | BitTorrent/bencode.py | 2 | ||||
-rw-r--r-- | BitTorrent/bitfield.py | 2 | ||||
-rw-r--r-- | BitTorrent/makemetafile.py | 1 | ||||
-rw-r--r-- | BitTorrent/obsoletepythonsupport.py | 42 | ||||
-rw-r--r-- | BitTorrent/parseargs.py | 2 | ||||
-rw-r--r-- | BitTorrent/track.py | 2 | ||||
-rwxr-xr-x | bittorrent-curses.py | 1 | ||||
-rwxr-xr-x | launchmany-curses.py | 1 |
11 files changed, 0 insertions, 58 deletions
diff --git a/BitTorrent/Connecter.py b/BitTorrent/Connecter.py index 2d69a2d..33909ce 100644 --- a/BitTorrent/Connecter.py +++ b/BitTorrent/Connecter.py @@ -18,7 +18,6 @@ from struct import pack, unpack from BitTorrent.RawServer_magic import Handler from BitTorrent.bitfield import Bitfield -from BitTorrent.obsoletepythonsupport import * def toint(s): return unpack("!i", s)[0] diff --git a/BitTorrent/ConvertedMetainfo.py b/BitTorrent/ConvertedMetainfo.py index 49eda7e..20a6fc8 100644 --- a/BitTorrent/ConvertedMetainfo.py +++ b/BitTorrent/ConvertedMetainfo.py @@ -17,8 +17,6 @@ import os import sys from sha import sha -from BitTorrent.obsoletepythonsupport import * - from BitTorrent.bencode import bencode from BitTorrent import btformats from BitTorrent import BTFailure, WARNING, ERROR diff --git a/BitTorrent/Storage.py b/BitTorrent/Storage.py index a494cb7..8f1d6fb 100644 --- a/BitTorrent/Storage.py +++ b/BitTorrent/Storage.py @@ -14,8 +14,6 @@ import os from bisect import bisect_right from array import array -from BitTorrent.obsoletepythonsupport import * - from BitTorrent import BTFailure, app_name diff --git a/BitTorrent/bencode.py b/BitTorrent/bencode.py index 1ee1d66..2fcdeb8 100644 --- a/BitTorrent/bencode.py +++ b/BitTorrent/bencode.py @@ -10,8 +10,6 @@ # Written by Petru Paler -from BitTorrent.obsoletepythonsupport import * - from BitTorrent import BTFailure def decode_int(x, f): diff --git a/BitTorrent/bitfield.py b/BitTorrent/bitfield.py index f9fb511..bede74f 100644 --- a/BitTorrent/bitfield.py +++ b/BitTorrent/bitfield.py @@ -12,8 +12,6 @@ from array import array -from BitTorrent.obsoletepythonsupport import * - counts = [chr(sum([(i >> j) & 1 for j in xrange(8)])) for i in xrange(256)] counts = ''.join(counts) diff --git a/BitTorrent/makemetafile.py b/BitTorrent/makemetafile.py index ba6583c..798f325 100644 --- a/BitTorrent/makemetafile.py +++ b/BitTorrent/makemetafile.py @@ -21,7 +21,6 @@ from threading import Event from BitTorrent.bencode import bencode, bdecode from BitTorrent.btformats import check_info from BitTorrent.parseargs import parseargs, printHelp -from BitTorrent.obsoletepythonsupport import * from BitTorrent import BTFailure from khashmir.node import Node diff --git a/BitTorrent/obsoletepythonsupport.py b/BitTorrent/obsoletepythonsupport.py deleted file mode 100644 index c119da1..0000000 --- a/BitTorrent/obsoletepythonsupport.py +++ /dev/null @@ -1,42 +0,0 @@ -# The contents of this file are subject to the BitTorrent Open Source License -# Version 1.1 (the License). You may not copy or use this file, in either -# source code or executable form, except in compliance with the License. You -# may obtain a copy of the License at http://www.bittorrent.com/license/. -# -# Software distributed under the License is distributed on an AS IS basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. - -from __future__ import generators - -import sys - -if sys.version_info < (2, 3): - # Allow int() to create numbers larger than "small ints". - # This is NOT SAFE if int is used as the name of the type instead - # (as in "type(x) in (int, long)"). - int = long - - def enumerate(x): - i = 0 - for y in x: - yield (i, y) - i += 1 - - def sum(seq): - r = 0 - for x in seq: - r += x - return r - -del sys - -def import_curses(): - import curses - if not hasattr(curses, 'use_default_colors'): - def use_default_colors(): - return - curses.use_default_colors = use_default_colors - return curses - diff --git a/BitTorrent/parseargs.py b/BitTorrent/parseargs.py index 2db0b9a..5289aff 100644 --- a/BitTorrent/parseargs.py +++ b/BitTorrent/parseargs.py @@ -13,8 +13,6 @@ from types import * from cStringIO import StringIO -from BitTorrent.obsoletepythonsupport import * - from BitTorrent.defaultargs import MyBool, MYTRUE from BitTorrent import BTFailure from BitTorrent.bencode import bdecode diff --git a/BitTorrent/track.py b/BitTorrent/track.py index 5333938..b6ec2db 100644 --- a/BitTorrent/track.py +++ b/BitTorrent/track.py @@ -23,8 +23,6 @@ from types import StringType, IntType, LongType, ListType, DictType from binascii import b2a_hex from cStringIO import StringIO -from BitTorrent.obsoletepythonsupport import * - from BitTorrent.parseargs import parseargs, formatDefinitions from BitTorrent.RawServer_magic import RawServer from BitTorrent.HTTPHandler import HTTPHandler, months, weekdays diff --git a/bittorrent-curses.py b/bittorrent-curses.py index a4dc9a3..f5d906f 100755 --- a/bittorrent-curses.py +++ b/bittorrent-curses.py @@ -32,7 +32,6 @@ from BitTorrent.zurllib import urlopen from BitTorrent.bencode import bdecode from BitTorrent.ConvertedMetainfo import ConvertedMetainfo from BitTorrent.prefs import Preferences -from BitTorrent.obsoletepythonsupport import import_curses from BitTorrent import configfile from BitTorrent import BTFailure from BitTorrent import version diff --git a/launchmany-curses.py b/launchmany-curses.py index 86f8329..8f925ae 100755 --- a/launchmany-curses.py +++ b/launchmany-curses.py @@ -23,7 +23,6 @@ import sys, os from threading import Event from time import time, localtime, strftime -from BitTorrent.obsoletepythonsupport import * from BitTorrent.launchmanycore import LaunchMany from BitTorrent.defaultargs import get_defaults from BitTorrent.parseargs import parseargs, printHelp |