在Windows 7 64位上使用Python 3.2 64位.
f = open("raw_data/results.json", "wb")
json.dump(dictio, f)
f.close()
Run Code Online (Sandbox Code Playgroud)
给出错误:
Traceback (most recent call last):
File ".\calc_stats_friendly_data.py", line 22, in <module>
main()
File ".\calc_stats_friendly_data.py", line 18, in main
json.dump(races, f)
File "C:\Python32\lib\json\__init__.py", line 179, in dump
fp.write(chunk)
TypeError: 'str' does not support the buffer interface
Run Code Online (Sandbox Code Playgroud)
我不知道出了什么问题.使用泡菜工作正常!但我必须使用JSON ...找到问题的提示?名单很大.用pickle保存它需要56 MB.
我一直在Google上搜索一些C#程序.我找到了Paint.NET.这是唯一的C#程序吗?游戏怎么样?有人在C#中有3D游戏的链接吗?