Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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 os

os.chdir(os.path.dirname(os.path.abspath(__file__)))
```

With `chdir`, you can do this:

```python
import chdir

chdir.here(__file__)
```