Get file's “get info” attributes in mac using python

后端 未结 1 1102
失恋的感觉
失恋的感觉 2021-01-25 16:19

I have mounted a drive.

In it\'s \"Get Info\", I have an attribute named Image Disk

The location: /private/var/run/vmware/fuse/10323660103412

相关标签:
1条回答
  • 2021-01-25 16:53

    Use the getxattr function from the xattr module, which is a Python binding to the native function getxattr(2). For example:

    import xattr
    print xattr.getattr('/Volumes/MyDrive', 'Image Disk')
    

    See this blog post for a more detailed example.

    0 讨论(0)
提交回复
热议问题