BN.com Gift Guide

Perl to Python Migration

Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (8) from $9.99   
  • New (3) from $28.95   
  • Used (5) from $9.99   
Close
Sort by
Page 1 of 1
Showing 1 – 2 of 3
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$28.95
Seller since 2006

Feedback rating:

(342)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
2001 Trade paperback BRAND NEW(never opened)! ! -No international shipping available Trade paperback (US). Glued binding. 400 p. Audience: General/trade.

Ships from: Northbrook, IL

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$73.45
Seller since 2014

Feedback rating:

(323)

Condition: New
Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing 1 – 2 of 3
Close
Sort by
Sending request ...

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
Thousands of web (and other) developers have been moving from Perl to Python, and few of them are looking back. They like its built-in object-orientation, relative simplicity, easier reuse, power, and (with Python 2.0), its strong XML support. While Perl and Python have notable similarities, there are, of course, substantial differences. You could discover them on your own, by trial and error. Or you could get Martin C. Brown's complete, practical road map for moving from Perl to Python.

Brown, whose previous books include Debugging Perl, Perl: The Complete Reference, and Python: The Complete Reference, knows both languages exceptionally well. We've seen other technology "migration" books that give short shrift to the technology you're moving from. This one doesn't suffer from that flaw. Brown's constantly comparing Perl and Python -- showing where they differ, where you can leverage your existing skills, and where you need to change your mind-set as well as your syntax.

Brown starts at the high level (similar precedence models, data types, sequential execution; major differences in the languages' approach to objects and built-in functions). Then, he gets down to ground level -- and stays there. There are the basics (differences in line formats, commenting, and variables; Perl hashes vs. Python dictionaries; Python's tuple feature, which has no equivalent in Perl). There's extensive coverage of Python functions (which borrow more from C than from Perl). There's a full chapter on exception handling (here, it's Perl that harks back to C, while Python's approach is fundamentally different).

Perl to Python Migration offers comprehensive coverage of interfacing with the operating system (from identifying your environment to controlling filesystems); manipulating text, data, and files (where Python's a lot better than some Perl folks give it credit for); and GUIs (via John Osterhout's Tk, same as Perl). There's also a taste of web/CGI programming (we'd have liked to see a bit more here, but in fairness, Python's CGI support doesn't yet measure up to Perl's).

Putting that caveat aside, if you're making the jump -- or considering it -- this book will ensure a soft, cozy landing. (Bill Camarda)

Bill Camarda is a consultant, writer, and web/multimedia content developer with nearly 20 years' experience in helping technology companies deploy and market advanced software, computing, and networking products and services. He served for nearly ten years as vice president of a New Jersey–based marketing company, where he supervised a wide range of graphics and web design projects. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.

Read More Show Less

Product Details

  • ISBN-13: 9780201734881
  • Publisher: Pearson Education
  • Publication date: 11/2/2001
  • Pages: 320
  • Product dimensions: 7.38 (w) x 9.20 (h) x 0.72 (d)

Table of Contents

Acknowledgments
Introduction
Sect. 1 Introduction to Python
1 Introduction 2
2 Executing Python programs 14
3 Python overview 28
Sect. 2 Language Fundamentals
4 Components of a Python program 38
5 Functions 84
6 Exceptions and error trapping 96
7 Modules, classes, and object orientation 118
Sect. 3 Applying Python
8 Built-in functions 138
9 Interfacing with the operating system 166
10 Data manipulation 188
11 File manipulation 214
12 Communicating over a network 230
13 Web development 244
14 GUI development with Tk 252
App. A: Python resources 270
App. B Perl to Python quick reference 280
Read More Show Less

Preface

As a long time Perl and Python programmer, I'm constantly finding myself using Perl constructs in Python or Python constructs in Perl. Worse, I can suddenly find myself trying to use a feature or system in a Python program that just doesn't exist, or does and works differently. What I needed was some sort of cross reference.

After talking to other programmers and developers it became apparent that a number of people were "jumping ship" from Perl to Python. Some with varying levels of success. The reasons for using Python in preference to Perl were different for each person, but there were some common themes:

Python is object-oriented. Although Perl has object orientation facilities they are not integrated into the system. In Python everything is an object or class — even the base data types are objects and have their own methods and attributes. This makes Python a great language to use in situations where you are working on applications that use object orientation as a core technology.

Python is easy to use. Python has a very clean and structured layout, and it's very easy to follow what's going on. Perl can frequently look like line noise, and particularly for new programmers this becomes a problem as they try to understand why their program works.

Python does what you tell it to. Perl suffers from a severe case of semi-intelligence. Statements and expressions in Perl have all sorts of rules, exceptions to those rules, and other artefacts that can make it difficult to follow what is going on. Just think about what happens when you call a function, was it called inlist or scalar context?, what arguments did it have?, how do I get them back? These are regular questions when programming with Perl.

Python is cross-platform compatible. Perl is also cross-platform compatible, for certain values of compatible. Because of Perl's Unix roots — it is very much a Unix language — use Perl under Windows or MacOS and a large proportion of the built-in functions become obsolete. Python's functionality is supported by external modules, many of which use the correct version according to their platform whilst retaining the same API.

These aren't really hard and fast reasons for why you should make the jump to Python, but they are compelling reasons for why Python is at least worth a look.

