Skip to content

Conversation

@NorDroN
Copy link
Contributor

@NorDroN NorDroN commented Jun 19, 2019

Hi!

When I start python script example.py outside directory where it is, file wideq_state.json will be created in directory where I am.

But I think, it'll be good when file wideq_state.json will be created near file example.py.

@sampsyo
Copy link
Owner

sampsyo commented Jun 19, 2019

Hi! Thanks for contributing this. But I'm not 100% sure this is the right direction. I can sort of imagine our little example.py script doing one of two things:

  • It stays "just an example," a little one-off demo to show what the library can do.
  • It becomes an actually useful CLI tool for interacting with the LG API.

In the former case, I think creating a file in cwd is probably the most reasonable thing to do. In the latter, the script should probably put the state file in ~/.config or something so that it's possible to run the command without a git checkout—putting files alongside the installed script in /usr/bin or wherever would be a problem.

Does that make sense? I'm inclined to promote the script to the latter status—a proper wideq program that actually gets installed with the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants