### Navigation

- index
- next |
- previous |
- CS116 1.0 documentation »

# File Chooser

This module only has a single function to help you get the filepath of a file as a string.

## Example Usage

    # Open a window to choose a png or jpg file.
    filenameForMyPicture = pickAFile()

    # Create a Picture object from the file.
    p = Picture(filenameForMyPicture)

    # Display the picture.
    p.show()

    # Open a window to choose a wav file.
    filenameForMySound = pickAFile()

    # Create a Sound object from the file.
    s = Sound(filenameForMySound)

    # Play the sound.
    s.play()

## Function

Open a window which lets you select a file.

Return the filepath of the selected file.

`pickAFile`()

    filename = pickAFile()

### Navigation

- index
- next |
- previous |
- CS116 1.0 documentation »