Abstract
A program means very little if it does not take input of some kind from the program user. Likewise, if there is no form of output from a program then one may ask why we have a program at all. Input and output operations can define the user experience and usability of any program. This chapter is all about how to put information or data into a program, and then how to display it or save it to a file. This chapter does not discuss working with databases, but rather, working at a more rudimentary level with files. Throughout this chapter you will learn such techniques as how to input data for a program via a terminal or command line, likewise, you will learn how to read input from a file and write to a file. After reading this chapter, you should know how to persist Python objects to disk using the pickle module and also how to retrieve objects from disk and use them.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Editor information
Rights and permissions
Copyright information
© 2010 Josh Juneau, Jim Baker, Victor Ng, Leo Soto, Frank Wierzbicki
About this chapter
Cite this chapter
Juneau, J., Baker, J., Ng, V., Soto, L., Wierzbicki, F. (2010). Input and Output. In: Anglin, S., et al. The Definitive Guide To Jython. Apress. https://doi.org/10.1007/978-1-4302-2528-7_5
Download citation
DOI: https://doi.org/10.1007/978-1-4302-2528-7_5
Publisher Name: Apress
Print ISBN: 978-1-4302-2527-0
Online ISBN: 978-1-4302-2528-7
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)