I'm writing a program with a client and a server and I'm trying to organise my source files in an intuative way. I've got this rough file structure:
src:
client:
client.py
server:
server.py
lib:
clientlib:
client_depend.py
serverlib:
server_depend.py
commonlib:
both_depend.py
Previously, I was using the methods which described in this SO Post but the number of sys.path.append("../..")
s has gotten out of hand and is in danger of breaking if I move any files about.
What would be a neat and pythonic way to do this? I've thought about making lib
a package and putting it in $(PYTHONDIR)/Lib/site-packages
but that adds complexity to development (as it's a root owned dir and it's not on my USB drive that I use for development so I can change computers easily).
Thanks in advance.