为什么80%的码农都做不了架构师?>>>

http://dlwt.csdn.net/fd.php?i=858467711513251&s=27caceefbe77d6532f648bb5ae3bc048    这个是Python for MyEclipse的插件

http://dlsw.baidu.com/sw-search-sp/soft/6e/17016/python-3.3.5.1418106245.msi   这个是Python for Windows 安装文件

安装好所需要的文件 。即可在MyEclipse里面开始Python最简单的测试了。

首先选择Python的编译器  在MyEclipse Windows-preferences      New

输入名称

选择编译器

选择所有的 确认OK  等待一下安装

完毕之后 就可以开始创建Python工程测试了

选择project

选择Pydev Project 下一步

选择个语法版本2.5

对工程src -NEW -PyDev Module

新建的后缀名为  .py  自动会切换到PyDev perspective 这个视图下可以更好的编辑。

hello world  代码就一行  比java的少了很多。


简单的安装和Python代码运行测试就是这样。很简单。都不需要duang duang duang的。

简单的基础运用代码   可以自己试试一下哦。

2015-03-03 Python 基础知识

'''@author: 小帅丶
@todo: Python安装使用第一步
Created on 2015-03-03
'''
#coding=utf-8
#Python for String-----------------
str  = "HelloWorld"print (str);#输出字符串内容
print (str[0]);#索引为0的内容
print (str[2:5]);#索引x到y的内容  包头不包尾
print (str *2);#输出2次内容
print (str + "Test");#输出连接的内容
print ('---------------------------------------------');#Python for List  -------------------
list  = ['abcd',786,2.23,'john',70.2]
tinylist = [123,'john']print (list); #输出list
print (list[0]);
print (list[1:3]);
print (list[2:]);#索引2开始 直到最后一个内容输出
print (tinylist*2);
print (list + tinylist);
print ('---------------------------------------------');#Python for 元组
tuple  = ('abcd',786,2.23,'john',70.2)
#tuple[0] = 'zxs' 元组是不可以修改的  List可以
tinytuple = (123,'john')print (tuple);#输出元组
print (tuple[0]);
print (tuple[1:3]);
print (tuple[2:]);
print (tinytuple*2);
print (tuple + tinytuple);
print ('---------------------------------------------');#Python 元字典
dict = {}
dict['one'] = "This is one"
dict[2] = "This is two"
tinydict = {'name':'john','code':6734,'dept':'sales'}#key value的关系print (dict['one']);#输出键为  one的值
print (dict[2]);#输出键为  2的值
print (tinydict);
print (tinydict.keys()); #输出所有的键
print (tinydict.values());#输出所有的值
print ('---------------------------------------------');

2015-03-04 Python 基础知识

