def swapon(device):
 if (not ismounted(device)):
  run_as_root(('swapon %(device)s' % locals()))

def swapon ( device ) : if ( not ismounted ( device ) ) : run_as_root ( ( 'swapon %(device)s' % locals ( ) ) )
active swap partition example:: from fabtools .