Skip to main content

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.
  • 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.

Project details


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.3.4.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

filedialpy-1.3.4-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file filedialpy-1.3.4.tar.gz.

File metadata

  • Download URL: filedialpy-1.3.4.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for filedialpy-1.3.4.tar.gz
Algorithm Hash digest
SHA256 817f7238a40cc15ff6cd52976c4c2076f5fdbd62d501b0a95d578e9a5a646e86
MD5 838f032bf61305a71ec1b93fc9002f44
BLAKE2b-256 9d406d4b4ab11fae6ae94eae2f1a918be6cddc250129ddb1490230c872cb50a9

See more details on using hashes here.

File details

Details for the file filedialpy-1.3.4-py3-none-any.whl.

File metadata

  • Download URL: filedialpy-1.3.4-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for filedialpy-1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7cc95848cb2c3cc3759f8fdfc0ac73c968ce8fec89817fe0614871436763380a
MD5 7c311b6d8fcf82ce5f767f567d5d380f
BLAKE2b-256 f05fd1bc4f35c2e73453bbf9a60e2ac16ffa3d6ec5aae5d5c3437ff90917558c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page