mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-30 04:32:00 +03:00
glances can work in console mode on windows - windows-curses
This commit is contained in:
parent
3e5ec443ce
commit
4969c19065
@ -305,10 +305,6 @@ Examples of use:
|
||||
if args.disable_autodiscover:
|
||||
logger.info("Auto discover mode is disabled")
|
||||
|
||||
# By default Windows is started in Web mode
|
||||
if WINDOWS:
|
||||
args.webserver = True
|
||||
|
||||
# In web server mode
|
||||
if args.webserver:
|
||||
args.process_short_name = True
|
||||
|
@ -31,14 +31,15 @@ from glances.processes import glances_processes
|
||||
from glances.timer import Timer
|
||||
|
||||
# Import curses library for "normal" operating system
|
||||
if not WINDOWS:
|
||||
try:
|
||||
import curses
|
||||
import curses.panel
|
||||
from curses.textpad import Textbox
|
||||
except ImportError:
|
||||
logger.critical("Curses module not found. Glances cannot start in standalone mode.")
|
||||
sys.exit(1)
|
||||
try:
|
||||
import curses
|
||||
import curses.panel
|
||||
from curses.textpad import Textbox
|
||||
except ImportError:
|
||||
logger.critical("Curses module not found. Glances cannot start in standalone mode.")
|
||||
if WINDOWS:
|
||||
logger.critical("For Windows you can try installing windows-curses with pip install.")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
class _GlancesCurses(object):
|
||||
|
Loading…
Reference in New Issue
Block a user