-
python 中的 XML_RPC 例子
最近看PYTHON RPC, 看了下帮助文档,把代码总结如下:服务端代码片段, 请查看文章详情 ...
2012-02-09【[Python/Django]】
阅读更多 -
python2.7 json 转换日期的处理
python2.7中 集成了json的处理(simplejson),但在实际应用中,从mysql查询出来的数据,通常有日期格式,这时候,会报一个错:TypeError: datetime.datetime(2007, 7, 23, 12, 24, 25) is not JSON serializable说明日期转换出问题,后来再网上找到了解决办法。
2012-02-03【[Python/Django]】
阅读更多 -
如何为django工程加上robot.txt
用django做了一个站,通常为了让搜索引擎更好的抓取内容,或者拒绝搜索引擎爬内容。
都需要配置这个文件。普通的应用开发,把 robot.txt 放在根目录就好了,
如果用django 就没这么容易了,有以下几种方法处理:
2012-07-20【[Python/Django]】
阅读更多 -
让python,django网站支持rss,feed
网站上线测试一段时间了,但还没有RSS功能。因此想用 DJANGO 来做一个。其实首先想到的是用 PyRSS2Gen 自己做,生成一个 RSS 格式的XML文件,用这个的确可以做出来,但后面处理没有直接用 DJANGO自带的FEED来得方便。因此在考虑之下,选择了 DJANGO 自带的 FEED 功能上扩展。废话少说,直接上代码
2012-07-20【[Python/Django]】
阅读更多 -
Python Read XML file (DOM Example)
In this example, we will show you how to read an XML file and print out its values, via Python xml.dom.minidom.
2019-08-17【[Java]】
阅读更多 -
Python 3 : Convert string to bytes
Code snippets to show you how to convert string to bytes and vice versa.
2019-08-17【[Java]】
阅读更多 -
Python 3 TypeError: str does not support the buffer interface
Review a Python 2 socket example
2019-08-17【[Java]】
阅读更多 -
Python 3 TypeError: Cant convert bytes object to str implicitly
Converting a Python 2 socket example to Python 3
2019-08-17【[Java]】
阅读更多 -
Python Check if key exists in dictionary
In Python, you can use the in operator to check if a key exists in a dictionary.
2019-08-17【[Java]】
阅读更多 -
Python Whois client example
In this article, we will show you how to create a simple Whois client both in Python 2 and Python 3.
2019-08-17【[Java]】
阅读更多 -
Python How to loop a dictionary
In this tutorial, we will show you how to loop a dictionary in Python.
2019-08-17【[Java]】
阅读更多 -
Python How to delay few seconds
In Python, you can use time.sleep(seconds) to make the current executing Python program to sleep or delay a few seconds.
2019-08-17【[Java]】
阅读更多 -
Python How to loop a List
In this tutorial, we will show you how to use for-in-loop to loop a List in Python.
2019-08-17【[Java]】
阅读更多 -
Python How to split a String
Few examples to show you how to split a String into a List in Python.
2019-08-17【[Java]】
阅读更多 -
Python How to join two list
In Python, you can simply join two list with a plus + symbol like this:
2019-08-17【[Java]】
阅读更多