如何在使用Pyinstaller编译的OS X for Python应用程序中获得权限?
我用Python编写了一个脚本,其中包含一些IO操作,如:如何在使用Pyinstaller编译的OS X for Python应用程序中获得权限?,python,macos,permissions,pyinstaller,Python,Macos,Permissions,Pyinstaller,我用Python编写了一个脚本,其中包含一些IO操作,如: inputfileHandle = open(inputfile, 'rb') outputfileHandle = open(outputfile, 'wb') # ... some actions performed ... # outputfileHandle.write(result) 然后我尝试使用Pyinstaller编译脚本。当我运行应用程序时,一切正常,但如果我将其分发给其他Mac用户,它会显示“操作不允许”。我猜这是
inputfileHandle = open(inputfile, 'rb')
outputfileHandle = open(outputfile, 'wb')
# ... some actions performed ... #
outputfileHandle.write(result)
然后我尝试使用Pyinstaller编译脚本。当我运行应用程序时,一切正常,但如果我将其分发给其他Mac用户,它会显示“操作不允许”。我猜这是因为应用程序没有写入文件的权限。我如何处理这个问题?谢谢。不过,“如果我将其分发给其他Mac用户”的行为不会保留文件属性。。。