Modernize the core code for better maintainability and user control:
- Replace remaining
os.path.join, os.remove, and os.chdir calls with pathlib.Path methods (/ operator, unlink(), cwd(), etc.) across dggrid_runner.py and tool.py.
- Transition from
print() and sys.stdout.write() to the standard Python logging module.
- Allow users to configure log levels (DEBUG, INFO, ERROR) via a logger instance instead of relying on the
silent and capture_logs flags.
Modernize the core code for better maintainability and user control:
os.path.join,os.remove, andos.chdircalls withpathlib.Pathmethods (/operator,unlink(),cwd(), etc.) acrossdggrid_runner.pyandtool.py.print()andsys.stdout.write()to the standard Pythonloggingmodule.silentandcapture_logsflags.