Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CPUnetLOG
CPUnetLOG
Commits
3606d110
Commit
3606d110
authored
Aug 19, 2014
by
Mario Hock
Browse files
Break comment into multiple lines, if necessary.
parent
555ff913
Changes
1
Hide whitespace changes
Inline
Side-by-side
curses_display.py
View file @
3606d110
...
...
@@ -46,6 +46,8 @@ LABEL_CPU_UTIL = LABEL_Sent
LABEL_CPU_USER
=
LABEL_Received
LABEL_CPU_SYSTEM
=
64
COMMENT_WIDTH
=
66
## TODO ideas..
# - Add an option to set a fixed max. net-speed manually (for comparison)
...
...
@@ -261,7 +263,11 @@ def display(measurement):
if
(
comment
):
y
+=
3
stdscr
.
addstr
(
y
,
3
,
'Comment: '
,
curses
.
A_BOLD
)
stdscr
.
addstr
(
y
,
3
+
9
,
comment
)
parts
=
(
comment
[
i
:
i
+
COMMENT_WIDTH
]
for
i
in
range
(
0
,
len
(
comment
),
COMMENT_WIDTH
)
)
for
part
in
parts
:
stdscr
.
addstr
(
y
,
3
+
9
,
part
)
y
+=
1
stdscr
.
refresh
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment