Python安装的实际应用操作

开发 后端
本人对Python安装的实际应用操作的方案的运行有相当不解的地方,以下的文章就是对Python安装的实际相关操作步骤的介绍。

 如果你在Python安装的实际应用的过程中你有一些关于Python安装中存在的问题,你就可以浏览我们的文章,我们的文章就是对其相关内容的介绍,希望你在看完我们的文章,以后会有所收获。

下载windows版本,下载完成以后,双击打开,然后一步一步安装。

  1. *Python 2.5.2 Windows installer 

装好后,启动 Python command line,然后输入:

  1. *Python 2.5.2 Windows installer  

如果输出

  1. "Hello World" 

那就表明安装成功了。简单的配置:右键我的电脑-属性-高级-环境变量,在path里输入你的python安装位置即可,比java简单的多了。我的是 E:\Python25;应该是找到pythonw.exe的父一级目录。测试:随便建一个文件夹,如在d\code\python下建立一个文本文件,并改名为 hello.py在文本中输入

  1. print "Hello World" 

在命令提示符下进入到 d\code\python安装路径下输入python hello.py,直接输入hello.py (必须设置环境变量才可以)程序将会输出Hello World我们看另一个稍微复杂的程序。

  1. integer1=raw_input("enter the first integer:\n")  
  2. intinteger1=int(integer1)  
  3. integer2=raw_input("enter the second integer:\n")  
  4. intinteger2=int(integer2)  
  5. sum=integer1+integer2  
  6. print "The sum is ",sum 

 

另存为sum.py .执行结果为:

  1. E:\>python e:\python\sum.py  
  2. enter the first integer:  
  3. 8  
  4. enter the second integer:  
  5. 11  
  6. The sum is 19 

以上的文章就是对Python安装的实际应用操作方案的介绍。

【编辑推荐】

  1. Python二维数组在创建过程中步骤详解
  2. Python模块中的函数列表介绍
  3. 用Python函数创建字典的实际应用方案
  4. PythonS60手机中搭建手机运行平台的五个步骤
  5. Python字符串中的mapping的功能介绍

 

责任编辑:佚名 来源: 互联网
相关推荐

2010-03-09 19:07:01

Python语法

2010-03-05 13:48:24

Python for

2010-03-17 12:20:15

Python Libr

2010-03-16 18:59:47

Python模块

2010-03-25 17:28:41

Python配置

2010-06-01 15:54:46

MySQL-pytho

2010-03-23 14:54:27

Python目录文件

2010-04-14 17:06:41

Oracle安装路径

2010-03-17 09:32:16

Python安装笔记

2010-03-22 19:11:55

Python连接

2010-03-16 16:47:25

Python数组

2010-03-17 16:27:39

Python矩阵转置

2010-03-23 13:16:14

Python代码加密

2010-04-12 12:30:44

Oracle 安装脚本

2010-05-31 14:59:36

PHP + MySQL

2010-05-18 09:31:05

MySQL修改表

2010-05-07 12:19:38

Oracle删除用户表

2010-03-16 09:20:25

Python时间

2010-03-17 12:37:51

Python定时器

2010-04-21 17:09:17

Oracle安装
点赞
收藏

51CTO技术栈公众号