在 Mac 中以管理员身份运行已编译的 python (py2app)
查看在 Vista 中以管理员身份运行已编译的 python (py2exe) 我想知道是否有一种简单的方法可以在 Python 中获取 Mac 身份验证对话框(特别是 py2app)
我知道 mac 也有内置的身份验证服务 http://developer.apple.com/library /mac/#documentation/Security/Reference/authorization_ref/Reference/reference.html
另外,我知道我可以做这样的事情:
os.system("""osascript -e 'do shell script "<commands here>" with administrator privileges'""")
但想知道是否有内置的方法可以做到这一点
After looking at Running compiled python (py2exe) as administrator in Vista I was wondering if there's an easy way to get the Mac Authentication dialog in Python (specifically py2app)
I know mac has the built in Authentication services too http://developer.apple.com/library/mac/#documentation/Security/Reference/authorization_ref/Reference/reference.html
Also, I know I could do something like this:
os.system("""osascript -e 'do shell script "<commands here>" with administrator privileges'""")
but was wondering if there was a built in way to do this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,有一个 Python Egg 可以做到这一点,但多年来作者一直不支持它
From what I can tell there was a Python Egg for doing this, but it's been unsupported by the author for several years now