import [:tablename] filename|list

def do_import(self, line):
        "import [:tablename] filename|list"
        table, line = self.get_table_params(line)
        if line[0] == '[':
            list = self.get_list(line)
        else:
            with open(line) as f:
                list = self.get_list(f.read())

        items = 0
        consumed = 0

        for item in list:
            table.put_item(item)
            #consumed += item.consumed_units
            items += 1
            print item['id']

        print "imported %s items, consumed units:%s" % (items, consumed)