2017年8月17日
摘要: 一、搭建环境 二、创建项目,配置 配置: 注:如果mysql-python安装不上去,可以使用pymysql替代 在tutorial包中的__init__.py 将pymysql转为mysql-python 三、模型 编辑文件snippets/models.py 创建表 四、序列化 新建snippe 阅读全文
posted @ 2017-08-17 23:05 漫步的影子 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Tutorial 1 - 序列化(100%) 2 - 请求与响应(100%) 3 - 类视图(100%) 4 - 认证和权限(0) 5 - 关系和超链接(0) 6 - 视图集和路由(0) 7 - Schemas & client libraries(0) API Guide 阅读全文
posted @ 2017-08-17 22:12 漫步的影子 阅读(122) 评论(0) 推荐(0) 编辑
  2017年8月15日
摘要: 环境: python2.7 rpyc 3.4.2 官网demo,文件监控 阅读全文
posted @ 2017-08-15 22:14 漫步的影子 阅读(664) 评论(0) 推荐(0) 编辑
  2017年7月25日
摘要: #!/usr/bin/env python # coding:utf-8 from __future__ import absolute_import, print_function import os import fcntl import select import subprocess from threading import Timer def make_nonblock(fd)... 阅读全文
posted @ 2017-07-25 23:50 漫步的影子 阅读(851) 评论(0) 推荐(0) 编辑
  2016年5月26日
摘要: import threading import time import random def threadFun(): for i in range(10): print("ThreadFun - %d" %i) time.sleep(random.randrange(0,2)) class ThreadClass(threading.Thread):... 阅读全文
posted @ 2016-05-26 16:14 漫步的影子 阅读(672) 评论(0) 推荐(0) 编辑
摘要: def createDaemon(): try: if os.fork() >0: os._exit(0) except OSError as error: err_msg = "fork #1 failed: %d (%s)" %(error.errno, error.strerror) logging.e... 阅读全文
posted @ 2016-05-26 14:52 漫步的影子 阅读(191) 评论(0) 推荐(0) 编辑
  2016年5月23日
摘要: #coding:utf-8 class Person(object): def __init__(self,name, age): self._name = name self._age = age @property def name(self): return self._name @property ... 阅读全文
posted @ 2016-05-23 09:44 漫步的影子 阅读(683) 评论(0) 推荐(0) 编辑
  2016年5月19日
摘要: Nginx -V 输出到stderr src/core/nginx.c src/core/ngx_log.h shell ps获取版本信息 shell ps获取nginx版本和配置信息 阅读全文
posted @ 2016-05-19 10:45 漫步的影子 阅读(891) 评论(0) 推荐(0) 编辑
  2016年5月18日
摘要: 一、getopts 短选项 二、getopt 长短选项 三、$@ 阅读全文
posted @ 2016-05-18 09:54 漫步的影子 阅读(812) 评论(0) 推荐(0) 编辑
  2016年5月17日
摘要: 生产者: 消费者: eg:生产者循环1-100 发送消息,启动两个消费者,如下图 阅读全文
posted @ 2016-05-17 21:40 漫步的影子 阅读(216) 评论(0) 推荐(0) 编辑