Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data directory as variable in shablona namespace #73

Open
petebachant opened this issue Sep 28, 2017 · 0 comments
Open

Add data directory as variable in shablona namespace #73

petebachant opened this issue Sep 28, 2017 · 0 comments

Comments

@petebachant
Copy link

Instead of

import os.path as op
import shablona as sb
data_path = op.join(sb.__path__[0], 'data')

It would be nice to be able to use

import shablona as sb
data_dir = sb.data_dir

Some clever use of os.path and __file__ should make this easy enough, but I forget the exact syntax.

I think this will also require that users install in editable mode, unless data is copied to site-packages with -e omitted:

pip install -e .
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

No branches or pull requests

1 participant