attract.py unified for attract1, attract2 and scorpion