[Tutor] Organizing files
Rene Werner
secmailinglist at gmail.com
Mon Jan 11 07:51:07 EST 2016
Hello list,
right now I am working on a couple of programming-related challenges. The
challenges are sorted into problem sets, where each set contains a number
of problems.
Because a lot of these problems rely on code that is often the same, I have
put these parts into a seperate file, util.py, and I simply do
from util import *
in each solution. I have my solutions organized in different folders, one
for each problem set:
set1/prob1.py
set1/prob2.py
set2/prob3.py
and so on. So far, I keep symlinking util.py in each set folder, so e.g.
set1/util.py is a symlink to ../util.py. The same goes for set2, set3 and
so on. This works, but I get the feeling that it is clumsy and could be
done better.
What is the usual way in python do realize this in a way so that I don't
have to symlink util.py for every problem set, but still have it available?
Thank you very much for your time.
Kind regards
M.M.
More information about the Tutor
mailing list