diff --git a/examples/list_pyfiles.ipy b/examples/list_pyfiles.ipy new file mode 100644 index 000000000..71a9e5d75 --- /dev/null +++ b/examples/list_pyfiles.ipy @@ -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)) \ No newline at end of file diff --git a/examples/list_subdirs.ipy b/examples/list_subdirs.ipy new file mode 100644 index 000000000..36ca92cc9 --- /dev/null +++ b/examples/list_subdirs.ipy @@ -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)) \ No newline at end of file