标签云

微信群

扫码加入我们

WeChat QR Code

I have a Python program that lists all folders in a directory. It then proceeds to process them in an appropriate way. However, I need this program to treat shortcuts to folders the same way it would treat an actual folder in the directory. It's not difficult to add detecting shortcuts to the os.path.isdir() call, but it's far more difficult to actually follow them. For example, calling open on a path with a shortcut results in a FileNotFoundError. There's other questions here about this topic, but this is unique: I'm not able to import libraries by my own discretion, and I have to support all platforms, not just Windows.Is this even possible? If so, how?


You can see t stackoverflow.com/questions/397125/…

2019年06月26日45分03秒