Reference Manual: (offline | online) Quickstart: (offline | online)

# renpy.file

Function: renpy.file( | filename)

Returns a read-only file-like object that accesses filename. The file is accessed using Ren'Py's standard search method, and may reside in an archive. The object supports a wide subset of the fields and methods found on python's standard file object. (Basically, all of the methods that are sensible for a read-only object.)

## Example

    $ secret_message = renpy.file("secret_message.txt").read()
    "The secret message is: %(secret_message)s"

Reference Manual: (offline | online) Quickstart: (offline | online)