Python
solaris_navi
https://www.linkedin.com/in/deytian/
展开
-
Python: import Module and Class
Module: function_set.pydef print_function( name ): print "hello, %s" % name; return Class: Person.pyclass Person: ''' classdocs ''' name = ""; age = 0; gender =原创 2013-11-29 21:09:11 · 1478 阅读 · 0 评论 -
Read Unicode characters from command-line arguments in Python 2.x on Windows
Ref:[1] http://stackoverflow.com/questions/846850/read-unicode-characters-from-command-line-arguments-in-python-2-x-on-windows/846931#846931[2] http://code.activestate.com/recipes/572200/R转载 2013-12-13 21:07:01 · 912 阅读 · 0 评论 -
Getting error headers with urllib2
http://stackoverflow.com/questions/6402051/getting-error-headers-with-urllib2e has undocumented headers and hdrs properties that contains the HTTP headers sent by the server.转载 2014-02-26 19:47:25 · 743 阅读 · 0 评论 -
Temporary solution: LookupError: no codec search functions registered
REF: http://stackoverflow.com/questions/14627492/how-to-encode-unicode-string-into-utf-8-string-in-pythonEXEC:u.encode('utf-8')ERROR:LoopupError: no codec search functions registered原创 2014-03-03 22:51:59 · 4908 阅读 · 0 评论 -
Simple Web Application using Cherrypy in Python 3.3 with MySQL
import cherrypyimport mysql.connector as mconnectorimport sys# Globalglobal connglobal curtry: conn = mconnector.connect(user='test', password='test1234',原创 2014-07-18 20:47:29 · 1400 阅读 · 0 评论