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()

Table Of Contents