From 4cf72ca2503febbeee2379af3e08a38693395172 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Thu, 22 Jul 2021 14:25:31 +0800 Subject: [PATCH] auto save --- my_cloud.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/my_cloud.py b/my_cloud.py index 09911f2..6a1618b 100644 --- a/my_cloud.py +++ b/my_cloud.py @@ -1 +1,6 @@ -import wordcloud \ No newline at end of file +import wordcloud +with open('python二级考试大纲.txt',encoding='utf-8') as f: + text = f.read() +w = wordcloud.WordCloud(background_color="white",font_path='SimHei.ttf') +w.generate(text) +w.to_file("mycloud.png") \ No newline at end of file -- libgit2 0.25.0