bin/kvm-admin
author Jens Kasten <jens@kasten-edv.de>
Tue, 27 Mar 2012 03:07:13 +0200
changeset 106 c0c9e51ce567
parent 105 938d696a213e
child 108 8d893ea5aaeb
permissions -rwxr-xr-x
update
106
Jens Kasten <jens@kasten-edv.de>
parents: 105
diff changeset
     1
#!/usr/bin/python2.7
37
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
     2
#
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
     3
# Comamandline tool to manage a qemu-kvm domain.
37
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
     4
#
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
     5
# Usage: kvm-admin guest_name action [arguments]
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
     6
#
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
     7
# Depencies:
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
     8
#           python-argparse
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
     9
#
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    10
# This program is free software; you can redistribute it and/or modify
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    11
# it under the terms of the GNU General Public License as published by
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    12
# the Free Software Foundation; either version 2 of the License, or
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    13
# (at your option) any later version.
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    14
#
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    15
# This program is distributed in the hope that it will be useful,
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    18
# GNU General Public License for more details.
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    19
# 
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    20
# You should have received a copy of the GNU General Public License
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    21
# along with this program; if not, write to the Free Software
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    22
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    23
#
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    24
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    25
"""
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    26
(c) 2007-2012 Jens Kasten <jens@kasten-edv.de> 
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    27
"""
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    28
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    29
import os
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    30
import sys
71
31e017a5948c add argparse import for backward compatibility to python 2.4
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
    31
# for backward compality use the shipped argparse 
31e017a5948c add argparse import for backward compatibility to python 2.4
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
    32
# if python version does not support it
31e017a5948c add argparse import for backward compatibility to python 2.4
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
    33
try:
31e017a5948c add argparse import for backward compatibility to python 2.4
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
    34
    import argparse
31e017a5948c add argparse import for backward compatibility to python 2.4
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
    35
except ImportError:
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    36
    import kvmtools.argparse as argparse
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
    37
import gettext
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    38
54
17b08e781dc6 update and fixes befor merging branch
Jens Kasten <jens@kasten-edv.de>
parents: 53
diff changeset
    39
from kvmtools.kvm.action import Action
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
    40
71
31e017a5948c add argparse import for backward compatibility to python 2.4
Jens Kasten <jens@kasten-edv.de>
parents: 61
diff changeset
    41
# TODO: have to create translation stuff
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    42
LOCALEAPP = sys.argv[0]
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    43
TRANSLATE = gettext.translation(LOCALEAPP, "/usr/share/locale", fallback=True)
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    44
_ = TRANSLATE.ugettext
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    45
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    46
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    47
class KvmAdmin(Action):
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    48
    """ Class for commandline usage for a qemu-kvm domain.
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    49
    Its offers methods for to start and stop the domain.
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    50
    A special method is the commandline monitor.
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    51
    In default configuration its create a socketfile for each domain and
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    52
    is it can use like the standard monitor.
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    53
    """
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    54
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    55
    def __init__(self):
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    56
        # load the methods which are available for doamin
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    57
        Action.__init__(self)
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    58
        self.value = None
61
abba9906ca66 updates and fixes
Jens Kasten <jens@kasten-edv.de>
parents: 59
diff changeset
    59
        self.debug = False
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    60
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    61
    def run(self):
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
    62
        """Do an action for a domain.
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
    63
        Call a method based on commandline option.
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    64
        """
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
    65
        kvm_method = "".join(["kvm_", self.action, "_action"])
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    66
        self.monitor_open()
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
    67
        if "monitor" in self.action or "migrate" in self.action:
59
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
    68
            if self.monitor:
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    69
                # build string from third option till end
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    70
                cmd_monitor = " ".join(str(i) for i in self.monitor)
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    71
                getattr(self, kvm_method)(cmd_monitor)
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    72
            else:
