I feel you on the clunky copy-paste thing. What I do is use `exec()` but wrap it in a function to keep things tidy. Like:
```python
def run_script():
with open('script.py') as f:
exec(f.read())
```
For debugging, I’d say start with `assert` statements to catch issues early.
Also, if you’re running scripts inside Python shell a lot, maybe look into using `ptpython`—it’s a nicer REPL with autocomplete and stuff.
```python
def run_script():
with open('script.py') as f:
exec(f.read())
```
For debugging, I’d say start with `assert` statements to catch issues early.
Also, if you’re running scripts inside Python shell a lot, maybe look into using `ptpython`—it’s a nicer REPL with autocomplete and stuff.
