Python 基礎教程
Python 內置函數(shù)
execfile() 函數(shù)可以用來執(zhí)行一個文件。
以下是 execfile() 方法的語法:
execfile(filename[, globals[, locals]])
返回表達式執(zhí)行結果。
以下展示了使用 execfile 函數(shù)的實例:
假設文件 hello.py,內容如下:
print('json');