![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
忆枫717
除了编程,会的还很多
展开
-
DLL load failed while importing _ssl: 找不到指定的模块
DLL load failed while importing _ssl: 找不到指定的模块解决方案原创 2023-02-17 16:31:13 · 1006 阅读 · 1 评论 -
python快速启动一个web服务
python快速启动一个web服务 python -m http.server 访问:https://127.0.0.1:8000 就可以了原创 2022-05-09 15:34:39 · 447 阅读 · 0 评论 -
字典
json格式的字符串转字典import jsond = json.loads(json)原创 2016-03-28 12:45:25 · 493 阅读 · 0 评论 -
Python - Http Get Post请求
GETf=urllib.urlopen("http://m.cnblogs.com/") s=f.read() print s带参数params = urllib.urlencode({'id': 8, 'name': 'jack', 'age': 25}) f = urllib.urlopen("http://localhost:18797/MailClient/test.aspx?%s" % p转载 2016-03-28 12:43:05 · 341 阅读 · 0 评论 -
扑捉异常
try: # do something; except Exception, e: print e.message原创 2016-01-27 13:38:39 · 348 阅读 · 0 评论 -
Python - 编码转换
# coding: utf-8s = 'abc' print type(s) # str(utf-8) print len(s) # 3s = unicode(s) # str -> unicode,其中str的每个字符值必须小于128 print type(s) # unicode print len(s) # 3s = u'abc' print type(s) # unicode print l转载 2015-10-14 14:07:30 · 594 阅读 · 0 评论 -
tree.py 模板
# -*- coding: utf-8 -*-tree.py模板# # Copyright (C) 2010-2013 Renstech Ltd. All Rights Reserved # # This file is part of supernova. # # Authors: # 'zhouyifeng'# pylint: disable-msg=E1101import json class原创 2015-09-17 22:13:43 · 426 阅读 · 0 评论 -
根据父节点,返回其子节点
#运用 tree 时,相关代码笔记 [manager.py] @staticmethod def get_children(file_type_id): return FileType.objects.filter(parent_type_id=file_type_id) @staticmethod def get_type_files(type_id): children =原创 2015-09-17 22:21:09 · 642 阅读 · 0 评论