Python file chooser widget for use in Jupyter/IPython in conjunction with ipywidgets
Project description
ipyfilechooser
A simple Python file chooser widget for use in Jupyter/IPython in conjunction with ipywidgets. The selected path and file are available via .selected_path
and .selected_filename
respectvely or as a single combined filepath via .selected
. The dialog can be reset to its default path and filename by using .reset()
.
When a typed filename matches an existing file entry in the current folder the entry will be highlighted. To emphasize the risk of overwriting existing files, the selected filepath is displayed in green if the file does not exist and orange if it does.
Usage
from ipyfilechooser import FileChooser
# Create and display a FileChooser widget
fc = FileChooser('/Users/crahan/FC demo')
display(fc)
# Print the selected path, filename, or both
print(fc.selected_path)
print(fc.selected_filename)
print(fc.selected)
# Change defaults and reset the dialog
fc.default_path = '/Users/crahan/'
fc.default_filename = 'output.txt'
fc.reset()
# Shorthand reset
fc.reset(path='/Users/crahan/', filename='output.txt')
# Change hidden files
fc.show_hidden = True
Functions and variables
fc.reset()
fc.refresh()
fc.show_hidden
fc.rows
fc.default
fc.default_path
fc.default_filename
fc.selected
fc.selected_path
fc.selected_filename
Screenshots
Closed vs open dialog
Existing vs new file selection
Quick navigation dropdown
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ipyfilechooser-0.1.2.tar.gz
.
File metadata
- Download URL: ipyfilechooser-0.1.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 473bb1aa3d4bf24ed0e232bea3fa36c2edef42c1b1eb72422c5bbf6ef26c8cb5 |
|
MD5 | ff4bf6d1580381b5a399d9778421e7d0 |
|
BLAKE2b-256 | 5ba2ae8bd6901b85f5d3af925afaeb057a58803d7dc22f004003b55955d6f78c |
File details
Details for the file ipyfilechooser-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: ipyfilechooser-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1454199cbdc1378e68ac4154be44d0164457ad57fad89b728f597fafb7e7d4aa |
|
MD5 | 4f55bd0c09c9899af224de0c05ca150f |
|
BLAKE2b-256 | 37a5b15bc34e7457ceb85e4c815c96f747e03dc80fa40f904d38cd80d2f03b08 |