Skip to content

Writing Your First Application

Writing Your First Application

 

 

In This Chapter

▶ Working with the Integrated DeveLopment Environment (IDLE)

▶ Getting started with IDLE

▶ Writing the first application

▶ Seeing how the first application works

▶ Formatting your application code

▶ Using comments effectively

▶ Working with existing applications

▶ Ending your IDLE session

 

 

 

 

M

 

any people view application development as some sort of magic prac- ticed by wizards called geeks who wave their keyboard to produce

software both great and small. However, the truth is a lot more mundane.

 

Application development follows a number of processes. It’s more than a strict procedure, but is most definitely not magic of any sort. As Arthur C. Clark once noted, “Any sufficiently advanced technology is indistinguishable from magic.” This chapter is all about removing the magic from the picture and introducing you to the technology. By the time you’re finished with this chapter, you too will be able to develop a simple application (and you won’t use magic to do it).

 

As with any other task, people use tools to write applications. In the case of Python, you don’t have to use a tool, but using a tool makes the task so much easier that you really will want to use one. In this chapter, you use a tool that comes with Python, the Integrated DeveLopment Environment (IDLE). In the previous chapter, you use the command-line tool to play around with Python a little. However, IDLE goes further than the command line tool and makes it possible to write applications with greater ease.

 

 

A vast number of other tools are available for you to use when writing Python applications. This book doesn’t tell you much about them because IDLE per- forms every task needed and it comes with Python. However, as your skills increase, you might find that tools such as Komodo Edit (http://www. activestate.com/komodo-edit/downloads) are easier to work with than IDLE. You can find a great list of these tools at https://wiki.python. org/moin/IntegratedDevelopmentEnvironments.