'''
Created on 2015-3-4@author: 小帅丶
'''#Python for 运算
a = 21
b = 10
c = 0c = a + b
print ("Line 1 - Value of c is ",c);#加法c = a - b
print ("Line 2 - Value of c is ",c);#减法c = a * b
print ("Line 3 - Value of c is ",c);#乘法c = a / b
print ("Line 4 - Value of c is ",c);#除法c = a % b
print ("Line 5 - Value of c is ",c);#取余a = 2
b = 5
c = a**b
print ("Line 6 - Value of c is ",c);#2的5次方a = 9
b = 2
c = a//b
print ("Line 7 - Value of c is ",c);#取整除
print ("--------------------------");#Python for 比较运算符
a = 21
b = 10
c = 0
if(a == b):print ("Line 1 - a is equal to b");
else:print ("Line 1 - a is not equal to b");if(a != b):print ("Line 2 - a is not equal to b");
else:print ("Line 2 - a is equal to b");#if(a <> b):
#    print ("Line 3 - a is not equal to b");
#else:
#    print ("Line 3 - a is equal to b");if(a < b):print ("Line 4 - a is less than b");
else:print ("Line 4 - a is not less than b");if(a > b):print ("Line 5 - a is greater than b");
else:print ("Line 5 - a is not greater than b");a = 5
b = 20
if(a <= b):print ("Line 6 - a is either less than b");
else:print ("Line 6 - a is not neither less than not b");if(b >= a):print ("Line 7 - b is either greater than or equal to a");
else:print ("Line 7 - b is neither greater than nor equal to a");print ("--------------Pyhton for 赋值运算符-------------------");#Pyhton for 赋值运算符
a = 21
b = 10
c = 0
c = a + b
print ("Line 1 - Value of c is ",c);c += a
print ("Line 2 - Value of c is ",c);c *= a
print ("Line 3 - Value of c is ",c);c /= a
print ("Line 4 - Value of c is ",c);c = 2
c %= a
print ("Line 5 - Value of c is ",c);c **= a
print ("Line 6 - Value of c is ",c);c //= a
print ("Line 7 - Value of c is ",c);
print ("-------------Python位运算符----------")#Python for 位运算符
a = 60 #60 = 0011 1100
b = 13 #13 = 0000 1101
c = 0
c = a & b #12 = 0000 1100
print ("Line 1 -Value of c is ",c);c = a | b #61 = 0011 1101
print ("Line 2 -Value of c is ",c);c = a ^ b #49 = 0011 0001
print ("Line 3 -Value of c is ",c);c = ~a # -61= 1100 0011
print ("Line 4 -Value of c is ",c);c = a << 2 #240 = 1111 0000
print ("Line 5 -Value of c is ",c);c = a >> 2 #15 = 0000 1111
print ("Line 6 -Value of c is ",c);print ("----------Python逻辑运算符-----------");#Python for 逻辑运算符
a = 10
b = 20
c = 0if(a and b):print ("Line 1 - a and b are true");
else:print ("Line 1 - Either a is not true or b is not true");if(a or b):print ("Line 2 - Either a is true or b is true or both are true");
else:print ("Line 2 - Neither a is true nor b is true");a = 0
if(a and b):print ("Line 3 - a and b are true");
else:print ("Line 3 - Either a is not true or b is not true");if(a or b):print ("Line 4 - Either a is true or b is true or both are true");
else:print ("Line 4 - Neither a is true nor b is true");if not(a and b):print ("Line 5 - Either a is not true or b is not true or both are not true");
else:print ("Line 5 - a and b are true");
print ("---------Python成员运算符----------");
a = 10
b = 20
list = [1,2,3,4,5];
if (a in list):print ("Line 1 - a is available in the given list");
else:print ("Line 1 - a is not available in the given list");if(b not in list):print ("Line 2 - b is not available in the given list");
else:print ("Line 2 - b is available in the given list");a = 2
if(a in list):print ("Line 3 - a is available in the given list");
else:print ("Line 3 - a is not available in the given list");print ("---------Python身份运算符--------");
#Python for 身份运算符
a = 20
b = 20
if(a is b):print ("Line 1 - a and b have same identity");
else:print ("Line 1 - a and b do not have same identity");if(id(a)==id(b)):print ("Line 2 - a and b have same identity");
else:print ("Line 2 - a and b do not have same identity");
b = 30
if(a is b):print ("Line 3 - a and b have same identity");
else:print ("Line 3 - a and b do not have same identity");if(a is not b):print ("Line 4 - a and b do not have same identity");
else:print ("Line 4 - a and b have same identity");
print("-----------Python运算符优先级-----------");
#Python for 运算符优先级
a = 20
b = 10
c = 15
d = 5
e = 0
e = (a + b) * c / d
print ("Value of (a+b)*c/d is",e);e = ((a + b) * c) / d
print ("Value of ((a+b)*c)/d is", e);e = (a + b) * (c / d);
print ("Vlaue of (a+b)*(c/d) is", e);e = a + (b * c) / d;
print ("Value of a + (b * c)/d is ", e);
#2015-03-04代码运行结果
Line 1 - Value of c is  31
Line 2 - Value of c is  11
Line 3 - Value of c is  210
Line 4 - Value of c is  2.1
Line 5 - Value of c is  1
Line 6 - Value of c is  32
Line 7 - Value of c is  4
--------------------------
Line 1 - a is not equal to b
Line 2 - a is not equal to b
Line 4 - a is not less than b
Line 5 - a is greater than b
Line 6 - a is either less than b
Line 7 - b is either greater than or equal to a
--------------Pyhton for 赋值运算符-------------------
Line 1 - Value of c is  31
Line 2 - Value of c is  52
Line 3 - Value of c is  1092
Line 4 - Value of c is  52.0
Line 5 - Value of c is  2
Line 6 - Value of c is  2097152
Line 7 - Value of c is  99864
-------------Python位运算符----------
Line 1 -Value of c is  12
Line 2 -Value of c is  61
Line 3 -Value of c is  49
Line 4 -Value of c is  -61
Line 5 -Value of c is  240
Line 6 -Value of c is  15
----------Python逻辑运算符-----------
Line 1 - a and b are true
Line 2 - Either a is true or b is true or both are true
Line 3 - Either a is not true or b is not true
Line 4 - Either a is true or b is true or both are true
Line 5 - Either a is not true or b is not true or both are not true
---------Python成员运算符----------
Line 1 - a is not available in the given list
Line 2 - b is not available in the given list
Line 3 - a is available in the given list
---------Python身份运算符--------
Line 1 - a and b have same identity
Line 2 - a and b have same identity
Line 3 - a and b do not have same identity
Line 4 - a and b do not have same identity
-----------Python运算符优先级-----------
Value of (a+b)*c/d is 90.0
Value of ((a+b)*c)/d is 90.0
Vlaue of (a+b)*(c/d) is 90.0
Value of a + (b * c)/d is  50.0

