Skip to content

Commit 7ee24c8

Browse files
committed
remove value from who_pb
1 parent 8083f0a commit 7ee24c8

File tree

1 file changed

+35
-33
lines changed

1 file changed

+35
-33
lines changed

backend/pagebreaksip/src/pagebreaksip/pagebreak_magic.py

+35-33
Original file line numberDiff line numberDiff line change
@@ -118,44 +118,46 @@ def get_type(vv):
118118
exportedwidth = len(exportedLabel) + colsep
119119
scopewidth = len(scopeLabel) + colsep
120120
# table header
121-
print(varlabel.ljust(varwidth) + typelabel.ljust(typewidth) + scopeLabel.ljust(scopewidth) + exportedLabel.ljust(exportedwidth) + \
122-
' '+datalabel+'\n' + '-'*(varwidth+typewidth+len(datalabel)+1))
121+
print(varlabel.ljust(varwidth) + typelabel.ljust(typewidth) + scopeLabel.ljust(scopewidth) + exportedLabel.ljust(exportedwidth)
122+
# + ' '+datalabel+'\n'
123+
# + '-'*(varwidth+typewidth+len(datalabel)+1)
124+
)
123125
# and the table itself
124126
kb = 1024
125127
Mb = 1048576 # kb**2
126128
def printEntry(vname: str,var: Any,vtype:str, scope: str = "global", exported:str = ""):
127-
print(vformat.format(vname, vtype, scope, str(exported), varwidth=varwidth, typewidth=typewidth, scopewidth=scopewidth, exportedwidth=exportedwidth), end=' ')
128-
if vtype in seq_types:
129-
print("n="+str(len(var)))
130-
elif vtype == ndarray_type:
131-
vshape = str(var.shape).replace(',','').replace(' ','x')[1:-1]
132-
if vtype==ndarray_type:
133-
# numpy
134-
vsize = var.size
135-
vbytes = vsize*var.itemsize
136-
vdtype = var.dtype
129+
print(vformat.format(vname, vtype, scope, str(exported), varwidth=varwidth, typewidth=typewidth, scopewidth=scopewidth, exportedwidth=exportedwidth), end='\n')
130+
# if vtype in seq_types:
131+
# print("n="+str(len(var)))
132+
# elif vtype == ndarray_type:
133+
# vshape = str(var.shape).replace(',','').replace(' ','x')[1:-1]
134+
# if vtype==ndarray_type:
135+
# # numpy
136+
# vsize = var.size
137+
# vbytes = vsize*var.itemsize
138+
# vdtype = var.dtype
137139

138-
if vbytes < 100000:
139-
print(aformat % (vshape, vsize, vdtype, vbytes))
140-
else:
141-
print(aformat % (vshape, vsize, vdtype, vbytes), end=' ')
142-
if vbytes < Mb:
143-
print('(%s kb)' % (vbytes/kb,))
144-
else:
145-
print('(%s Mb)' % (vbytes/Mb,))
146-
else:
147-
try:
148-
vstr = str(var)
149-
except UnicodeEncodeError:
150-
vstr = var.encode(DEFAULT_ENCODING,
151-
'backslashreplace')
152-
except:
153-
vstr = "<object with id %d (str() failed)>" % id(var)
154-
vstr = vstr.replace('\n', '\\n')
155-
if len(vstr) < 50:
156-
print(vstr)
157-
else:
158-
print(vstr[:25] + "<...>" + vstr[-25:])
140+
# if vbytes < 100000:
141+
# print(aformat % (vshape, vsize, vdtype, vbytes))
142+
# else:
143+
# print(aformat % (vshape, vsize, vdtype, vbytes), end=' ')
144+
# if vbytes < Mb:
145+
# print('(%s kb)' % (vbytes/kb,))
146+
# else:
147+
# print('(%s Mb)' % (vbytes/Mb,))
148+
# else:
149+
# try:
150+
# vstr = str(var)
151+
# except UnicodeEncodeError:
152+
# vstr = var.encode(DEFAULT_ENCODING,
153+
# 'backslashreplace')
154+
# except:
155+
# vstr = "<object with id %d (str() failed)>" % id(var)
156+
# vstr = vstr.replace('\n', '\\n')
157+
# if len(vstr) < 50:
158+
# print(vstr)
159+
# else:
160+
# print(vstr[:25] + "<...>" + vstr[-25:])
159161

160162
for scopeNum in sorted(varsByScope):
161163
# print("Pagebreak : ", str(scopeNum))

0 commit comments

Comments
 (0)