-
Notifications
You must be signed in to change notification settings - Fork 0
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 audeer.script_dir() #155
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
|
Haha, just this morning I had the very same idea that such a function would be a good extension to |
Hehe, great, I still wonder why I hadn't the idea earlier than today. |
I wonder if the name |
I found |
You have already documented the behavior when no script file exists, e.g. in an interactive session. So I think it is ok to still call it |
I changed the name to |
Very often, I add the following to the top of a script:
and I need to google it every time.
To make it easier to remember, this pull request proposes to add
audeer.script_dir()
which can be used instead.When called in an interactive session, it returns the directory the user is located in.