ink-zone / fexo

A minimalist design theme for hexo.
https://forsigner.github.io
MIT License
1.09k stars 208 forks source link

代码段设置可以换行不知道怎么解决(python是要求缩进的,一换行就错了) #143

Open goodcode-200 opened 5 years ago

goodcode-200 commented 5 years ago

图片 这样代码一换行就错了,看起来很扎眼。没有了美感,博主快把主题中代码段换回默认的呀

还有 图片 这个文本段可以有换行的,不然,读起来不方便

def main():
    print("正在创建对象列表,请等待...........")
    obj_list = Search_each_Per()
                                                        #下面对结果按发表次数做降序处理
    print("下面对结果按发表次数做降序处理...")
    obj_list.sort(key = lambda obj:obj.times,reverse = True)
    # 将结果写入text文本中
    print("将结果写入text文本中,请耐心等待...")
    path = os.getcwd()
    filename = path + "读者作者结果2.txt"
    new = open(filename,"w",errors="ignore")         #处理非法字符  illegal multibyte sequence
    for i in obj_list:
        author = i.name
        times = i.times
        print(author)
        print(times)
        if author == None:
            new.write("None" +"\t" + str(times) + "\n")
        else:
            new.write(author +"\t" + str(times) + "\n")
    new.close()
    print("完成统计")

这样是正常的,换手机屏幕尺寸也合适 图片

goodcode-200 commented 5 years ago

博主可不可以告诉我在哪里可以更改?我太菜了,找不到,哈哈