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
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
def open_python_file(folder_paths: List[str]) -> Any:
    # here multiple folder paths in the variable
    # do something


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.

Files for uifunc, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size uifunc-0.1.6-py3-none-any.whl (7.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size uifunc-0.1.6.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page