In this book that's exactly what we try to do — show you how you can make the move from Perl to Python. Many of the basics are the same, and despite a change of language, you're unlikely to need to change the algorithms you are already using.

For the more advanced programmer, or, like me, the programmer who has to use both languages most days, the book should also work as a handy cross reference to allow you to look up Perl and Python statements and functions, and find out what you should use in both languages.

Who is the book for?

Anybody who has used Perl and who wants or needs to learn Python will find this book useful. The book gives a full guide on the basics of programming in Python from the perspective of a Perl programmer. Right from the basics of line and program structure all the way up to object-orientation and using external modules.

You don't need to be an expert Perl programmer , you just need to be able to understand the basics. I've tried to make the text as easy to read and follow as possible. However, on occasion things get technical, and to get the best out of the book you should at least know how to use and create your own functions, extension modules and classes and objects.

Without trying to give you the plot before you've read the book, if you know how to work with references, classes and objects in Perl, then your migration to Python is already 50% there!

How to use this book

The book is split into three main sections. The first section gives you an introduction to Python, including information on the basic mechanics of the language and information on who and where it is used.

Section 2 concentrates on the fundamentals of the language from the basics of expressions and statements through to comparing Python's object types with Perl variables. We'll also look at creating functions, error handling, and extending Python with modules and classes.

The last section concentrates on applying Python in real situations compared to the equivalent Perl process, function or module. For example, Chapter 8 looks at Python's built-in functions and their Perl equivalents, whilst Chapter 10 looks at manipulating data and regular expressions.

There are also two appendices at the back of the book. Appendix A provides a handy guide to getting more information about Python, including other books, websites, newsgroups, mailing lists and details on how to get the Python documentation to help you with your programming. Appendix B is a quick reference — it lists every Perl token, variable or function and provides you with the Python alternative. Where possible, it will also direct you straight to the page elsewhere in the book where you can find more information on the Python alternative.

If you are completely new to Python but know Perl then read Sections 1 and 2 first. If you've played with Python but never used it in anger, then start with Section 2. Finally if you know Python and just want quick reference information then use Appendix B to look up the Perl fragment you are looking for, or go straight to the suitable chapters in sections 2 and 3.

If you don't know Perl, then this book will not be a lot of help. Try reading Perl: The Complete Reference 2nd Edition (Osborne/McGraw-Hill, 2001) or Learning Perl, 2nd Edition (O'Reilly, 1997).

Chapter breakdown

There are fourteen chapters and two appendices in the book. Throughout the book examples of a Perl expression or statement are given, along with the equivalent Python version and information on why the changes and modifications are required. The rough content of each chapter is as follows:

Chapter 1, Introduction — An overview of Python covering information on it's history and who uses the language.

Chapter 2, Executing Python Programs — Python is much more of an interactive language, so before we look at the specifics of Perl and Python programs, we'll look at how to use and execute Python programs.

Chapter 3, Python Overview — Our first look at how Perl and Python differ from an overall structure and approach perspective.

Chapter 4, Components of a Python Program — Details the statements, data types and operators supported by Python and how they relate to their Perl equivalents.

Chapter 5, Functions — How to create and use Python functions and to migrate your Perl functions and argument handling into Python.

Chapter 6, Exceptions and Error Trapping — The mechanics of Python's exception system which is used throughout the language as a method for highlighting errors, right from parsing the source code through to creating and raising your own exceptions to indicate errors.

Chapter 7, Modules, Classes, and Object Orientation — Information on how to extend your Python applications with modules and classes, and how these relate to the Perl module and class structure.

Chapter 8, Built-in Functions — Quick guide to the functions that Python supports in the native interpreter.

Chapter 9, Interfacing with the Operating System — Details on how to communicate with the operating system, including information on getting command-line arguments, determining your environment and communicating with and starting new processes.

Chapter 10, Data Manipulation — How to manipulate numbers, strings, and work with regular expressions in Python.

Chapter 11, File Manipulation — File processing and management, from reading and writing to files through to managing directories, file permissions and controlling access.

Chapter 12, Communicating Over a Network — Details the processes behind communicating with network services, both from the perspective of a client and a server.

Chapter 13, Web Development — A quick guide to programming for the web under Python.

Chapter 14, GUI Development with Tk — Information on how to migrate your user interfaces from Perl/Tk to Python's Tkinter system.

Appendix A, Python Resources — A guide to the books, mailing lists, websites and online documentation available for information on Python.

Appendix B, Perl to Python Quick Reference — A cross reference that lists all the Perl tokens, variables and functions used in Perl and the corresponding Python equivalent.

Conventions Used in This Book

All Perl keywords are highlighted in bold, but functions are listed without parentheses. This is because the C functions on which the Perl versions may be based are shown like this().

Examples and code are displayed using a fixed-width font.

Function descriptions are formatted using the same fixed-width font.

Note: notes are formatted like this and include additional information about a particular topic. You'll also find similarly formatted "Warnings," which highlight possible dangerous tools or tricks to watch out for when programming.

Contacting the Author

I always welcome comments and suggestions on my work. The best way to contact me is via e-mail. You can use either books@mcwords.com. Alternatively, visit my website, http://www.mcwords.com, which contains resources and updated information about the scripts and contents of this book. You can find the homepage for this book at http://www.mcwords.com/projects/books/p2py/.



Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)