Skip to content

Instantly share code, notes, and snippets.

@aic25
Last active August 27, 2018 12:41
Show Gist options
  • Save aic25/6ff0fe0dfabf036fb68e55287bbfff8c to your computer and use it in GitHub Desktop.
Save aic25/6ff0fe0dfabf036fb68e55287bbfff8c to your computer and use it in GitHub Desktop.
Link to data folder and call the script from python
```ascript.sh
#!/bin/bash
some script
```
```python.py
import subprocess
print("start")
cur_pwd = os.getcwd()
os.chdir("path/to/ascript")
subprocess.call("ascript.sh")
os.chdir(cur_pwd)
print("end")
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment