How can I run a script inside the Python shell effectively?

20 Replies, 1475 Views

Honestly, I just use `importlib` to reload my scripts if I’m tweaking them a lot. Like:

```python
import importlib
import myscript
importlib.reload(myscript)
```

For debugging, I’d say start with `print()` and work your way up to `pdb` if needed.

Also, if you’re running scripts inside Python shell often, maybe consider using a REPL like bpython. It’s got autocomplete and syntax highlighting, which is nice.

Messages In This Thread



Users browsing this thread: 1 Guest(s)