当我使用py2app构建python脚本时,它们不会将文本文件保存在文件夹中。在空闲状态下正常工作
name = first_name() + ' ' + last_name()
save_path = os.path.expanduser('~/Desktop/Folder')
name_of_file = name
completeName = os.path.join(save_path, name_of_file + ".txt")
with open(completeName, 'w') as f:
print('1st line', file=f)