python
wangbin0705030219
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python 微信自动发送
from __future__ import unicode_literals from threading import Timer from wxpy import * import requests import random bot = Bot() def get_news(): url = "http://open.iciba.com/dsapi/" r =...转载 2019-06-12 10:25:27 · 1506 阅读 · 0 评论 -
python 操作文件
#!/bin/env python3 import time import os f = open('/home/fsu/watchdog/watchdog.tmp', 'w') # f.write(str(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime()))) f.write(str(int(time.time()))) # print(st...原创 2019-06-12 10:30:47 · 172 阅读 · 0 评论 -
python 判断进程是否存在并重启
#!/usr/bin/env python3 import os import time def isRunning(process_name): try: process = len(os.popen('ps aux | grep "' + process_name + '" | grep -v grep | grep -v tail | grep -v keep...原创 2019-06-12 10:32:22 · 3859 阅读 · 0 评论 -
micropython红绿灯
import time from machine import Pin nb_G = Pin(23,Pin.OUT) nb_Y = Pin(22,Pin.OUT) nb_R = Pin(21,Pin.OUT) dx_G = Pin(17,Pin.OUT) dx_Y = Pin(18,Pin.OUT) dx_R = Pin(19,Pin.OUT) t = 0.8 while True: ...原创 2019-07-15 21:43:14 · 1105 阅读 · 0 评论
分享