change an alias target python

2019-04-12 22:44发布

I would like to change the target of an alias using python. do I have to download some external library to do this. I played around with aliases a bit and can't figure out any way to edit them without user input.

I'm using mac, python 2.6

2条回答
放荡不羁爱自由
2楼-- · 2019-04-12 23:14

As far as I can tell it should be possible using PyObjC to get at the Mac's Foundation library. I think NSURLBookmarkResolutionWithoutUI is what you are looking for.

查看更多
劳资没心,怎么记你
3楼-- · 2019-04-12 23:14

PyObjC was a good suggestion. I couldn't find a solution anywhere, but after asking an equivalent question, finally managed to create one. See my answer to my own question: how to read, change, and write macOS file alias from python

查看更多
登录 后发表回答