Skip to content

Commit 5d68fb7

Browse files
mbarkhaujonathanslenders
authored andcommitted
Fix pager.py example when not in same directory
1 parent 118aa7f commit 5d68fb7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/full-screen/pager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616

1717
# Create one text buffer for the main content.
1818

19-
with open('./pager.py', 'rb') as f:
19+
_pager_py_path = __file__
20+
21+
22+
with open(_pager_py_path, 'rb') as f:
2023
text = f.read().decode('utf-8')
2124

2225

2326
def get_statusbar_text():
2427
return [
25-
('class:status', './pager.py - '),
28+
('class:status', _pager_py_path + ' - '),
2629
('class:status.position', '{}:{}'.format(
2730
text_area.document.cursor_position_row + 1,
2831
text_area.document.cursor_position_col + 1)),

0 commit comments

Comments
 (0)