Python for 数字 2015-03-09

import math
import random
for letter in 'Python':if letter =='h':passprint ('This is pass block');print ('Current Letter:',letter);
print ('Good bye!');
print("------Random-----");a = -10
b = 4.1
x = 1
y = 2
print ("值为:",a,"绝对值为:",abs(a));#返回绝对值
print (math.ceil(b));#向上取整
print (math.exp(1));
print (math.fabs(-10));#返回绝对值
print (math.floor(4.9));#向下取整
print (math.log(4,2));#自然数的对数
print (math.log10(100));#基数为10
print (math.pow(2, 2));
print (round(12.334,2));
print (math.sqrt(4));print ("随机数",random.choice(range(10)));#指定随机数范围
print (random.randrange(100,1000,1));#开始范围 结束范围 递增基数
random.seed(10)
print (random.random());list = [20,16,10,5];
random.shuffle(list);
print (list);print (random.uniform(5,10));
print (math.acos(1));
print (math.asin(1));
print (math.atan(1));
print (math.atan2(5, 5));
print (math.cos(3));
print (math.hypot(3, 2));#sqrt(3*3 +2*2)
print (math.sin(3));
print (math.sin(math.pi/2));
print (math.tan(3));
print (math.tan(math.pi/4));
print (math.degrees(2*math.pi));#弧度转为角度
print (math.degrees(math.pi));
print (math.degrees(math.pi/2));
print (math.degrees(math.pi/4));
print (math.radians(0));
print (math.radians(math.pi));
print (math.radians(math.pi/2));
print (math.radians(math.pi/4));

2015-03-10  code for python

var1 = 'Hello World!';
var2 = 'Python Programming';
print (var1[0]);
print (var2[1:5]);
print ('--------------');
#更新字符串
var1 = 'Hello World'
print (var1[:6]+'Python');
print ('--------------');
#List
list1 = [123,'xyz',7899]
list2 = [456,'abc']print (len(list1));
print (len(list2));
print ('--------------');
#List list()
aTuple = (123,'xyz','zara','abc');
aList = list(aTuple);print (aList);
print ('--------------');
#List append()
aList = [123,'xyz','zara','abc']
aList.append(2009);
print (aList);
print ('--------------');
#List count
aList = [123,'xyz','zara','abc',123]
print (aList.count(123));
print (aList.count('zara'));
print ('--------------');
#List extend
aList = [123,'xyz','zara','abc',123]
bList = [2009,'manni'];
aList.extend(bList);
print (aList);
print ('--------------');
#List index
aList = [123,'xyz','zara','abc']
print (aList.index('xyz'));
print (aList.index('zara'));
print ('--------------');
#List insert
aList = [123,'xyz','zara','abc']
aList.insert(3, 2009);
print (aList);
print ('--------------');
#List pop
aList = [123,'xyz','zara','abc']
print (aList.pop());
print (aList.pop(2));
print ('--------------');
#List remove
aList = [123,'xyz','zara','abc','xyz']
aList.remove('xyz');
print (aList);
aList.remove('abc');
print (aList);
print ('--------------');
#List reverse()
aList = [123,'xyz','zara','abc','xyz']
aList.reverse();
print (aList);
print ('--------------');#List sort
aList = [123,'xyz','zara','abc','xyz']
aList.sort();
print (aList);
print ('--------------');

转载于:https://my.oschina.net/xshuai/blog/381833

