我想寫一個包含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