0

这是一个错误,还是我不了解 IPython 中的 %hist ?

In [79]: hist -g shapely
102/16: from shapely import Point, mapping
102/17: from shapely import Point, mapping
102/18: from shapely import mapping
102/19: import shapely
102/20: shapely?
140/53: import shapely
54: import shapely

In [80]: hist -n ~102/14-20
122/14: l
122/15: ls
122/16: nco.variables.keys()
122/17: ls
122/20: nco.sync()

好?似乎有一个 20 的偏移量......为什么?

In [81]: hist -n ~122/14-20
102/14: utm33N = pyproj.Proj(proj='utm', zone=33, south=False, ellipse='ED50')
102/15: import ogr
102/16: from shapely import Point, mapping
102/17: from shapely import Point, mapping
102/18: from shapely import mapping
102/19: import shapely
102/20: shapely?
4

1 回答 1

1

您已将其反转,请参阅输出%history?以获取有关如何调用它的信息

相关位:

``243/1-5``
    Lines 1-5, session 243
``~2/7``
    Line 7, session 2 before current

%history -n ~102/14-20实际上 102 个会话的第 14-20 行也是如此。对于会话 102,删除波浪号:

%history -n 102/14-20
于 2013-04-11T19:03:49.907 回答