37
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
    73
                raise Exception("Missing monitor argument. Type 'help'.")
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    74
        else:
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    75
            getattr(self, kvm_method)()
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    76
        self.monitor_close()
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    77
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    78
    def show_error(self):
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    79
        """Display errors if the registered."""
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    80
        errors = self.kvm_errors
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    81
        if len(errors) > 0:
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    82
            for error in errors:
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    83
                print error
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    84
            return True
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    85
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    86
    def _set(self, value):
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    87
        self.value = value
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    88
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    89
    def _get(self):
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    90
        return self.value
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    91
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    92
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
    93
def main():
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    94
    """Handle the commandline arguments."""
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
    95
    kvm_admin = KvmAdmin()
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
    96
    actions = kvm_admin.available_actions()
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    97
    domains = kvm_admin.available_domains()
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    98
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
    99
    # manage the commandline arguments
37
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
   100
    parser = argparse.ArgumentParser(
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   101
        epilog="Available domains: %s" % ", ".join(domains))
59
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   102
    parser.add_argument("--debug", default=False, action="store_true",
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   103
        help="Print full execption output.")
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   104
    group1 = parser.add_argument_group(_("QEMU-KVM domain"))
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   105
    group1.add_argument("domain", default=False,
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   106
        metavar=(_("domain_name")),
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   107
        help=_("Choose a KVM domain name, "
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   108
             "its the same like the configuration file name"))
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   109
    group2 = parser.add_argument_group("Action for a domain")
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   110
    group2.add_argument("action", choices=actions, 
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   111
        help=_("Choose an action for the KVM guest"))
59
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   112
    group3 = parser.add_argument_group("Monitor commands")
37
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
   113
    group3.add_argument("monitor", nargs="*", default=False,
44
e1bb11f91cfd fix _add_pidfile_to_config()
Jens Kasten <jens@kasten-edv.de>
parents: 42
diff changeset
   114
        metavar="option",
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   115
        help=_("One ore more arguments can pass to the monitor."))
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   116
    args = parser.parse_args()
37
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
   117
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   118
    if args.action == "create" or args.domain in domains: 
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   119
        kvm_admin.kvm_domain_name = args.domain
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   120
    else:
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   121
        parser.error(_("Available domains: %s") % domains)
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
   122
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   123
    kvm_admin.action = args.action
59
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   124
    kvm_admin.monitor = args.monitor
61
abba9906ca66 updates and fixes
Jens Kasten <jens@kasten-edv.de>
parents: 59
diff changeset
   125
    kvm_admin.debug = args.debug
105
938d696a213e restructe:
Jens Kasten <jens@kasten-edv.de>
parents: 71
diff changeset
   126
55
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   127
    if not args.action == "modify" and kvm_admin.show_error() :
1d4c061d1502 update and fixes for new structur
Jens Kasten <jens@kasten-edv.de>
parents: 54
diff changeset
   128
        sys.exit(1)
59
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   129
    if args.debug:
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   130
        kvm_admin.run()
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   131
    else:
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   132
        try:
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   133
            kvm_admin.run()
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   134
        except Exception, error_msg:
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   135
            print error_msg
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   136
            
8465f1e93a07 remove content from kvmtools/__init__.py; fix: kvm-admin argparse stuff
Jens Kasten <jens@kasten-edv.de>
parents: 55
diff changeset
   137
        
23
06bcb6cf751c add hgignore; move kvm-admin to bin/kvm-admin and do small fixes; add setup.py for installation
Jens Kasten <jens@kasten-edv.de>
parents:
diff changeset
   138
if __name__ == "__main__":
37
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
   139
    try:
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
   140
        main()
7aec53b71183 update and some fixes
Jens Kasten <jens@kasten-edv.de>
parents: 33
diff changeset
   141
    except KeyboardInterrupt:
53
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   142
        print _("\rUser break.")
9eb8be6341f3 new structur for file and class layout
Jens Kasten <jens@kasten-edv.de>
parents: 44
diff changeset
   143
        sys.exit(0)