1.PyCharm,IDE有个Projectsetting图标,是给run图标做配置的,配置runfile为myfile.py
2.
代码如下:
#————————————–
#!/usr/bin/python
#File:myfile.py
#Author:MichaelFan
frommake.pyimportdo
defmain():
do()
if__name__==’__main__’:
main()
#————————————–
3.
代码如下:
mic@ubt:~$ls
>make.pymyfile.py
mic@ubt:~$./myfile.py
>Hello,world!