srobo / competition-simulator

A simulator for Student Robotics Virtual Competitions
https://studentrobotics.org/docs/simulator/
MIT License
9 stars 2 forks source link

Use runpy rather than exec #324

Closed PeterJCLaw closed 3 years ago

PeterJCLaw commented 3 years ago

The runpy package is what implements python -m X.py and python X.py running, so it's pretty much designed for what we're trying to do here.

The main reason to switch to it is that it preserves the original file name of the code being run and thus plays much better with debuggers.