Please help: How to access files on a local computer in python

Author: kjzq, Created: 2024-01-14 14:22:01, Updated: 2024-01-14 14:25:16

Please teach me how to save a file to a local computer in the policy, with os indicating failure, which appears below

 保存文件失败:[Errno 13] Permission denied: '/home/data.txt'

The code is as follows:

img


More

ChaoZhang 你在/home目录没有写的权限,可以写到/tmp/data.txt下去

The Little DreamIs this policy (code) running on a local host? or is it running on a server? python can save files, check if permissions are correct.

The Little DreamOn the server, downloading the saved file from the server is done.

kjzqOn the server, I don't understand very well, please show me, thank you.