Absolute and Relative directory
Absolute directory and Relative directoryimport osprint(ps.path.abspath('.'))print(ps.path.abspath('..'))If we have a file b.py in /home/a , how can I import b.py to my file?There are three solutions we can use.1)import syssys.path.append("/home/a
原创
2020-08-13 18:23:47 ·
156 阅读 ·
0 评论