gpt4 book ai didi

ipython-notebook - 笔记本列表中文件的排序(排序)顺序

转载 作者:行者123 更新时间:2023-12-03 17:06:37 30 4
gpt4 key购买 nike

如何更改笔记本列表中文件的排序顺序?我希望它对所有文件类型都按字母顺序排列,并且不区分大小写。目录可以出现在文件之前或文件内。

目前我的列表排序如下:
- 目录(以大写开头)
- 目录(以小写开头)
- IPython 笔记本(以大写开头)
- ipython noteooks(以小写开头)
- 其他文件(以大写开头)
- 其他文件(以小写字母开头)

我正在使用 Jupyter 3.0.0-f75fda4

最佳答案

就像对上一篇文章的补充:
编辑 ..\Anaconda\Lib\site-packages\notebook\static\tree\js\notebooklist.js例如首先对最后修改进行排序:

this.sort_function = modified_sorter(0); // inserted
this.sort_id = 'last-modified'; // inserted
this.sort_direction = 0; // inserted
//this.sort_function = name_sorter(1);
// 0 => descending, 1 => ascending
//this.sort_id = 'sort-name';
//this.sort_direction = 1;
您必须对 main.min.js 进行相同的更改在同一个目录中。自然地,随着 jupyter notebook 的每次更新,这都会丢失。此外,无法保证,因为这是一个快速而肮脏的修复。

关于ipython-notebook - 笔记本列表中文件的排序(排序)顺序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31142810/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com