data.py get_cmdline: use errors=replace for unicode errors
[iotop.git] / sbin / iotop
blobbb23a6e93761eab5396089894cee483d7dfa8367
1 #!/usr/bin/python3
2 # iotop: Display I/O usage of processes in a top like UI
3 # Copyright (c) 2007, 2008 Guillaume Chazarain <guichaz@gmail.com>, GPLv2
4 # See iotop --help for some help
6 from __future__ import print_function
7 import sys
9 try:
10     from iotop.ui import main
11 except ImportError as e:
12     print(e)
13     print('To run an uninstalled copy of iotop,')
14     print('launch iotop.py in the top directory')
15 else:
16     try:
17         main()
18     except KeyboardInterrupt:
19         pass
20     sys.exit(0)