問題描述:我在code文件夾下編寫了translate.py 和 test.py兩個(gè)腳本文件担忧。想在test.py中import translate.py的一個(gè)函數(shù)椭迎,發(fā)現(xiàn)卻不行稻轨。 image.png 解決方案:只需要把把translate.py所在的文件夾設(shè)置為sources root即可抡秆。 image.png 這樣就行了 image.png