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.3.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.3-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for filedialpy-1.3.3.tar.gz
Algorithm Hash digest
SHA256 bb7d66b3e715268d7b4ba2f838ac5e4b29d1f25c9ff3bce63e789eb6e8569cd7
MD5 9d58583f70a46c1a10747c8cd124e3d9
BLAKE2b-256 991dd2841a007685171a6f87f39df0b0fea62f2a6a1fc489249f3e1be2d587b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: filedialpy-1.3.3-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.9

File hashes

Hashes for filedialpy-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 386022948634f74593e9abc201c3ed2b9f67a107159d71ad5fe1555afd7dc5b4
MD5 8d0aa00a7b7e623f7cc2b5821d2502e7
BLAKE2b-256 0a35199011f597db724487a84f690564e83c2c28e2e99b8fb7c22e2f621d460e

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