Home Backend Development Python Tutorial 跟老齐学Python之集成开发环境(IDE)

跟老齐学Python之集成开发环境(IDE)

Jun 06, 2016 am 11:32 AM
python

当安装好python之后,其实就已经可以进行开发了。下面我们开始写第一行python代码。

值得纪念的时刻:Hello world

如果是用windows,请打开CMD,并执行python。

如果是UNIX类的,就运行shell,并执行python。

都会出现如下内容:

Python 2.7.6 (default, Nov 13 2013, 19:24:16) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

在>>>后面输入下面内容,并按回车。这就是见证奇迹的时刻。从这一刻开始,一个从来不懂编程的你,就跨入了程序员行列,不管你的工作是不是编程,你都已经是程序员了,其标志就是你已经用代码向这个世界打招呼了。

>>> print "Hello, World"
Hello, World

每个程序员,都曾经经历过这个伟大时刻,不经历这个伟大时刻的程序员不是伟大的程序员。为了纪念这个伟大时刻,理解其伟大之所在,下面执行分解动作:

说明:在下面的分解动作中,用到了一个符号:#,就是键盘上数字3上面的那个井号,通过按下shift,然后按3,就得到了。这个符号,在python编程中,表示注释。所谓注释,就是在计算机不执行,只是为了说明某行语句表达什么意思。

#看到“>>>”符号,表示python做好了准备,当代你向她发出指令,让她做什么事情
>>>

#print,意思是打印。在这里也是这个意思,是要求python打印什么东西
>>> print

#"Hello,World"是打印的内容,注意,量变的双引号,都是英文状态下的。引号不是打印内容,它相当于一个包裹,把打印的内容包起来,统一交给python。
>>> print "Hello, World" 

#上面命令执行的结果。python接收到你要求她所做的事情:打印Hello,World,于是她就老老实实地执行这个命令,丝毫不走样。
Hello, World

祝贺,伟大的程序员。

笑一笑:有一个程序员,自己感觉书法太烂了,于是立志继承光荣文化传统,购买了笔墨纸砚。在某天,开始练字。将纸铺好,拿起笔蘸足墨水,挥毫在纸上写下了两个打字:Hello World

从此,进入了程序员行列,但是,看官有没有感觉,程序员用的这个工具,就是刚才打印Hello,World的那个cmd或者shell,是不是太简陋了?你看美工妹妹用的Photoshop,行政妹妹用的word,出纳妹妹用的Excle,就连坐在老板桌后面的那个家伙还用一个PPT播放自己都不相信的新理念呢,难道我们伟大的程序员,就用这么简陋的工具写出旷世代码吗?

当然不是。软件是谁开发的?程序员。程序员肯定会先为自己打造好用的工具,这也叫做近水楼台先得月。

IDE就是程序员的工具。

集成开发环境

IDE的全称是:Integrated Development Environment,简称IDE,也稱為Integration Design Environment、Integration Debugging Environment,翻译成中文叫做“集成开发环境”,在台湾那边叫做“整合開發環境”。它是一種輔助程式開發人員開發軟體的應用軟體。

下面就直接抄维基百科上的说明了:

IDE通常包括程式語言編輯器、自動建立工具、通常還包括除錯器。有些IDE包含編譯器/直譯器,如微软的Microsoft Visual Studio,有些则不包含,如Eclipse、SharpDevelop等,这些IDE是通过调用第三方编译器来实现代码的编译工作的。有時IDE還會包含版本控制系統和一些可以設計圖形用戶界面的工具。許多支援物件導向的現代化IDE還包括了類別瀏覽器、物件檢視器、物件結構圖。雖然目前有一些IDE支援多種程式語言(例如Eclipse、NetBeans、Microsoft Visual Studio),但是一般而言,IDE主要還是針對特定的程式語言而量身打造(例如Visual Basic)。

看不懂,没关系,看图,认识一下,混个脸熟就好了。所谓有图有真相。

