IDEA 学习笔记之 Python项目开发IDEA 学习笔记之 Python项目开发

Python项目开发:

 

下载Python:

https://www.python.org/downloads/release/python-363/

IDEA 学习笔记之 Python项目开发

安装Python:

IDEA 学习笔记之 Python项目开发

配置 PYTHON_HOME :

IDEA 学习笔记之 Python项目开发

添加到 环境变量(path):

IDEA 学习笔记之 Python项目开发

Console测试:

IDEA 学习笔记之 Python项目开发

下载IDEA Python插件:

https://plugins.jetbrains.com/plugin/631-python

IDEA 学习笔记之 Python项目开发

本地安装插件:

IDEA 学习笔记之 Python项目开发


或者在线安装:

IDEA 学习笔记之 Python项目开发

新建Python工程:

IDEA 学习笔记之 Python项目开发

新建Python文件:

IDEA 学习笔记之 Python项目开发

点绿箭头可以运行, 代码如下:

IDEA 学习笔记之 Python项目开发
#! /usr/bin/env python
# -*- coding: utf-8 -*-

def foo():
    str="function"
    print(str);

def foo1(num):
    print('num' ,num);

def foo2(name ,age):
    print('name' ,name);
    print('age' ,age);

if __name__=="__main__":
    print("main")
    foo2('yuhui' ,30)
    foo1(6)
    foo()
IDEA 学习笔记之 Python项目开发

运行结果:

IDEA 学习笔记之 Python项目开发

相关文章:

  • 2021-04-27
  • 2021-09-17
  • 2021-12-03
  • 2022-12-23
  • 2022-01-13
  • 2021-11-30
  • 2021-06-07
  • 2022-01-13
猜你喜欢
  • 2021-12-01
  • 2022-02-08
  • 2022-01-23
  • 2021-08-03
  • 2021-07-21
  • 2021-11-28
  • 2021-07-21
相关资源
相似解决方案