Figure 1-5. IDLE3 running on a Raspberry Pi
Chapter 1
■
IntroduCtIon to python
14
The PyDev Plugin for Eclipse
If you are a seasoned Java programmer, you probably have worked on Eclipse. Eclipse is
a very popular IDE for Java and it can be used with other programming languages too.
PyDev is a Python IDE for Eclipse, and it can be used in Python, Jython, and IronPython
development (Figure
1-6
). You can install PyDev from the Eclipse marketplace at
www.pydev.org.
Figure 1-6. Eclipse with PyDev
Geany
Geany (Figure
1-7
) is a text editor that uses the GTK+ toolkit with basic features of an
integrated development environment. It supports many file types and has some nice
features. Check out
https://www.geany.org
for more details.
www.allitebooks.com
Chapter 1
■
IntroduCtIon to python
15
PyCharm
PyCharm by JetBrains is another IDE for Python and it’s packed with powerful features
like a debugger, a code inspection tool, version control, and an integrated unit test
runner. It is a cross-platform IDE available for Windows, MacOS, and Linux distributions.
Its Community Edition (Figure
1-8
) is a free download. Visit its home page at
https://
www.jetbrains.com/pycharm/
for more information.
Figure 1-7. Geany
Chapter 1
■
IntroduCtIon to python
16
The code examples in this book are better suited for execution from the command
prompt, due to the nature of the libraries involved. I personally prefer to write the logic and
code on paper (Yes! Using a piece of paper!) first and then to use a plain-text editor with
syntax highlighting. For example, I recommend Notepad++ on Windows, or nano, Leafpad,
and gedit on Linux. You can use IDLE3 or Geany for writing and compiling the code.
However, most of the code examples are meant to be executed from the command line.
EXERCISE 1-1
Complete this exercise to understanding python 3’s background better.
• Visit and explore the python home page at
www.python.org
.
• read where python is deployed successfully at
https://www.python.org/about/success/
.
• Visit and explore the python documentation page at
https://docs.python.org/3/
.
• Check the version-wise new features of the latest releases of
python at
https://docs.python.org/3/whatsnew/index.html
.
• For practice, write simple programs in python. For example,
you could write programs for a Fibonacci series and factorial
calculations using iterative and recursive techniques.
Figure 1-8. PyCharm Community Edition
Chapter 1
■
IntroduCtIon to python
17
Conclusion
In this chapter, you learned the background, history, and features of Python. You also
studied the important differences between Python 2 and Python 3. You learned to
install and use Python 3 in normal and interactive modes. Finally, you looked at a few
popular IDEs for Python. In the next chapter, you will get started with the concepts of test
automation and look at a simple test automation library for Python, called doctest.
19
© Ashwin Pajankar 2017
A. Pajankar, Python Unit Test Automation, DOI 10.1007/978-1-4842-2677-3_2
Do'stlaringiz bilan baham: |