0

I have one Python library folder, with sub-folders and .py files within, for various custom classes and functions. Further, I have multiple distinct Python projects, living somewhere else on my file system, which need to include and make use of that common library folder.

Moreover, I need to work with SVN. Both the common library folder and all the projects should live in their own SVN repo.

What is the "best", i.e. pythonic way of dealing with such a setup? For now, working under Linux, I just symlinked from my Python projects to that common library folder. However, that does not feel right, and in future I might want to port all that to Windows machines as well.

Any suggestions?

Matthias
  • 9,817
  • 14
  • 66
  • 125
  • Just a note: symlinks are a thing in (modern) windows too. – GPhilo Sep 25 '19 at 12:35
  • I don't think there is a best way to deal with it, just different approach such as monorepo or a shared API – S.C.A Sep 25 '19 at 12:48
  • @S.C.A That might be, but maybe there is something like a "best practice" approach. I don't know any of them, so I am open for suggestions. – Matthias Sep 25 '19 at 12:58
  • 1
    Try to refer this article (resolving similar task as like you): https://stackoverflow.com/questions/14509192/how-to-import-functions-from-other-projects-in-python – Kaustubh Ghole Sep 25 '19 at 13:26
  • [SVN Externals](http://svnbook.red-bean.com/en/1.8/svn.advanced.externals.html) is **The Ultimate Answer (tm)** – Lazy Badger Sep 25 '19 at 14:00

0 Answers0