From 57cedbac022df16cd312ebfc6973c3f4bfd900c1 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 19 Nov 2022 19:32:11 +0800 Subject: [PATCH] save project --- my_cloud.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/my_cloud.py b/my_cloud.py index 09911f2..eb7a5a5 100644 --- a/my_cloud.py +++ b/my_cloud.py @@ -1 +1,7 @@ -import wordcloud \ No newline at end of file +import wordcloud +with open('pyton2级考试大纲.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