IDEA 学习笔记之 Python项目开发

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项目开发