Kattis / problemtools

Tools to manage problem packages using the Kattis problem package format.
MIT License
101 stars 70 forks source link

Fix adding to PYTHONPATH #230

Closed simonlindholm closed 1 year ago

simonlindholm commented 1 year ago

Setting PYTHONPATH=newdir:$PYTHONPATH causes an empty component to appear in $PYTHONPATH if it was originally unset. This empty component gets treated the same as ., and this may cause erratic behavior.

(In the case when I encountered this it was because the PYTHONPATH env var leaked into a Python submission, causing it to perform an incorrect import.)