Beispiel #1
0
from banner import banner as printBanner
from getdevices import getdevices
from getinfo import getinfo
import sys

printBanner()

if sys.argv[1] == "devices":
    print("Connected devices:")
    print(getdevices())
    exit()

if sys.argv[1] == "device":
    if sys.argv[3] == "placeholder":
        pass
    else:
        dev = sys.argv[2]
        i = getinfo(dev)
        print("")
        print("Fingerprint: " + i["fingerprint"])
        print("Manufacturer: " + i["manufacturer"])
        print("Model: " + i["model"])
        print("Codename: " + i["codename"])
        print("")
        print(i["battery"])
Beispiel #2
0
from getinfo import getinfo
from input import inputfromexcel
from output import output

raws = inputfromexcel('input.xlsx', 'input')
outputlist = []
#multithread
#jason

for raw in raws:
    z = getinfo(raw)
    outputlist += z
output(outputlist)
Beispiel #3
0
  parser.add_option('-v', '--verbose',
                    action='store_true', dest='verbose', default=False,
                    help='print status messages to stdout')

  parser.add_option('-i', '--info', '--infofile',
    dest='infofile', default='./emainfo',
    help='file with processing parameters for each runid')

  (options, args) = parser.parse_args()


  if len(args) > 0:
    runids = args
  else:
    info = getinfo('never',options.infofile)
    if info == None:
      print('emarun(): cannot getinfo()')
      sys.exit(1)
      
    # info = getinfoinit()
    runids = findallrunids(info.trndir)

  for runid in runids:
    info = getinfo(runid,options.infofile)
    if info == None:
      continue
    # print('runid=',runid,'info.runid=',info.runid)

    if info.fltid == None:
      info.fltid = runid
Beispiel #4
0
    action='store_true', dest='do_plot', default=False,
    help='plot some results')

  parser.add_option('-i', '--info', '--infofile',
    dest='infofile', default='./emainfo',
    help='file with processing parameters for each runid')

  (options, args) = parser.parse_args()

  if len(args) < 1:
    parser.print_help()
    exit()

  for arg in args:

    info = getinfo(arg, options.infofile)
    if info.runid == None:
      print('emavel: cannot get info for arg=',arg)
      continue

    runid = info.runid

    print('emavel: arg=',arg,'runid=',runid,'fltid=',info.fltid)

    if options.verbose:
      print('  info.datebeg=',info.datebeg)
      print('  info.dateend=',info.dateend)
      print('  info.decdir=',info.decdir)
      print('  info.veldir=',info.veldir)

    decdir = info.decdir + '/' + info.runid