Python Project
* PYTHON 趋向于将功能相近的对象放进一个MODULE(文件)里,不用担心对象会太大,因为如果对象太大了,那它可能是做的事性太多了
需要被重构、分解。
* 开发辅助工具是PYTHON的一个强项。如构建工具、统计工具等等,只要有需求,它一定办得到,因为这些应用对安全和性能要求不高,反
而对开发的简洁性有很高的乞求。
* 只把会发生意外的那一小部分放进try里,把try成功后的操作放进else里,try失败后的操作放进except里,把不管成功或失败都需要的操作
放进finally里(为什么不写在try-catch块后呢?因为这个try-catch块代表一个风险操作集合的语意)
* PYTHON中可以简化操作的内置语法有:for/else(如果for集合为空则执行else语句)
Python 是Google的3个官方语言之一,在Google的应用开发中大量应用,不过,更多的是应用在开发辅助工具上:
* The Google build system.All of Google's corporate code is checked into a repository and the dependency and building of this code is managed by python.Greg mentioned that to create code.google.com took about 100 lines of python code. But since it has so many dependencies,the build system generated a 3 megabyte
* Packaging. Google has an internal packaging format like RPM. These packages are created using python.
* Binary Data Pusher. This is the area where Alex Martelli is working, on optimizing pushing bits between thousands of servers
* Production servers. All monitoring, restarting and data collection functionality is done with python
* Reporting. Logs are analyzed and reports are generated using Python.
* A few services including code.google.com and google groups. Most other front ends are in C++ (google.com) and Java (gmail). All web services are built on top of a highly optimizing http server wrapped with SWIG.
##########################################################
Python doesn't force you into Java's nasty one-c
相关文档:
>>> import copy
>>> a = [1,2,3,4,['a','v']]
>>> b = a
>>> b
[1, 2, 3, 4, ['a', 'v']]
>>> c = copy.copy(a)
>>> c
[1, 2, 3, 4, ['a', 'v']]
>>> d = copy.deepcopy(a)
>>> d
[1, 2, 3, 4, ['a', 'v']]
>>> a.append(5) ......
import pymssql
#connect database
conn=pymssql.connect(host="192.168.1.28",user="boomink",password="boomink",
database="boomink")
cur=conn.cursor()
print '========================================'
cur.execute("exec Orders_GetTest1 @Valu ......
版权声明
:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://mobile2008.blogbus.com/logs/28725962.html
安装好之后,模块名字叫做MySQLdb ,在Window和Linux环境下都可以使用,试验了一下挺好用,
不过又发现了烦人的乱麻问题,最后用了几个办法,解决了!
我用了下面几个措施,保证MySQL ......
作为一个初学shell的程序员来说,使用shell的一些命令调用,比如就写几行,做一些自动化的操作,简单又实用,但是涉及逻辑控制和
字符串处理时,看到那if/fi,case/esac……还有古离古怪的布尔判断……还有复杂而又名字很响而且很老资格的sed、awk……我就想,
在没有非要在shell中 ......