Skip to content

Commit b40f5e7

Browse files
committed
python3
1 parent f45a8ac commit b40f5e7

9 files changed

+10
-9
lines changed

GameDevTools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
UnZipTools:[['zip','unzip','extra','extract'],u'解压ZIP'],
6969

7070
# Unicode 转 普通中文显示 \u4eba\u751f\u82e6\u77ed\uff0cpy\u662f\u5cb8 人生苦短,py是岸
71-
UnicodeToChinese:[['unicode','gbk','chinese','\\u','url','urlencode','code','codec'],'Unicode 转 普通中文显示 \u4eba\u751f\u82e6\u77ed\uff0cpy\u662f\u5cb8 人生苦短,py是岸'],
71+
UnicodeToChinese:[['unicode','gbk','chinese','\\u','url','urlencode','code','codec'],'Unicode 转 普通中文显示 \\u4eba\\u751f\\u82e6\\u77ed\\uff0cpy\\u662f\\u5cb8 人生苦短,py是岸'],
7272

7373
# 屏幕录制Gif
7474
ScreenCaptureGif:[['gif','screen','capture','rec','url','licecap','cap'],u'屏幕录制Gif'],

Tools/Audio_HZ_KBPS_Tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def run():
5050
tmpBits=str(input())
5151
tmpBits=Helper.Remove_r_n(tmpBits)
5252
if tmpBits=="":
53-
tmpBits="96k"
53+
tmpBits="96"
5454

5555
tmpStrParts=tmpFilePath.rpartition('.')
5656
tmpNewPath=tmpStrParts[0]+'_new'+tmpStrParts[1]+tmpStrParts[2]

Tools/BASE64_Decode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
#使用python 库 求MD5
77
def run():
8-
#求字符串MD5
8+
print("打印结果为 b'字符串',取字符串即可\n")
99
tmpStr=Helper.Remove_r_n(str(input("Input String:")))
10-
md5 = base64.b64decode(tmpStr)
10+
md5 = base64.b64decode(tmpStr.encode("utf-8"))
1111
print(md5)
1212

1313
if __name__=="__main__":

Tools/GetStrBASE64.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
#使用python 库 求MD5
77
def run():
8-
#求字符串MD5
8+
print("打印结果为 b'字符串',取字符串即可\n")
99
tmpStr=Helper.Remove_r_n(str(input("Input String:")))
10-
md5 = base64.b64encode(tmpStr)
10+
md5 = base64.b64encode(tmpStr.encode("utf-8"))
1111
print(md5)
1212

1313
if __name__=="__main__":

Tools/GetStrMD5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def run():
77
#求字符串MD5
88
tmpStr=input("Input String:")
9-
md5 = hashlib.md5(tmpStr).hexdigest()
9+
md5 = hashlib.md5(tmpStr.encode("utf-8")).hexdigest()
1010
print(md5)
1111

1212
if __name__=="__main__":

Tools/GetStrSHA1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def run():
77
#求字符串MD5
88
tmpStr=input("Input String:")
9-
md5 = hashlib.sha1(tmpStr).hexdigest()
9+
md5 = hashlib.sha1(tmpStr.encode("utf-8")).hexdigest()
1010
print(md5)
1111

1212
if __name__=="__main__":

Tools/Helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# -*- coding: UTF-8 -*-
33
import os
44
import urllib
5+
from urllib import request
56

67
# 不规范的Url
78
STR_INVALID_URL='url begin with http:// or https://'
@@ -24,7 +25,7 @@ def DownLoad(varUrl,varSavePath):
2425
if CheckUrl_Http_Https(varUrl):
2526
print(u"DownLoading:"+varUrl)
2627
varUrl=Remove_r_n(varUrl)
27-
urllib.urlretrieve(varUrl, varSavePath)
28+
request.urlretrieve(varUrl, varSavePath)
2829
return True
2930
else:
3031
print(STR_INVALID_URL)
0 Bytes
Binary file not shown.
21 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)