我有一个包含所有文件的目录:
myDirectory/
directory1/
importantFile.py
Output.py
我该如何在不将Output.py放在同一目录下的情况下,从importantFile.py中导入Output.py?
importantFile.py
import Output
Output.write('This worked!')
Output.py
class Output():
def writeOutput(s):
print s
subprocess.call()
函数? - Morgan Thrapp