Dive Into Python pptx
... of Contents Dive Into Python 1 Chapter 1. Installing Python 2 1.1. Which Python is right for you? 2 1.2. Python on Windows 2 1.3. Python on Mac OS X 3 1.4. Python on Mac OS 9 5 1.5. Python on RedHat ... localhost:~ /Python 2.3# make install /usr/bin/install −c python /usr/local/bin /python2 .3 localhost:~ /Python 2.3# exit logout localhost:~$ which python /usr/local/b...
Ngày tải lên: 28/03/2014, 23:20
Dive Into Python 3 pptx
... ② ['c:\\Users\\pilgrim\\diveintopython3\\examples\\feed-broken.xml', 'c:\\Users\\pilgrim\\diveintopython3\\examples\\feed-ns0.xml', 'c:\\Users\\pilgrim\\diveintopython3\\examples\\feed.xml'] 1. ... NEW IN DIVE INTO PYTHON 3” ❝ Isn’t this where we came in? ❞ — Pink Floyd, The Wall -1.1. A.K.A. “THE MINUS LEVEL” Are you already a Python programmer? Did you r...
Ngày tải lên: 08/03/2014, 22:20
... you can “call” a function through a SOAP library, with the standard Python calling syntax, and the function appears to return Python objects and values. But under the covers, the SOAP library ... decompressed the fpconst files. 5. Type python setup.py install to run the installation program. To verify that you installed fpconst correctly, run your Python IDE and check th...
Ngày tải lên: 17/10/2013, 19:15
Dive Into Python-Chapter 13. Unit Testing
... may become part of later. Python has a framework for unit testing, the appropriately-named unittest module. Note unittest is included with Python 2.1 and later. Python 2.0 users can download ... return value of fromRoman to anything. This is legal syntax in Python; if a function returns a value but nobody's listening, Python just throws away the return value. In this case...
Ngày tải lên: 20/10/2013, 10:15
Dive Into Python-Chapter 14. Test-First Programming
... "C:\docbook\dip\py\roman\stage3\romantest3.py", line 156, in testFromRomanCase roman3.fromRoman, numeral.lower()) File "c: \python2 1\lib\unittest.py", line 266, in failUnlessRaises raise self.failureException, excName ... testMalformedAntecedent self.assertRaises(roman3.InvalidRomanNumeralError, roman3.fromRoman, s) File "c: \python2 1\lib\unittest.py&qu...
Ngày tải lên: 20/10/2013, 10:15
Dive Into Python-Chapter 15. Refactoring
... new bugs, or otherwise maintain it. As you saw in Section 7.5, “Verbose Regular Expressions”, Python provides a way to document your logic line-by-line. Example 15.15. roman83.py This file ... self.assertRaises(roman61.InvalidRomanNumeralError, roman61.fromRoman, "") File "c: \python2 1\lib\unittest.py", line 266, in failUnlessRaises raise self.failureExceptio...
Ngày tải lên: 24/10/2013, 09:15
Dive Into Python-Chapter 16. Functional Programming
... py]$ python /home/you/diveintopython/common/py/fullpath.py 1 sys.argv[0] = /home/you/diveintopython/common/py/fullpath.py path = /home/you/diveintopython/common/py full path = /home/you/diveintopython/common/py ... /home/you/diveintopython/common/py [you@localhost diveintopython]$ python common/py/fullpath.py 2 sys.argv[0] = common/py/fullpath.py path = common/py full path = /home...
Ngày tải lên: 24/10/2013, 09:15
Dive Into Python-Chapter 17. Dynamic functions
... 'vacancies' 1 This regular expression turns vacancy into vacancies and agency into agencies, which is what you wanted. Note that it would also turn boy into boies, but that will never happen in the ... and quickly descends into more advanced uses. English is a schizophrenic language that borrows from a lot of other languages, and the rules for making singular noun...
Ngày tải lên: 28/10/2013, 16:15
Dive Into Python-Chapter 18. Performance Tuning
... nature of Python. The regular expression engine is written in C, and compiled to run natively on your computer. On the other hand, this loop is written in Python, and runs through the Python interpreter. ... irreparably skew your results. The Python community has a saying: Python comes with batteries included.” Don't write your own timing framework. Python 2.3 comes with a...
Ngày tải lên: 28/10/2013, 16:15
Dive Into Python-Chapter 1. Installing Python
... localhost:~ /Python- 2.3# make install /usr/bin/install -c python /usr/local/bin /python2 .3 localhost:~ /Python- 2.3# exit logout localhost:~$ which python /usr/local/bin /python localhost:~$ python Python ... Unpacking python (from /python_ 2.3.1-1_all.deb) Setting up python (2.3.1-1) Setting up python2 .3 (2.3.1-1) Compiling python modules in /usr/lib /python...
Ngày tải lên: 07/11/2013, 10:15