diff --git a/README.md b/README.md index f16e14c..f4a25c0 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,10 @@ ### [Python3.4.4 or Python3.5][PyQt5] -# 1.右下角弹出框
+### 1.右下角弹出框
-# 2.单实例应用
+### 2.单实例应用
-# 3.字体测试
+### 3.字体测试
+ +### 4.程序重启
\ No newline at end of file diff --git a/右下角弹出框/README.md b/右下角弹出框/README.md index 40220c2..80d7a85 100644 --- a/右下角弹出框/README.md +++ b/右下角弹出框/README.md @@ -1,8 +1,8 @@ -#右下角弹出框 +# 右下角弹出框
-###[Python3.4.4 or Python3.5][PyQt5] +### [Python3.4.4 or Python3.5][PyQt5] -#截图 +# 截图 \ No newline at end of file diff --git a/程序重启/AutoRestart.py b/程序重启/AutoRestart.py new file mode 100644 index 0000000..ca4f7f6 --- /dev/null +++ b/程序重启/AutoRestart.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +''' +Created on 2017年3月31日 +@author: Irony."[讽刺] +@site: alyl.vip, orzorz.vip, irony.coding.me , irony.iask.in , mzone.iask.in +@email: 892768447@qq.com +@file: AutoRestart +@description: +''' + +from optparse import OptionParser +import os +import sys +import time + + +def restart(twice): + os.execl(sys.executable, sys.executable, *[sys.argv[0], "-t", twice]) + +if __name__ == "__main__": + parser = OptionParser(usage="usage:%prog [optinos] filepath") + parser.add_option("-t", "--twice", type="int", dest="twice", default=1, help="运行次数") + options, _ = parser.parse_args() + print("app start...%s...twice\n" % options.twice) + print("app pid: ",os.getpid()) + print("3秒后自动重启...\n") + time.sleep(3) + restart(str(options.twice + 1)) diff --git a/程序重启/README.md b/程序重启/README.md new file mode 100644 index 0000000..81e135d --- /dev/null +++ b/程序重启/README.md @@ -0,0 +1,10 @@ +# 程序重启 +
+ +### [Python3.4.4 or Python3.5][PyQt5] + +# 截图 + + +# exe 下载 +AutoRestart.exe \ No newline at end of file diff --git a/程序重启/ScreenShot/1.png b/程序重启/ScreenShot/1.png new file mode 100644 index 0000000..18667c7 Binary files /dev/null and b/程序重启/ScreenShot/1.png differ diff --git a/程序重启/dist/AutoRestart.exe b/程序重启/dist/AutoRestart.exe new file mode 100644 index 0000000..f633913 Binary files /dev/null and b/程序重启/dist/AutoRestart.exe differ