Skip to content

resource.open silently fails to auto-reload on files outside of .talon #301

@rntz

Description

@rntz
from talon import resource

with resource.open(os.path.expanduser("~/test"), "r") as f:
    print("reloaded")
    for line in f.readlines():
        print(line)

This fails to reload when I change the file ~/test. Apparently this is because resource.open does not work on files outside of the talon user directory. This seems like a minor foot gun, I would expect that either

  1. resource.open will auto-reload on any file.
  2. resource.open will produce an error when called on a file which it cannot auto reload.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions