13. What Now?
Where should you go to learn more?
- The Python Standard Library, Skimming through the Library Reference will give you an idea of what’s available.
- Installing Python Modules
- The Python Language Reference: A detailed explanation of Python’s syntax and semantics. It’s heavy reading, but is useful as a complete guide to the language itself.
- If you have questions : Frequently Asked Questions
- a lot of examples of small script : https://code.activestate.com/recipes/langs/python/
14. Interactive Input Editing and History Substitution
Python’s line editing feature is implemented by the GNU Readline library
14.1. Tab Completion and History Editing
The default configuration also saves your history into a file named
.python_history
in your user directory. The history will be available again during the next interactive interpreter session.
14.2. Alternatives to the Interactive Interpreter
15. Floating Point Arithmetic: Issues and Limitations
binary can never precisely represent some float number, so do Python
1 | 0.10000000000000001 == 0.1 |
this is not a bug in Python, and it is not a bug in your code either. You’ll see the same kind of thing in all languages that support your hardware’s floating-point arithmetic
1 | round(.1, 1) + round(.1, 1) + round(.1, 1) == round(.3, 1) |
- Python provides tools that may help on those rare occasions when you really do want to know the exact value of a float.
15.1. Representation Error
This section explains the “0.1” example in detail, and shows how you can perform an exact analysis of cases like this yourself.
16. Appendix
16.1.3. The Interactive Startup File
you can set an environment variable named
PYTHONSTARTUP
to the name of a file containing your start-up commands.(Interactive mode only)If you want to use the startup file in a script, you must do this explicitly in the script:
1
2
3
4
5
6import os
filename = os.environ.get('PYTHONSTARTUP')
if filename and os.path.isfile(filename):
with open(filename) as fobj:
startup_file = fobj.read()
exec(startup_file)*Maybe Back door can be created here!!!**
16.1.4. The Customization Modules
See the documentation of the site
module for more details.
Maybe Back door can be created here!!!