Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
19a86e72
Commit
19a86e72
authored
Jan 27, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MINHEIGHT. Use self.dict as environment for evaluation.
parent
fac6da22
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
Lib/lib-stdwin/wdbframewin.py
Lib/lib-stdwin/wdbframewin.py
+11
-3
Lib/stdwin/wdbframewin.py
Lib/stdwin/wdbframewin.py
+11
-3
No files found.
Lib/lib-stdwin/wdbframewin.py
View file @
19a86e72
# wdb.py -- a window-based Python debugger
# wdbframewin.py -- frame window for wdb.py
# XXX To do:
# - display function name in window title
# - execute arbitrary statements instead of just evaluating expressions
# - allow setting variables by editing their values
import
stdwin
from
stdwinevents
import
*
...
...
@@ -6,6 +12,7 @@ import basewin
import
sys
WIDTH
=
40
MINHEIGHT
=
8
MAXHEIGHT
=
16
class
FrameWindow
(
basewin
.
BaseWindow
):
...
...
@@ -15,12 +22,13 @@ class FrameWindow(basewin.BaseWindow):
self
.
frame
=
frame
# Not used except for identity tests
self
.
dict
=
dict
self
.
name
=
name
nl
=
max
(
4
,
len
(
self
.
dict
)
)
nl
=
max
(
MINHEIGHT
,
len
(
self
.
dict
)
+
5
)
nl
=
min
(
nl
,
MAXHEIGHT
)
width
=
WIDTH
*
stdwin
.
textwidth
(
'0'
)
height
=
nl
*
stdwin
.
lineheight
()
stdwin
.
setdefwinsize
(
width
,
height
)
self
=
basewin
.
BaseWindow
.
init
(
self
,
'--Frame '
+
name
+
'--'
)
# XXX Should use current function name
self
.
initeditor
()
self
.
displaylist
=
[
'>>>'
,
''
,
'-'
*
WIDTH
]
self
.
refreshframe
()
...
...
@@ -60,7 +68,7 @@ class FrameWindow(basewin.BaseWindow):
output
=
''
else
:
globals
=
self
.
frame
.
f_globals
locals
=
self
.
frame
.
f_locals
locals
=
self
.
dict
try
:
value
=
eval
(
expr
,
globals
,
locals
)
output
=
repr
.
repr
(
value
)
...
...
Lib/stdwin/wdbframewin.py
View file @
19a86e72
# wdb.py -- a window-based Python debugger
# wdbframewin.py -- frame window for wdb.py
# XXX To do:
# - display function name in window title
# - execute arbitrary statements instead of just evaluating expressions
# - allow setting variables by editing their values
import
stdwin
from
stdwinevents
import
*
...
...
@@ -6,6 +12,7 @@ import basewin
import
sys
WIDTH
=
40
MINHEIGHT
=
8
MAXHEIGHT
=
16
class
FrameWindow
(
basewin
.
BaseWindow
):
...
...
@@ -15,12 +22,13 @@ class FrameWindow(basewin.BaseWindow):
self
.
frame
=
frame
# Not used except for identity tests
self
.
dict
=
dict
self
.
name
=
name
nl
=
max
(
4
,
len
(
self
.
dict
)
)
nl
=
max
(
MINHEIGHT
,
len
(
self
.
dict
)
+
5
)
nl
=
min
(
nl
,
MAXHEIGHT
)
width
=
WIDTH
*
stdwin
.
textwidth
(
'0'
)
height
=
nl
*
stdwin
.
lineheight
()
stdwin
.
setdefwinsize
(
width
,
height
)
self
=
basewin
.
BaseWindow
.
init
(
self
,
'--Frame '
+
name
+
'--'
)
# XXX Should use current function name
self
.
initeditor
()
self
.
displaylist
=
[
'>>>'
,
''
,
'-'
*
WIDTH
]
self
.
refreshframe
()
...
...
@@ -60,7 +68,7 @@ class FrameWindow(basewin.BaseWindow):
output
=
''
else
:
globals
=
self
.
frame
.
f_globals
locals
=
self
.
frame
.
f_locals
locals
=
self
.
dict
try
:
value
=
eval
(
expr
,
globals
,
locals
)
output
=
repr
.
repr
(
value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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