Package for opening native file dialogs on linux, macOS and windows.
Project description
filedialpy
Python package for opening native file dialogs on linux, macOS and windows. It uses either zenity or kdialog on linux, pywin32 on windows and applescript on macOS.
Installation
pip install filedialpy
Usage
import filedialpy
f=filedialpy.openFile() # Open a single file (return a string)
f=filedialpy.openFiles() # Open multiple files (return a list of strings)
f=filedialpy.openDir() # Open a directory (return a string)
f=filedialpy.saveFile() # Save to a new file (return a string)
# Using additional options
f=filedialpy.saveFile(initial_dir="/home/user/Documents",initial_file="config.json",title="Save config file", filter=["*.json","*"])
Options
- initial_dir: Initial directory where to start the search (current working directory if not specified).
- initial_file: Initial filename.
- title: Title for the dialog window.
- filter: string "*.json *.txt" (different accepted extensions can be separated by a space), or a list of such strings in order to provide several possible filters.
Acknowledgements
The implementation of filedialpy was inspired by crossfiledialog.
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
filedialpy-1.2.0.tar.gz
(16.2 kB
view hashes)
Built Distribution
filedialpy-1.2.0-py3-none-any.whl
(17.8 kB
view hashes)
Close
Hashes for filedialpy-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33583cc3e9ce974decc3fdaa480232a30740055207c082ca3688ce35bd2e1886 |
|
MD5 | b022343676f6415661b3e683f4a9dfc4 |
|
BLAKE2b-256 | e1d96683e27f3c997de8e4ac976173f71b55f1280af288a40d41830f5791dee8 |