8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# -*- coding: utf-8 -*-
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# pyconsole: Example program showing use of console functions
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# in the lxc python binding
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# (C) Copyright Oracle. 2013
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# Dwight Engen <dwight.engen@oracle.com>
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# This library is free software; you can redistribute it and/or
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# modify it under the terms of the GNU Lesser General Public
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# License as published by the Free Software Foundation; either
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# version 2.1 of the License, or (at your option) any later version.
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# This library is distributed in the hope that it will be useful,
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# but WITHOUT ANY WARRANTY; without even the implied warranty of
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# Lesser General Public License for more details.
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# You should have received a copy of the GNU Lesser General Public
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# License along with this library; if not, write to the Free Software
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek sys.exit("Usage: %s container-name [ttynum [escape]]" % sys.argv[0])
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek print("Container:%s tty:%d Ctrl-%c q to quit" %
8df69bbc58c2f4d3f0b34be9756d9ddf24b1db6dJakub Hrozek print("Console done")