IDLE是Python官方提供的一個IDE工具,可是python的強大就在於有與多套件,偏偏安裝的套件又不能夠在編輯時自動跑出語法,讓人在使用時往往還得搜尋相關的語法,浪費許多時間。
在這裡就教大家能夠開啟IDLE能夠自動補齊套件語法的功能。
Step.1 先找到Python的安裝路徑
首先我們要先找到我們Python的安裝路徑,像是我的安裝路徑是"C:\Users\XXXX\AppData\Local\Programs\Python\Python35"(我的是3.5版),每個版本不盡相同,需要自己找找看
Step.2 找到"idlelib"資料夾
再來就是進入到idlelib,idlelib資料夾通常是在"PythonXX\lib\idlelib",每個版本不盡相同,需要自己找找看。
進到idle資較夾中會看到"config-extensions.def"和"AutoComplete.py"這就是我們今天的主角了。
Step.3 修改"config-extensions.def"
打開"config-extension.def",然後找到下圖紅色框框內的地方。
然後請將其改為"enable = True",原本預設可能就是True,這邊是再多做一次確認。
修改(確認)完後按存檔。
Step.4 修改 "AutoComplete.py"
接下來打開"AutoComplete.py",並找到下圖紅色框框內的地方。
會發現原本就已經有"import os"、"import sys"、"import string"的語法
我們要做的就是將自己想要使用的套件也一起import在下面即可
像是我這裡就是多了numpy和tensorflow的套件
修改完之後一樣存檔
Step.5 測試
做完上述步驟就可以打開IDLE來測試了,可以試試看打一半的語法,之後按Tab鍵,就會出現後續的語法選單了。




It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
回覆刪除Block Chain Training in annanagar
Block Chain Training in pune
Block Chain Training in velachery
作者已經移除這則留言。
回覆刪除作者已經移除這則留言。
回覆刪除Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
回覆刪除rpa training in chennai | best rpa training in chennai | rpa training in chennai | rpa training in bangalore
rpa training in pune | rpa online training
I am a regular reader of your blog and being students it is great to read that your responsibilities have not prevented you from continuing your study and other activities. Love
回覆刪除python training in tambaram
python training in annanagar
python training in jayanagar