比如说,我有这么一个 test.py:
```
print 'hello world!'
1+1
a=3
a
```
如果我在 terminal 运行的话:
```
$ python test.py
hello world!
```
我想达成这么一个效果,在 terminal 运行:
```
$ magicpython test.py
>>> print 'hello world!'
hello world!
>>> 1+1
2
>>> a=3
>>> a
3
```
我想知道的就是 magicpython 这个程序怎样写。原生的 python 和 ipython 都没有这个效果。
```
print 'hello world!'
1+1
a=3
a
```
如果我在 terminal 运行的话:
```
$ python test.py
hello world!
```
我想达成这么一个效果,在 terminal 运行:
```
$ magicpython test.py
>>> print 'hello world!'
hello world!
>>> 1+1
2
>>> a=3
>>> a
3
```
我想知道的就是 magicpython 这个程序怎样写。原生的 python 和 ipython 都没有这个效果。
