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

Minor fixes for sspp #1

Open
griswolf opened this issue Aug 14, 2015 · 0 comments
Open

Minor fixes for sspp #1

griswolf opened this issue Aug 14, 2015 · 0 comments

Comments

@griswolf
Copy link

I love it... but:
s.isidentifier() isn't defined for Python 2.7; so
import re
identifier = re.compile(r'^[^\d\W]\w*$')

Executables in my scheme of things are often links in my bin directory to some other code, so after repeatedly being bit, I've become a little paranoid. Not that init.py WOULD be a link, but:
basedir = os.path.dirname(os.path.realpath(file))

I'm using importlib.import_module() instead of import(). It returns an actual module, so your variable "module" has become "mod_name" where it's a string.

Thanks for doing this. I was going crazy trying to deal with pkg_resources and the like.

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