Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/354.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在使用Pyinstaller编译的OS X for Python应用程序中获得权限?_Python_Macos_Permissions_Pyinstaller - Fatal编程技术网

如何在使用Pyinstaller编译的OS X for Python应用程序中获得权限?

如何在使用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用户,它会显示“操作不允许”。我猜这是

我用Python编写了一个脚本,其中包含一些IO操作,如:

inputfileHandle = open(inputfile, 'rb')
outputfileHandle = open(outputfile, 'wb')
# ... some actions performed ... #
outputfileHandle.write(result)
然后我尝试使用Pyinstaller编译脚本。当我运行应用程序时,一切正常,但如果我将其分发给其他Mac用户,它会显示“操作不允许”。我猜这是因为应用程序没有写入文件的权限。我如何处理这个问题?谢谢。

不过,“如果我将其分发给其他Mac用户”的行为不会保留文件属性。。。