上面的图显示的是微软的提供的名字叫做Microsoft Visual Studio的IDE。用C#进行编程的程序员都用它。

上图是在苹果电脑中出现的名叫XCode的IDE。

要想了解更多IDE的信息,推荐阅读维基百科中的词条

英文词条:Integrated development environment中文词条:集成开发环境Python的IDE

google一下:python IDE,会发现,能够进行python编程的IDE还真的不少。东西一多,就开始无所适从了。所有,有不少人都问用哪个IDE好。可以看看这个提问,还列出了众多IDE的比较。

顺便向列为看客推荐一个非常好的开发相关网站:stackoverflow.com
在这里可以提问,可以查看答案。一般如果有问题,先在这里查找,多能找到非常满意的结果,至少有很大启发。
在某国有时候有地方可能不能访问,需要科学上网。好东西,一定不会让你容易得到,也不会让任何人都得到。

那么做为零基础的学习者,用什么好呢?

既然是零基础,就别瞎折腾了,就用Python自带的IDLE。原因就是:简单。

Windows的朋友操作:“开始”菜单->“所有程序”->“Python 2.x”->“IDLE(Python GUI)”来启动IDLE。启动之后,大概看到这样一个图

注意:看官所看到的界面中显示版本跟这个图不同,因为安装的版本区别。大致模样差不多。

其它操作系统的用户,也都能在找到idle这个程序,启动之后,跟上面一样的图。

后面我们所有的编程,就在这里完成了。这就是伟大程序员用的第一个IDE。

磨刀不误砍柴工。IDE已经有了,伟大程序员就要开始从事伟大的编程工作了。且看下回分解。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use PHP combined with AI to achieve text error correction PHP syntax detection and optimization How to use PHP combined with AI to achieve text error correction PHP syntax detection and optimization Jul 25, 2025 pm 08:57 PM

To realize text error correction and syntax optimization with AI, you need to follow the following steps: 1. Select a suitable AI model or API, such as Baidu, Tencent API or open source NLP library; 2. Call the API through PHP's curl or Guzzle and process the return results; 3. Display error correction information in the application and allow users to choose whether to adopt it; 4. Use php-l and PHP_CodeSniffer for syntax detection and code optimization; 5. Continuously collect feedback and update the model or rules to improve the effect. When choosing AIAPI, focus on evaluating accuracy, response speed, price and support for PHP. Code optimization should follow PSR specifications, use cache reasonably, avoid circular queries, review code regularly, and use X

PHP calls AI intelligent voice assistant PHP voice interaction system construction PHP calls AI intelligent voice assistant PHP voice interaction system construction Jul 25, 2025 pm 08:45 PM

User voice input is captured and sent to the PHP backend through the MediaRecorder API of the front-end JavaScript; 2. PHP saves the audio as a temporary file and calls STTAPI (such as Google or Baidu voice recognition) to convert it into text; 3. PHP sends the text to an AI service (such as OpenAIGPT) to obtain intelligent reply; 4. PHP then calls TTSAPI (such as Baidu or Google voice synthesis) to convert the reply to a voice file; 5. PHP streams the voice file back to the front-end to play, completing interaction. The entire process is dominated by PHP to ensure seamless connection between all links.

Completed python blockbuster online viewing entrance python free finished website collection Completed python blockbuster online viewing entrance python free finished website collection Jul 23, 2025 pm 12:36 PM

This article has selected several top Python "finished" project websites and high-level "blockbuster" learning resource portals for you. Whether you are looking for development inspiration, observing and learning master-level source code, or systematically improving your practical capabilities, these platforms are not to be missed and can help you grow into a Python master quickly.

How to use PHP to develop product recommendation module PHP recommendation algorithm and user behavior analysis How to use PHP to develop product recommendation module PHP recommendation algorithm and user behavior analysis Jul 23, 2025 pm 07:00 PM

