Book contents
- Frontmatter
- Contents
- Preface
- Acknowledgements
- 1 Prologue
- 2 A beginners’ guide
- 3 Python basics
- 4 Program control and logic
- 5 Functions
- 6 Files
- 7 Object orientation
- 8 Object data modelling
- 9 Mathematics
- 10 Coding tips
- 11 Biological sequences
- 12 Pairwise sequence alignments
- 13 Multiple-sequence alignments
- 14 Sequence variation and evolution
- 15 Macromolecular structures
- 16 Array data
- 17 High-throughput sequence analyses
- 18 Images
- 19 Signal processing
- 20 Databases
- 21 Probability
- 22 Statistics
- 23 Clustering and discrimination
- 24 Machine learning
- 25 Hard problems
- 26 Graphical interfaces
- 27 Improving speed
- Appendices
- Glossary
- Index
- Plate section
26 - Graphical interfaces
Published online by Cambridge University Press: 05 February 2015
- Frontmatter
- Contents
- Preface
- Acknowledgements
- 1 Prologue
- 2 A beginners’ guide
- 3 Python basics
- 4 Program control and logic
- 5 Functions
- 6 Files
- 7 Object orientation
- 8 Object data modelling
- 9 Mathematics
- 10 Coding tips
- 11 Biological sequences
- 12 Pairwise sequence alignments
- 13 Multiple-sequence alignments
- 14 Sequence variation and evolution
- 15 Macromolecular structures
- 16 Array data
- 17 High-throughput sequence analyses
- 18 Images
- 19 Signal processing
- 20 Databases
- 21 Probability
- 22 Statistics
- 23 Clustering and discrimination
- 24 Machine learning
- 25 Hard problems
- 26 Graphical interfaces
- 27 Improving speed
- Appendices
- Glossary
- Index
- Plate section
Summary
An introduction to graphical user interfaces
At some stage when writing your own programs there may come a time when you want others to be able to use what you have created without them necessarily having to know anything about programming or Python. Should this happen the next step is to consider writing a more friendly interface to the program. Once upon a time in computing everything was text-based and the user had to type commands to get things to work. Fortunately things have moved on and we are now usually presented with graphics and a pointing device, either a mouse or a touch screen, and the user can interact with graphical objects like menus and buttons.
When building a graphical user interface (GUI) the programmer must be mindful of various factors, which are sometimes antagonistic, forcing us to make compromises. For example, the designer has to strike a balance between on the one hand giving lots of functionality and on the other hand keeping things simple for novices and intuitive to use. In this chapter we will aim to give some general advice about the programming, but we leave you to make the tough choices. We wish to be clear that this chapter deals with making graphical interfaces that run on the users’ local computer. We will not venture into the world of Internet-based applications, although these are becoming increasingly important, and the Pyjamas library, which is available for Python programmers, works in a remarkably similar way to the graphical libraries discussed here.
- Type
- Chapter
- Information
- Python Programming for BiologyBioinformatics and Beyond, pp. 566 - 581Publisher: Cambridge University PressPrint publication year: 2015