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.
- confirm_overwrite: Only for saveFile. If true (default), will prompt the user for a confirmation before overwriting an existing file. On some platforms (mac, kdialog), this overwrite confirmation cannot be disabled.
Acknowledgements
The implementation of filedialpy was inspired by crossfiledialog.
Metadata
Release files for filedialpy 1.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| filedialpy-1.3.4.tar.gz | 16.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| filedialpy-1.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.6 kB
Release files / filedialpy-1.3.4.tar.gz
| Download URL | filedialpy-1.3.4.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
817f7238a40cc15ff6cd52976c4c2076f5fdbd62d501b0a95d578e9a5a646e86
|
|
BLAKE2b-256 checksum How to use checksums |
9d406d4b4ab11fae6ae94eae2f1a918be6cddc250129ddb1490230c872cb50a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.16
|
Release files / filedialpy-1.3.4-py3-none-any.whl
| Download URL | filedialpy-1.3.4-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7cc95848cb2c3cc3759f8fdfc0ac73c968ce8fec89817fe0614871436763380a
|
|
BLAKE2b-256 checksum How to use checksums |
f05fd1bc4f35c2e73453bbf9a60e2ac16ffa3d6ec5aae5d5c3437ff90917558c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.16
|