摘要: http://stackoverflow.com/questions/1758354/how-to-produce-html-unit-test-output-in-pythonI'm looking for any way to display the results of python unit tests in an html summary. There are tools like this for Java and Ruby... haven't yet located any tools that seem to do this for Python. Are t 阅读全文
posted @ 2012-03-01 15:39 bettermanlu 阅读(236) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/yatere/article/details/66554451.简单的将日志打印到屏幕importlogginglogging.debug('This is debug message')logging.info('This is info message')logging.warning('This is warning message')屏幕上打印:WARNING:root:This is warning message默认情况下,logging将日志打印到屏幕,日志级别为WARNING;日志级别大小 阅读全文
posted @ 2012-03-01 15:22 bettermanlu 阅读(531) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/2535760/python-try-except-comma-vs-as-in-exceptWhat is the difference between ',' and 'as' in except statements, eg:try: passexceptException, exception: passand:try: passexceptExceptionas exception: passIs the second syntax legal in 2.6? It works in 阅读全文
posted @ 2012-03-01 15:11 bettermanlu 阅读(403) 评论(0) 推荐(0) 编辑
摘要: http://www.tutorialspoint.com/cgi-bin/printversion.cgi?tutorial=python&file=python_exceptions.htmPython Exceptions HandlingPython provides two very important features to handle any unexpected error in your Python programs and to add debugging capabilities in them:Exception Handling:This would be 阅读全文
posted @ 2012-03-01 15:09 bettermanlu 阅读(555) 评论(0) 推荐(0) 编辑