Does Python support symbolic links?

I am having a hard time finding any docs describing the expected behavior of a symlink in Python.

I've tried testing it myself, but I'm getting weird results - sometimes it works for a while and then it stops working.

Anyway, I have a situation where MoinMoin stores data files and plugin modules in the same directory, but I need to store data files outside of my git repository (I am using Openshift PaaS) in order for it to persist. So I want to create this symbolic link:

~ / data / plugins / theme / -> ~ / repo / plugins / theme /

Should I expect this to work?

+3


source to share


1 answer


Should work just fine - symlinks are handled at the OS level, that is, until python tries to determine if something is a symlink or not, a call open

on it should just open the file it points to.



Is there something special that doesn't work? What do you see when it stops working?

+10


source







All Articles