To collect user behavior data, you need to record browsing, search, purchase and other information into the database through PHP, and clean and analyze it to explore interest preferences; 2. The selection of recommendation algorithms should be determined based on data characteristics: based on content, collaborative filtering, rules or mixed recommendations; 3. Collaborative filtering can be implemented in PHP to calculate user cosine similarity, select K nearest neighbors, weighted prediction scores and recommend high-scoring products; 4. Performance evaluation uses accuracy, recall, F1 value and CTR, conversion rate and verify the effect through A/B tests; 5. Cold start problems can be alleviated through product attributes, user registration information, popular recommendations and expert evaluations; 6. Performance optimization methods include cached recommendation results, asynchronous processing, distributed computing and SQL query optimization, thereby improving recommendation efficiency and user experience.

How to develop AI intelligent form system with PHP PHP intelligent form design and analysis How to develop AI intelligent form system with PHP PHP intelligent form design and analysis Jul 25, 2025 pm 05:54 PM

When choosing a suitable PHP framework, you need to consider comprehensively according to project needs: Laravel is suitable for rapid development and provides EloquentORM and Blade template engines, which are convenient for database operation and dynamic form rendering; Symfony is more flexible and suitable for complex systems; CodeIgniter is lightweight and suitable for simple applications with high performance requirements. 2. To ensure the accuracy of AI models, we need to start with high-quality data training, reasonable selection of evaluation indicators (such as accuracy, recall, F1 value), regular performance evaluation and model tuning, and ensure code quality through unit testing and integration testing, while continuously monitoring the input data to prevent data drift. 3. Many measures are required to protect user privacy: encrypt and store sensitive data (such as AES

How to use PHP to implement AI content recommendation system PHP intelligent content distribution mechanism How to use PHP to implement AI content recommendation system PHP intelligent content distribution mechanism Jul 23, 2025 pm 06:12 PM

1. PHP mainly undertakes data collection, API communication, business rule processing, cache optimization and recommendation display in the AI content recommendation system, rather than directly performing complex model training; 2. The system collects user behavior and content data through PHP, calls back-end AI services (such as Python models) to obtain recommendation results, and uses Redis cache to improve performance; 3. Basic recommendation algorithms such as collaborative filtering or content similarity can implement lightweight logic in PHP, but large-scale computing still depends on professional AI services; 4. Optimization needs to pay attention to real-time, cold start, diversity and feedback closed loop, and challenges include high concurrency performance, model update stability, data compliance and recommendation interpretability. PHP needs to work together to build stable information, database and front-end.

python seaborn jointplot example python seaborn jointplot example Jul 26, 2025 am 08:11 AM

Use Seaborn's jointplot to quickly visualize the relationship and distribution between two variables; 2. The basic scatter plot is implemented by sns.jointplot(data=tips,x="total_bill",y="tip",kind="scatter"), the center is a scatter plot, and the histogram is displayed on the upper and lower and right sides; 3. Add regression lines and density information to a kind="reg", and combine marginal_kws to set the edge plot style; 4. When the data volume is large, it is recommended to use "hex"

How to use PHP combined with AI to analyze video content PHP intelligent video tag generation How to use PHP combined with AI to analyze video content PHP intelligent video tag generation Jul 25, 2025 pm 06:15 PM

The core idea of PHP combining AI for video content analysis is to let PHP serve as the backend "glue", first upload video to cloud storage, and then call AI services (such as Google CloudVideoAI, etc.) for asynchronous analysis; 2. PHP parses the JSON results, extract people, objects, scenes, voice and other information to generate intelligent tags and store them in the database; 3. The advantage is to use PHP's mature web ecosystem to quickly integrate AI capabilities, which is suitable for projects with existing PHP systems to efficiently implement; 4. Common challenges include large file processing (directly transmitted to cloud storage with pre-signed URLs), asynchronous tasks (introducing message queues), cost control (on-demand analysis, budget monitoring) and result optimization (label standardization); 5. Smart tags significantly improve visual

See all articles