推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
tedd
V2EX  ›  Python

如何将mac bash替换为iPython呢

  •  
  •   tedd · Oct 19, 2013 · 5951 views
    This topic created in 4589 days ago, the information mentioned may be changed or developed.
    默认启动就让启动iPython,我搜了条命令但用了没有效果...

    exec /usr/local/bin/ipython -noconfirm_exit -p sh to my .bashrc
    7 replies    1970-01-01 08:00:00 +08:00
    livelazily
        1
    livelazily  
       Oct 19, 2013   ❤️ 1
    terminal->Preferences->Settings->Shell->Startup->Run command
    这里填写启动的时候需要执行的命令
    alexrezit
        2
    alexrezit  
       Oct 19, 2013
    @livelazily
    正解. 顺便说一句, 用绝对路径.
    tedd
        3
    tedd  
    OP
       Oct 19, 2013
    @livelazily 原来如此,感谢了!
    但好像如果是默认iPython的话,有些命令就执行不了了?之前我看到别人打开django的shell命令后,在里面也可以用ipython,有tab自动补全这些功能,但好像现在我连django的shell都执行不了

    In [8]: python manage.py shell
    File "<ipython-input-8-c7c1a9bc8c9e>", line 1
    python manage.py shell
    ^
    SyntaxError: invalid syntax
    livelazily
        4
    livelazily  
       Oct 19, 2013   ❤️ 1
    @tedd 建议你看看这个 http://stackoverflow.com/a/3531548/902058
    ipython不是普通的shell,不能直接在里面跑"python"这个命令,要运行某个脚本试试"%run scriptfile.py"
    mengzhuo
        5
    mengzhuo  
       Oct 19, 2013   ❤️ 1
    @tedd 这种用法太可爱啊

    Ipython是Python Console的升级版而已
    shell请换zsh,一次拥有,终身不想换

    P.S. @livelazily 说的方法还要设置ENV才能启动django
    xiaket
        6
    xiaket  
       Oct 19, 2013
    简单地说, 不要这样做.
    ChiangDi
        7
    ChiangDi  
       Oct 19, 2013 via Android
    @xiaket 我也奇怪为什么这么做
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5655 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 60ms · UTC 03:37 · PVG 11:37 · LAX 20:37 · JFK 23:37
    ♥ Do have faith in what you're doing.