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

import string, serial, time, sys, math, os
from lxml import etree

import k3lib


try:
  k3 = k3lib.K3()

  if len(sys.argv) == 2:
    print(k3.cwspeed(sys.argv[1]))

  if len(sys.argv) == 1:
    print(k3.cwspeedq())
finally:
  k3.close()
