V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
vanisher
V2EX  ›  Python

ulipad4.1里的shell import不了。。。

  •  
  •   vanisher · Sep 28, 2012 · 3664 views
    This topic created in 4972 days ago, the information mentioned may be changed or developed.
    直接运行的时候是可以的,但是在shell里import的时候提示找不到模块~~
    我的.py文件明明是在那个文件夹的啊@_@
    6 replies    1970-01-01 08:00:00 +08:00
    clino
        1
    clino  
       Sep 28, 2012
    你是说ulipad里的 shell窗口?
    你确定ulipad的当前目录是你期望的目录吗?
    vanisher
        2
    vanisher  
    OP
       Sep 28, 2012
    @clino 确定啊,我特意cd ..了再进我的目录的啊
    clino
        3
    clino  
       Sep 28, 2012
    @vanisher 没看懂,ulipad里的shell窗口是python的交互模式,怎么cd?
    你在交互模式里
    import os;print os.getcwd()
    这样看看当前目录
    vanisher
        4
    vanisher  
    OP
       Sep 28, 2012
    @clino 可以cd啊,我是先cd ..返回一步,再进入我的目录
    但是import我写的.py文件就import不了
    clino
        5
    clino  
       Sep 28, 2012
    你到底是在命令行还是在python的交互模式?
    vanisher
        6
    vanisher  
    OP
       Sep 30, 2012
    @clino 我在ulipad里的shell窗口啊,这里可以用cd啊
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3041 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:34 · PVG 17:34 · LAX 02:34 · JFK 05:34
    ♥ Do have faith in what you're doing.