Python实战教程1.0版:从入门到Web开发

需积分: 13 2 下载量 40 浏览量 更新于2024-07-17 收藏 804KB PDF 举报
《动手学习Python教程》(Hands-on Python Tutorial, Release 1.0 for Python Version 3.1+)是一本由安德鲁·哈林顿博士所编写的针对Python编程初学者的指南,适合于那些希望通过实践深入了解Python语言的人。该书出版日期为2015年3月6日,内容涵盖了从基础入门到高级主题的广泛范围。 第一部分(1-15章)主要介绍了Python的基础概念。从第1章的开始介绍,包括Python环境的上下文、Python解释器和IDLE(集成开发环境)的使用,让读者快速熟悉编程环境。接着,作者逐步深入,讲解了类型和函数的快速概览,以及整数、字符串、变量与赋值、打印功能、字符串操作、自定义函数、字典数据结构、循环与序列等基础知识。这部分内容对于理解Python的核心语法和数据结构至关重要。 第二部分(16-26章)探讨更高级的主题,如对象和方法。在这里,读者将学习到更复杂的字符串操作(第三部分),类和方法的更多应用,以及如何使用MadLibs游戏(一个文本填空游戏)进行实践。此外,还包括图形处理和文件操作,使编程技能得到延伸。 第三部分(27-36章)深入讨论控制流,涉及if语句、循环和元组的使用,以及如何处理布尔类型和其他复杂条件。这一部分强调了逻辑思维在编程中的运用,并引导读者思考进一步探索的话题。 第四部分(37-46章)聚焦于动态Web页面开发,介绍了网页基础知识、构建网页的基本要素,以及如何利用Python构建交互式的网络应用。 这本书不仅提供了丰富的理论知识,还通过实例和实践活动帮助读者巩固所学,是Python学习者的理想参考材料。无论是初学者还是有一定基础的程序员,都能在本书中找到适合自己的内容,提升Python编程技能。建议对Python感兴趣的读者下载并阅读此书,以便在实践中掌握这门强大且广泛应用的编程语言。
2019-11-03 上传
Implement real-world decentralized applications using Python, Vyper, Populus, and Ethereum Key Features • Stay up-to-date with everything you need to know about the blockchain ecosystem • Implement smart contracts, wallets, and decentralized applications(DApps) using Python libraries • Get deeper insights into storing content in a distributed storage platform Book Description Blockchain is seen as the main technological solution that works as a public ledger for all cryptocurrency transactions. This book serves as a practical guide to developing a full-fledged decentralized application with Python to interact with the various building blocks of blockchain applications. Hands-On Blockchain for Python Developers starts by demonstrating how blockchain technology and cryptocurrency hashing works. You will understand the fundamentals and benefits of smart contracts such as censorship resistance and transaction accuracy. As you steadily progress, you'll go on to build smart contracts using Vyper, which has a similar syntax to Python. This experience will further help you unravel the other benefits of smart contracts, including reliable storage and backup, and efficiency. You'll also use web3.py to interact with smart contracts and leverage the power of both the web3.py and Populus framework to build decentralized applications that offer security and seamless integration with cryptocurrencies. As you explore later chapters, you'll learn how to create your own token on top of Ethereum and build a cryptocurrency wallet graphical user interface (GUI) that can handle Ethereum and Ethereum Request for Comments (ERC-20) tokens using the PySide2 library. This will enable users to seamlessly store, send, and receive digital money. Toward the end, you'll implement InterPlanetary File System (IPFS) technology in your decentralized application to provide a peer-to-peer filesystem that can store and expose media. By the end of this book, you'll be well-versed in blockchain programming and be able to build end-to-end decentralized applications on a range of domains using Python. What you will learn • Understand blockchain technology and what makes it an immutable database • Use the features of web3.py API to interact with the smart contract • Create your own cryptocurrency and token in Ethereum using Vyper • Use IPFS features to store content on the decentralized storage platform • Implement a Twitter-like decentralized application with a desktop frontend • Build decentralized applications in the shape of console, web, and desktop applications Who this book is for If you are a Python developer who wants to enter the world of blockchain, Hands-On Blockchain for Python Developers is for you. The book will be your go-to guide to becoming well-versed with the blockchain ecosystem and building your own decentralized applications using Python and library support.