Access files in the previous directory in python

import sys
sys.path.append ("…")
adds this sentence directly on the header:
S
---- S1, S2
T
—T1, T2

If you want to access S1 in S in T1, you can directly add the above code to the head of T1, and then call
import S.S1
and so on in T1.

Published 129 original articles · Like 43 · Visits 100,000+

Guess you like

Origin blog.csdn.net/nbxuwentao/article/details/103606575