Eclipse Usage Tips

Source: Internet
Author: User
Tags python script

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.