Skip to main content

convenience functions for opening and saving files/folders

Project description

Provides the following convenience functions

File Dialogues

Depending on the availability, these dialogues use tk, wxpython, or qt4. If it falls back to tk, FoldersSelector multi-folder selector does not work.

@FileSelector(['py', 'pyc', 'pyx'])
def open_python_file(file_path: str) -> Any:
    # here the file you select is in file_path
    with open(file_path, 'r') as fp:
        # do something
@FilesSelector(['py', 'pyc', 'pyx'])
def open_python_file(file_paths: List[str]) -> Any:
    # here the file you select is in the list file_paths
    for file_path in file_paths:
        with open(file_path, 'r') as fp:
            # do something
@FolderSelector
def open_python_file(folder_path: str) -> Any:
    # here the folder you select is in the list folder_path
    for file_entry in scandir(folder_path):
        # do something
@FoldersSelector
def open_python_file(folder_paths: List[str]) -> Any:
    # here multiple folder paths in the variable
    # do something

Additionally

SaveFolderSelector # selects a single folder for saving
SaveSelector # selects a single file for saving

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

uifunc-0.1.6.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

uifunc-0.1.6-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file uifunc-0.1.6.tar.gz.

File metadata

  • Download URL: uifunc-0.1.6.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.7rc1

File hashes

Hashes for uifunc-0.1.6.tar.gz
Algorithm Hash digest
SHA256 8de65178b6c9eb761beb2281db5c8d8e2edf9d6d76266200cda7a3684a333b2b
MD5 f38e090bd2c5b5f3d497c1113ed98c3a
BLAKE2b-256 f2de8548730f3a30c1d6ead62fa42291c0b341de6665b34022b2899c76ee4413

See more details on using hashes here.

File details

Details for the file uifunc-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: uifunc-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.7rc1

File hashes

Hashes for uifunc-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1c036980bd178d123895da11f8e7e967b07006f9b3d538db72905de9b942e025
MD5 3441924c27ea027704e8761f3d1d1c92
BLAKE2b-256 cd7fe67341ceab067e247962cf9537d1fa795f9353e3a84a3ee2c36b4b9af6ee

See more details on using hashes here.

Supported by

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