for*_*ran 6 python bash import module
我需要从已经启动的Python会话中执行Python脚本,就像它是从命令行启动一样.我在考虑类似于source在bash或sh中做.
source
Jas*_*rff 11
在Python 2中,内置函数execfile执行此操作.
execfile
execfile(filename)
归档时间:
15 年,9 月 前
查看次数:
6606 次
最近记录:
10 年,1 月 前