#!/usr/bin/python
# Elecraft K3/K2 Rig Control Python Utilities
# Copyright (C) 2006-2011 Leigh L. Klotz, Jr <Leigh@WA5ZNU.org>
# Licensed under Academic Free License 3.0 (See LICENSE)

import sys
import k3lib as riglib

try:
    rig = riglib.K3()

    if len(sys.argv) == 1:
        print(rig.paq())
    elif len(sys.argv) > 1:
        print(rig.pa(sys.argv[1]))

finally:
    rig.close()
