If the import module in the same dir, use e.g: from . import core If the import module in the top dir, use e.g: from .. import core If the import module in the other subdir, use e.g: from ..other import core
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import sys print('================Python import mode=========================='); print ('The command line arguments are:') for i in sys.argv: print (i) print ('\n The python path',sys.path)
from sys import argv,path#导入特定的成员 print('================python from import===================================') print('path:',path)