Python入门教程之安装MyEclipse插件和安装Python环境相关推荐

  1. python入门教程书-清华大学出版社-图书详情-《Python快速入门精讲》

    在这本书的创作过程中,有过很多的构思,是精炼直接还是面面俱到,是道理连篇还是实用为主--经过深思熟虑,最终的呈现是: 涉及技术的地方,用简练的语言去介绍,希望读者能够用最短的时间了解一个新功能或者一个 ...

  2. python详细教程-Python入门教程:超详细1小时学会Python

    1.Hello world 安装完Python之后,打开IDLE(Python GUI) ,该程序是Python语言解释器,你写的语句能够立即运行. 我们写下一句著名的程序语句: 并按回车,你就能看到 ...

  3. python入门教程(非常详细)-Python入门教程:超详细1小时学会Python

    1.Hello world 安装完Python之后,打开IDLE(Python GUI) ,该程序是Python语言解释器,你写的语句能够立即运行. 我们写下一句著名的程序语句: 并按回车,你就能看到 ...

  4. 40天python入门教程_【第41天】python全栈从入门到放弃

    1.网络开发2个架构 C / S架构: client客户端和server服务器端 优势: 能充分发挥PC机的性能 B / S架构: browser浏览器和server服务器隶属于C/S架构 B / S ...

  5. python入门教程收藏_python入门教程:超详细保你1小时学会Python,快来收藏看看...

    简介:简介(转发文章+私信[Python]获取资料方式)1.Hello world安装完Python之后,打开IDLE(Python GUI) ,该程序是Python语言解释器,你写的语句能够立即运行 ...

  6. python入门教程收藏_python入门教程:超详细保你2小时学会Python,快来收藏看看...

    简介:(转发文章+私信[Python]获取资料方式)1.Hello world安装完Python之后,打开IDLE(Python GUI) ,该程序是Python语言解释器,你写的语句能够立即运行.我 ...

  7. python入门教程(非常详细)

    Python是一种高级.解释性的脚本语言,其简单易学.灵活.强大等特点,使其成为了当代最流行的编程语言之一.如果您是想学习Python编程的新手,以下是详细的Python入门教程,以帮助您快速掌握Py ...

  8. ros2与Python入门教程-使用消息 - 创客智造

    **ros2与Python入门教程-使用消息 ** 说明: 介绍如何python来测试消息 步骤: 如何创建消息 ,参考ROS2与C++入门教程-创建消息(msg)文件 利用python来测试消息 使 ...

  9. python十分钟教程_简洁的十分钟Python入门教程

    [简介] Python是一种动态解释型的编程语言.Python可以在Windows.UNIX.MAC等多种操作系统上使用,也可以在Java..NET开发平台上使用. [特点] 1 Python使用C语 ...

  10. 《假如编程是魔法之零基础看得懂的Python入门教程 》——(二)魔法实习生第一步了解魔杖的使用

    学习目标 了解什么是开发环境 了解python语言的环境安装 了解python语言编程的编辑器工具 目录 第一篇:<假如编程是魔法之零基础看得懂的Python入门教程 >--(一)既然你选 ...

最新文章

  1. Thymeleaf引入公共片段方式
  2. Boost:无序的bimap双图的测试程序
  3. hibernate工厂模式_Hibernate锁定模式–乐观锁定模式如何工作
  4. MATLAB里面的filter和filtfilt的C语言源代码
  5. 写给 Python 开发者的 10 条机器学习建议
  6. C语言程序设计(第2版)课后答案
  7. 学习unity的几个网站
  8. CI框架实现某字段自加数值
  9. Scrum-Sprint关键会议的培训
  10. 简约网站维护单页html源码
  11. Discuz安装短信宝短信插件教程
  12. c#中 把字符串转换为拼音码
  13. css 细线表格,如何在Dreamweaver中制作细线表格?
  14. 利用QGIS下载地图数据
  15. 更专业的过等保服务,华为云等保合规解决方案值得选择!
  16. 【PHP】PHP7新特性
  17. sqlserver常用语句(报表,递归,分页等)
  18. 基于ZigBee和STM32的智能家居控制系统的设计与实现(三)
  19. 盘点阿里云服务器活动【最新活动】2核4G 1M带宽 40G高效云盘 云服务器【19/月,269/年,699/3年】
  20. 批量给没有扩展名的文件追加新的扩展名从而修改文件名

热门文章

  1. C++实现轻量级极简httpserver和httpclient(提供http和websocket接口)
  2. iphone6连接电脑后计算机不显示器,苹果手机怎么连接电脑没反应
  3. 超长时间序列数据可视化的6个技巧
  4. comsol与matlab联合,联合应用COMSOL和matlab.pdf
  5. 自学按键精灵写脚本,非常有用的一个函数
  6. NC6 转库单、采购入库单、库存委托入库单签字后自动生成调拨订单
  7. 通过jacob实现office在线预览
  8. Java、JSP公文流转系统分析与实现
  9. matlab二值化处理、分形维数和结构占比计算
  10. Linux驱动开发(九)---树莓派I2C设备驱动开发(BME280)