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

Improve path discovery of scripts installed through pip #69

Closed
sergiocorreia opened this issue Aug 4, 2017 · 2 comments
Closed

Improve path discovery of scripts installed through pip #69

sergiocorreia opened this issue Aug 4, 2017 · 2 comments

Comments

@sergiocorreia
Copy link
Owner

When e.g. pantable gets installed, pantable.exe is placed within $PATH, but panflute can't find it

However, panflute could just do import pantable; doc = pantable.main(doc).

On Python 3.4+, we can check this with:

import importlib
spam_spec = importlib.util.find_spec("spam")
found = spam_spec is not None

(or we could just try to import it..)

@ickc
Copy link
Collaborator

ickc commented Oct 30, 2017

Why not give it a try? ;)

@sergiocorreia
Copy link
Owner Author

try is probably simpler and more pythonic, agreed.

Would like to set up some hours to update misc. stuff in the next week(s) so let me know if there are other things we should do.

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

No branches or pull requests

2 participants