kragniz / json-sempai

Use JSON files as if they are python modules
MIT License
1.25k stars 52 forks source link

Added voodoo.py - Like magic.py but limits json imports to only current and child directories #11

Closed rodricios closed 9 years ago

rodricios commented 9 years ago

I added an extra Loader called SempaiContextLoader, and it walks, starting from the current directory, down the subdirectories checking for the desired json file.

Edit: also updated readme to show new usage

rodricios commented 9 years ago

Lol, I accidently switched the names of the scripts mentioned in the title

kragniz commented 9 years ago

Hi Rodrigo, thanks for the PR!

I've been thinking about this for a while, and I'm not sure this new feature is required. The initial idea was to mirror approximately the same behavior as python imports with regards to how the json file is found. I'd rather keep this fairly simple.

rodricios commented 9 years ago

Respect :)

I personally think there's a thing to be said about smaller packages that pack a big punch. On a similar note kinda had a similar dilemma with eatiht. If I weren't working on another project, I would have turned eatiht into an abomination.