how to import the blog.py(i import the 'blog' folder)

Posted by zjm1126 on Stack Overflow See other posts from Stack Overflow or by zjm1126
Published on 2010-05-14T08:01:51Z Indexed on 2010/05/14 8:04 UTC
Read the original article Hit count: 582

Filed under:
|

my dir location,i am in a.py:

my_Project
     |----blog
            |-----__init__.py
            |-----a.py
            |-----blog.py

when i 'from blog import something' in a.py , it show error:

from blog import BaseRequestHandler
ImportError: cannot import name BaseRequestHandler

i think it import the blog folder,not the blog.py

so how to import the blog.py

© Stack Overflow or respective owner

Related posts about python

Related posts about import