Discover Eclipse's new tricks.
With eclipse, in the file D:\0ITstudying\english Files\python project2\201709\20150907.py, write the Python code as follows:
Aset = str ({"Name": "GMT"}) file = open ("Test", ' W ')
Although there are only two lines of code, it shows that to write the dictionary to the text, you must first convert the dictionary to STR and then write to the text. Here the test is plain, without any path, when writing this code, the file test, does not exist, open (, W), the two point tells Eclipse, in the 20150907.py directory, namely D:\0ITstudying\english files\ Python project2\201709\20150907 creates a plain txt with the name test, and then writes the characters aset to them.
All in all, within Eclipse, in the Python script that is written, there is a file without a path, which refers to the same directory in which the Python file is written.
This article is from "Jason's blog" blog, please be sure to keep this source http://jason83.blog.51cto.com/12723827/1980996
Eclipse Usage Tips