mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Simplify .py listing code, moving Misc examples.
This commit is contained in:
parent
e2872359c6
commit
6745281cdc
6
examples/list_pyfiles.ipy
Normal file
6
examples/list_pyfiles.ipy
Normal file
@ -0,0 +1,6 @@
|
||||
# A simple IPython script that provides Notebook links to .py files in the cwd
|
||||
|
||||
from IPython.display import FileLink, display
|
||||
files =!ls *.py
|
||||
for f in files:
|
||||
display(FileLink(f))
|
6
examples/list_subdirs.ipy
Normal file
6
examples/list_subdirs.ipy
Normal file
@ -0,0 +1,6 @@
|
||||
# A simple IPython script that lists files in all subdirs
|
||||
|
||||
from IPython.display import FileLinks, display
|
||||
dirs =!ls -d */
|
||||
for d in dirs:
|
||||
display(FileLinks(d))
|
Loading…
Reference in New Issue
Block a user