作者:保佑欣疼你的芯疼 | 2022-01-06 05:44
实现步骤:1.PyCharm,IDE有个Projectsetting图标,是给run图标做配置的,配置runfile为myfile.py2.复制代码代码如下:#--------------------------------------#!/usr/bin/python#File:myfile.py
实现步骤:
1. PyCharm, IDE有个Project setting图标,是给run图标做配置的,配置run file为myfile.py
2.
复制代码 代码如下:
# --------------------------------------
#! /usr/bin/python
# File: myfile.py
# Author: Michael Fan
from make.py import do
def main():
do()
if __name__ == '__main__':
main()
# --------------------------------------
3.
复制代码 代码如下:
mic@ubt: ~$ ls
> make.py myfile.py
mic@ubt: ~$ ./myfile.py
> Hello, world!