
Useful Python
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Python is a versatile and powerful language that can be used for a wide variety of tasks. In this book, we'll look at how Python can be used for various tasks that will make your life easier:
- Python as a ?glue? language: it helps us combine skills and programs we already know how to use by allowing us to easily convert data from one format to another. This means that we can take data in one format that we don't have tools to manipulate and change it into data for tools that we're comfortable with. Whether we need to process a CSV, web page, or JSON file, Python can help us get the data into a format we can use.
- Python for stitching together other things. Sometimes we need to do more than process the data in an Excel file we've been sent. For example, we may want to fetch some pages from the Web, or work with an online API, or control our computer itself (such as renaming a batch of files, or changing how our operating system works). Python is great at these tasks.
- Words and numbers. Python is a powerful tool that can be used to solve a wide variety of problems, both big and small. In this tutorial, we'll explore how to use Python to answer questions, solve puzzles, and simulate various scenarios.
- Running someone else's Python code. Unlike many other languages, Python actually comes with modules for all sorts of useful functions. But for the times when we want to do things not covered by the standard library, we can use PyPI, a vast collection of open-source software libraries, frameworks and applications that can be easily installed and used in Python projects. We'll look at some examples.
We're also going to assume a little knowledge of Python and programming already?such as what a variable is, what a dictionary is, and how to import a module.
More details
Person
Content
- Useful Python
- Notice of Rights
- Notice of Liability
- Trademark Notice
- About SitePoint
- About the Author
- Preface
- Who Should Read This Book?
- Conventions Used
- Code Samples
- Tips, Notes, and Warnings
- Supplementary Materials
- Chapter 1: Python as Glue
- Who This Series is For
- Getting Started
- Reading Data
- Writing
- Reading Data with Code
- General Principles
- Parsing Complicated Formats
- Understanding All the Formats
- Embracing All the Formats
- Reading HTML
- More Data Fiddling
- Learning Regular Expressions
- Writing for Excel for Real
- Summary
- Chapter 2: Python for Stitching Together Other Things
- Fetching Data from an HTTP API
- The requests Module
- Caching HTTP Requests
- Making Some Output
- F-strings
- Controlling Windows
- The Windows Registry
- Raw Strings
- The Windows API
- Controlling macOS
- Finding Python Versions of macOS APIs
- File Processing
- Sending Email via Gmail
- Setting Up Scheduled Tasks
- Summary
- Chapter 3: Words and Numbers
- Word Ladder
- Word Lists
- Formation
- Rolling Dice
- What range() Does
- Probability
- Summary
- Chapter 4: Running Someone Else's Python Code
- The Python Package Index
- Virtualenv
- Activation Commands
- Seting Up a venv with an IDE
- python -m
- What to Do after Activation
- Installing Dependencies
- Learning Git
- Writing Our Own Modules
- Code Organization
- Listing Our Dependencies
- Summary
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.