V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2012-09-28 00:34:47 +08:00 · 3164 次点击
    这是一个创建于 4249 天前的主题,其中的信息可能已经有所发展或是发生改变。
    直接运行的时候是可以的,但是在shell里import的时候提示找不到模块~~
    我的.py文件明明是在那个文件夹的啊@_@
    6 条回复    1970-01-01 08:00:00 +08:00
    clino
        1
    clino  
       2012-09-28 13:50:29 +08:00
    你是说ulipad里的 shell窗口?
    你确定ulipad的当前目录是你期望的目录吗?
    vanisher
        2
    vanisher  
    OP
       2012-09-28 16:47:23 +08:00
    @clino 确定啊,我特意cd ..了再进我的目录的啊
    clino
        3
    clino  
       2012-09-28 17:06:24 +08:00
    @vanisher 没看懂,ulipad里的shell窗口是python的交互模式,怎么cd?
    你在交互模式里
    import os;print os.getcwd()
    这样看看当前目录
    vanisher
        4
    vanisher  
    OP
       2012-09-28 17:45:37 +08:00
    @clino 可以cd啊,我是先cd ..返回一步,再进入我的目录
    但是import我写的.py文件就import不了
    clino
        5
    clino  
       2012-09-28 20:39:50 +08:00
    你到底是在命令行还是在python的交互模式?
    vanisher
        6
    vanisher  
    OP
       2012-09-30 12:14:06 +08:00
    @clino 我在ulipad里的shell窗口啊,这里可以用cd啊
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2826 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 11:41 · PVG 19:41 · LAX 04:41 · JFK 07:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.