What's the difference between these two import syntaxes in python? -


~/     a/         __init__.py         a1.py         a2.py 

a1.py:

from a2 import y 

a2.py

import sys sys.path.append('/home/shellfly/') import a1  # raise importerror a.a1 import c # normal 

what's difference between:

 package import module 

and

 module import var"  

and why did above import expression throw exception?

i got exception in django, app folder, in pythonpath, , have add work directory test code

from import a1 still inside a folder. a2.py expect /a/a/a1.py

eclipse throws error; unresolved import a2, it's not in file's absolute path.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -