Python学习
来源:互联网 发布:淘宝批量退货流程 编辑:程序博客网 时间:2024/05/07 02:09
国外牛人说要多学习不同的编程语言,感受它们的不同艺术,学习其长短,有利于开拓思维。所以除了JAVA,一直想找另外一门比较轻便的语言来学习,例如,Python!好,让我们坐上 google 旅游大巴,去享受Python吧!
Vamei写的傻瓜基础教程:
http://book.douban.com/doulist/1619790/
学一门语言希望知道为啥它值得学习?与你现在所掌握的有何不同。下面的文章挺好的:
http://blog.segmentfault.com/hlcfan/1190000000361407 (外国人写的图文并茂,国人翻译的)
中国人很多太浮躁。做技术的我希望不要浮躁。Python很简单,但是似乎底层的实现都屏蔽了,作为一名程序员,我还是推荐用JAVA作为职业生涯的学习语言。当然如果你会C那就更好了。
好了,下面介绍下如何在windows下面使用Python:
下载安装:
https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
安装后都不用设置什么PATH之类的,如何开始编程请看下面:
http://www.crifan.com/files/doc/docbook/python_beginner_tutorial/release/htmls/ch04_python_dev_env.html#how_dev_python_in_window(图文并茂)
bookmark: http://www.cnblogs.com/vamei/archive/2012/07/03/2574436.html
To be continued...
windows下安装cx_Oracle:
1. 百度搜索适用版本的 简易 oracle client ,例如 instantclient-basic-win32-11.2.0.1.0.zip; csdn有资源
2. 解压到某路径,将此路径加入 PATH
3. 百度搜索使用版本的 cx_Oracle , 例如 cx_Oracle-5.1.2-10g.win32-py2.7.msi, 安装
4. 验证:
>>> import cx_Oracle>>> conn = cx_Oracle.connect("usr/pwd@123.13.23.4:1800/test")>>> cursor = conn.cursor()>>> cursor.execute("select 1 from dual")<__builtin__.OracleCursor on <cx_Oracle.Connection to usr@123.13.23.4:1800/test>>>>> row = cursor.fetchone()>>> print row[0]1>>> cursor.execute("select * from 888")Traceback (most recent call last): File "<pyshell#7>", line 1, in <module> cursor.execute("select * from 888")DatabaseError: ORA-00903: ????>>> cursor.execute("select * from sales_orders where rownum = 1")<__builtin__.OracleCursor on <cx_Oracle.Connection to usr@123.13.23.4:1800/test>>>>> rows = cursor.fetchall()>>> for row in rows:print row(214237, 100037, 'LS2012090300494abc', '20828031Q6H71', 'DELIVER_ALL', 'FINANCE_AUDIT_YES', 'PRE_DISTRIBUTION_YES', 'DISPATCH_ALL', 'INVOICE_ALL', 'NONE', datetime.datetime(2012, 8, 28, 23, 20, 1), '1', 1, 105287, 124743, 117012, '???', '???', '???', None, '13302607047', None, None, 102878, '???????C175?', '523686', datetime.datetime(2012, 8, 29, 22, 45, 5), None, 1099, 0, '1', 1099, '???', None, None, '???', 102878, '???????C175?', '13302607047', None, None, 'A', '1', None, 'D', None, None, None, 105317, '?????', datetime.datetime(2012, 9, 3, 9, 23, 49), '??', datetime.datetime(2012, 9, 3, 11, 41, 52), 'false', 'false', 'false', 0, None, None, 'SHIPPED_ALL', 'SHIPPED_ALL_OVER', 'PAYED', 'VERIFICATION_ALL', 'NONE', None, 'NONE', 'D', 'D', None, None, None, None, 'ORDER_TRUNED_TO_DO', 0, None, '1', None, None, None, None, None, None, 'DIRECT', None, None, None, None, None, None, None, None, None, None, 118697, None, None, None, None, None, None, None, None, None, None, None, 0, 1, None, None)>>> print rows[0][0]214237>>> print rows[0][2]LS2012090300494abc>>> print cursor.rowcount;1>>> cursor.close()>>> conn.close()
- 【Python学习】Python 关键字
- Python学习----Python基础
- 【python】:python学习笔记
- Python:Python学习总结
- Python学习-Python数据类型
- Python学习
- 学习python
- python学习
- 学习Python
- python学习
- python学习
- python学习
- python 学习
- 学习python
- Python学习
- Python 学习
- python学习
- Python学习
- 似水年华
- CSDN编程英雄赛第四届初赛
- android 实现自定义组件
- Yii radioButtonList 设置默认选中项
- eclipse中解决update maven之后jre被改成1.5的问题
- Python学习
- 单例模式
- 《OpenGL ES 2.0 Programming Guide》摘录
- Valid Sudoku
- IP协议号大全
- 画UI的新的体会
- 身体出现危险时会发出信号 这太重要了 一定收藏 !(组图)
- C语言深度解析1-内存结构
- 程序员练级之路