Theo tài liệu, tôi sẽ có thể xác định macro và lưu trữ macro. Sau đó, macro sẽ có sẵn vào lần sau khi tôi khởi động shell IPython. Tuy nhiên, nó không hoạt động:Lưu trữ macro trong IPython
In [4]: print "Foobarbatbizbuzzbonk"
Foobarbatbizbuzzbonk
In [5]: %macro foo 4
Macro `foo` created. To execute, type its name (without quotes).
=== Macro contents: ===
print "Foobarbatbizbuzzbonk"
In [6]: %store foo
Stored 'foo' (Macro)
In [7]: quit()
Khi tôi bắt đầu vỏ IPython một lần nữa, không có macro:
In [1]: foo
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-1-d3b07384d113> in <module>()
----> 1 foo
NameError: name 'foo' is not defined
In [2]: %macro
Out[2]: []
Có ai biết tại sao điều này không hoạt động?
có cùng ở đây ... docus rất khó đọc: ( – tim