#!/usr/bin/env python from BitQueue import launchmanycore_bittornado from BitQueue import launchmanycore_bittorrent def set_core(core=None): if core and core.lower() == 'bittornado': core = 'launchmanycore_bittornado' else: core = 'launchmanycore_bittorrent' exec 'from BitQueue import '+core core = eval(core) global LaunchManyThread,bencode,bdecode,init_core LaunchManyThread = core.LaunchManyThread bencode = core.bencode bdecode = core.bdecode set_core()