乌班图中使用命令行打开一个python文件报错,NameError: name 'network_dismantling' is not defined

乌班图中使用命令行打开一个python文件报错,NameError: name 'network_dismantling' is not defined。如图该怎么解决,谢谢各位大佬。

img

输入exit()退出python交互界面
然后输入python xxx.py运行对应文件