Python-i filename

Source: Internet
Author: User

While studying today, I saw Python-i filaname this command, and the book says that you can use this command to execute the code in the filename file. But today in the use of the time has been an error, after many tests to solve the problem.

Originally this command is no longer pathon under the IDE, it is used in the console.

1. The Prime Minister we set up the aa.py in C:\Users\Administrator\Desktop\python, which contains:

A =1
b =2
Print (' a+b=%d '% (a+b))

2. Log in to the console, enter the aa.py directory (must enter the file directory, or the system cannot find the file), enter Python-i aa.py. The interface will output the results.

3. Now that we have entered the Python edit mode, we can continue to execute the python command:

4. Enter exit () to exit the Python edit:

Python-i filename

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.