Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cabbagedevelopment/chdir
Tiny Python library for setting the current working directory to the location of a Python script.
https://github.com/cabbagedevelopment/chdir
library
Last synced: about 8 hours ago
JSON representation
Tiny Python library for setting the current working directory to the location of a Python script.
- Host: GitHub
- URL: https://github.com/cabbagedevelopment/chdir
- Owner: CabbageDevelopment
- License: mit
- Created: 2020-05-15T13:01:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-09T21:26:55.000Z (almost 4 years ago)
- Last Synced: 2024-10-06T09:09:50.076Z (about 1 month ago)
- Topics: library
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chdir
`chdir` is a tiny Python library for setting the current working directory to the location of a Python script.
## How to install
```bash
pip install chdir
```## Why?
When writing Python scripts, you might be tired of doing this:
```python
import osos.chdir(os.path.dirname(os.path.abspath(__file__)))
```With `chdir`, you can do this:
```python
import chdirchdir.here(__file__)
```