我想写一个包含unicode字符值的字典到一个文本文件,并且正在考虑使用UnicodeWriter,正如在python csv文档中提到的。但是我无法导入它,因为模块无法被python识别。我想知道这是否是我的版本的Python的问题?另外如果这样做是不可能的,是否有任何方法来指定编码,而在python中使用dictWriter类。无法导入UnicodeWriter python 2.7
回答
UnicodeWriter
不是任何版本的Python中的实际模块。在文档中给出的代码是一个你必须复制到你自己的项目中的例子。
哦,这实际上是有道理的!谢谢。我想我被几个问题误导了,所以有这样的陈述:从UnicodeWriter导入UnicodeWriter。谢谢。 – anonuser0428 2013-03-11 20:19:23
请提供该链接。谢谢。 – Clayton 2014-05-14 09:15:20
供将来参考:链接到提及的文档示例:https://docs.python.org/2/library/csv.html#examples – gonz 2016-09-07 18:32:10
- 1. Python 2.7无法导入PyQt4
- 2. Python 2.7 - 无法导入GPIOZERO
- 3. Python 2.7无法导入加密
- 4. 无法在Python 2.7中导入boto3
- 5. pydbg无法导入pydasm - Python 2.7
- 6. 无法将pygame导入python 2.7
- 7. GStreamer with Python 2.7无法导入gst
- 8. python 2.7 xlwings导入错误:无法导入名称工作簿
- 9. 导入,Python的2.7
- 10. 无法导入python扩展
- 11. 无法导入Python 2.7或Python 3.3中的十进制
- 12. Python/django:无法导入GeoIP
- 13. 无法将MySQLdb导入python
- 14. 无法与Python 2.7
- 15. 无法在Python 2.7
- 16. python 2.7导入flup错误
- 17. 导入Python 2.7时出错
- 18. 无法使用Python 2.7写入文件
- 19. 无法在python 2.7和selenium中导入`beautifulSoup`
- 20. pycurl在更新python后无法导入到2.7
- 21. 导入numpy无法在Python 2.7笔记本上工作?
- 22. 无法在Python 2.7和CentOS 7中导入libxml2和libxslt
- 23. python 2.7无法导入地理编码器库
- 24. 无法导入Matplotlib Python 2.7版的Windows 7
- 25. Google App Engine,Python 2.7运行时,ImportError:无法导入名称djangoforms
- 26. Python 2.7版与Adwords API:导入错误:无法导入名称AdWordsClient
- 27. Python无法导入openpyxl
- 28. 无法使用Python导入模块
- 29. 似乎无法导入Tkinter的Python的
- 30. 从vs导入Python in Python 2.7
很难说这里问了什么 – Ronnie 2013-03-11 19:58:40