實現步驟:
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!