(Most of them in Python 3)
Library Requirements File (For Python2)
- Chapter 4: Multithreaded Programming
- Example 4-10: Locks and More Randomness (mtsleepF.py)
- Example 4-11: Candy Vending Machines and Semaphores (candy.py)
- Example 4-12: Producer-Consumer Problem (prodcons.py)
- Example 4-13: Higher-Level Job Management (bookrank3CF.py)
- Exercise 4-1: Processes vs. Threads (processes_vs_threads.md)
- Exercise 4-2: Utility of multithreading in Python (python_threads.md)
- Exercise 4-3: Mulithreading on Multicore System (threads_multicore.md)
- Exercise 4-4-a: Simple Byte Count (bytes_count.py)
- Exercise 4-4-b: Multithreaded Byte Count (mt_bytes_count.py)
- Exercise 4-5: Threads, Files and Regex (mt_simple_header_analysis.py, simple_header_analysis.py)
- Exercise 4-6: Threads and Networking (mt_duplex_chat_serv.py, mt_duplexc_chat_clnt.py)
- Exercise 4-7: Threads and Web Programming (Optional, to be done)(mtcrawl.py)
- Exercise 4-8: Thread Pools (thread_pools.py)
- Exercise 4-9: Files (mt_lines_counter.py) Single threaded version runs faster than the multithreaded one.
- Exercise 4-10: Concurrent Processing (concurrent_processing.py)
- Exercise 4-11: Synchronization Primitives (sync_prim.md)
- Exercise 4-12: Porting to Python 3 (already built Example 4-11 in Python3) (candy.py)
- Chapter 5: GUI Programming
- Example 5-1: Label Widget Demo (changed in Exercise 5-3) (tkhello1.py)
- Example 5-2: Button Widget Demo (tkhello2.py)
- Example 5-3: Label and Button Widget Demo (Changed in Exercise 5-4) (tkhello3.py)
- Example 5-4: Label, Button and Scale Demonstration (tkhello4.py)
- Example 5-5: Road Signs PFA GUI Application (pfaGUI.py)
- Example 5-6: File System Traversal GUI (listdir.py)
- Example 5-7: Tix GUI Demo (animalTix.pyw)
- Example 5-8: Pmw GUI Demo (modified in Exercise 5-10) (animalPmw.pyw)
- Example 5-9: wxPython GUI Demo (modified in Exercise 5-10) (animalWx.pyw)
- Example 5-10: PyGTK GUI Demo (animalGtk.pyw)
- Example 5-11: Tile/Ttk GUI Demo (animalTtk.pyw)
- Example 5-12: Tile/Ttk Python 3 GUI Demo (animalTtk3.pyw)
- Exercise 5-1: Client/Server Architecture (client_server_architecture.md)
- Exercise 5-2: Object-Oriented Programming (oop.md)
- Exercise 5-3: Label Widgets (tkhello1.py)
- Exercise 5-4: Label and Button Widgets (modified in Exercise 5-5) (tkhello3.py)
- Exercise 5-5: Label, Button and Radiobutton Widgets (modified in Exercise 5-6) (tkhello3.py)
- Exercise 5-6: Label, Button and Entry Widgets (tkhello3.py)
- Exercise 5-7: Label and Entry Widgets and Python I/O (extra credit stuff will be done later) (file_reader.py)
- Exercise 5-8: Simple Text Editor (text_editor.py)
- Exercise 5-9: Multithreaded Chat Applications (chat_serv.py, chat_clnt_GUI.py)
- Exercise 5-10: Using Other GUIs (some are not working on my system, so very little modification is done.) (animalPmw.pyw, animalWx.pyw)
- Exercise 5-11: Using GUI Builders. I had problems in either installation, download or running of the builders (some of them maybe due to version mismatch). Thus, perhaps later.
- Chapter 6: Database Programming
- Example 6-1: Database Adapter Example
- Example 6-2: SQLAlchemy ORM Example
- Example 6-3: SQLObject ORM Example
- Example 6-4: MongoDB Example
- Exercise 6-1: Database API (db_api.md)
- Exercise 6-2: Database API (paramstyle_differences.md)
- Exercise 6-3: Cursor Objects (execute_differnces.md)
- Exercise 6-4: Cursor Objects (fetch_differences.md)
- Exercise 6-5: Database Adapters (pgsql_features.md)
- Exercise 6-6: Type Objects (psql_sample.py)
- Exercise 6-7: Refactoring (ushuffle_dbU.py)
- Exercise 6-8: Database and HTML (db_to_html.py, output.html)
- Exercise 6-9: Web Programming and Databases (not implemented yet as I don't know much about web programming as of this writing)
- Exercise 6-10: GUI Programming and Databases (db_GUI.py)
- Exercise 6-11: Stock Portfolio Class (not implemented yet as I don't know much about web programming as of this writing)
- Exercise 6-12: Debugging & Refactoring (ushuffle_dbU.py)
- Exercise 6-13: Stock Portfolio Class (not implemented as it depends on Exercise 6-11, shall do after sufficient learning)
- Exercise 6-14: To be done later; same reason as above.
- Exercise 6-15: Supporting Different RDBMSs (ushuffle_sad.py)
- Exercise 6-16: Importing and Python (builtins_explanation.md)
- Exercise 6-17: Porting to Python 3 (warn_vs_print.md)
- Exercise 6-18: Porting to Python 3 (print_vs_print_function.md)
- Exercise 6-19: Python Language (towards_universal.md)
- Exercise 6-20: Exceptions: added functionality, but unable to test as of this writing (ushuffle_sad.py)
- Exercise 6-21: SQLAlchemy (a: ushuffle_sad.py, b: ushuffle_sad.py)
- Exercise 6-22: SQLAlchemy (ushuffle_sad.py) The query
update()
method was faster than the procedure we used before; I usedtime
instead oftimeit
because of its convenience. Theupdate()
method took about 0.0026s, whereas the previous method took about 0.004s on my system. - Exercise 6-23: SQLAlchemy (ushuffle_sad.py) Again, the query
delete()
method was faster than the previous procedure. It took about 0.001s to run, whereas the previous procedure took about 0.003s to run on my system. And again,time
was used instead oftimeit
. - Exercise 6-24: SQLAlchemy (Kinda) (ushuffle_sae.py)
- Exercise 6-25: Django Data Models: Shall do later, don't know much Django as of this writing.
- Exercise 6-26: Storm ORM - tried installing storm, in vain
- Exercise 6-27: NoSQL (for_nosql.md)
- Exercise 6-28: NoSQL (nosql_types.md)
- Exercise 6-29: CouchDB (ushuffle_couch.py)
- Chapter 7: Programming Microsoft Office (optional; will do later)
- Chapter 8: Extending Python
- Example 8-1: Pure C Version of Library (Extest1.c)
- Example 8-2: The Build Script (setup.py)
- Example 8-3: Python-Wrapped Version of C Library (Extest2.c)
- Exercise 8-1: Extending Python (extension_advantages.md)
- Exercise 8-2: Extending Python (extension_disadvantages)
- Exercise 8-3: Writing Extensions (upper.c, upper_setup.py)
- Exercise 8-4: Porting from Python to C (implemented timestamp server and client from Chapter 2 as a Python extension, shall port about a couple more exericses later [Incomplete]) (chat.c, chat_setup.py)
- Exercise 8-5: Wrapping C Code (helloWorld.c, hello_setup.py)
- Exercise 8-6: Writing Extensions - not done as I haven't read either of the mentioned books
- Exercise 8-7: Extending vs. Embedding (extending_vs_embedding.md)
- Exercise 8-8: Not Writing Extensions (helloworld.pyx, cy_setup.py)
-
Chapter 9: Web Clients and Servers
- Example 9-1: Basic HTTP Authentication (urlopen_auth.py)
- Example 9-2: Python3 HTTP Authentication Script (urlopen_auth3.py)
- Example 9-3: Web Crawler (crawl.py)
- Example 9-4: Link Parser (parse_links.py)
- Example 9-5: Programmatic Web Browsing (mech.py)
- Example 9-6: Simple Web Server (myhttpd.py)
Exercises coming soon...
- Chapter 10: Web Programming: CGI and WSGI
- Example 10-1: Static Form Web Page (friends.htm)
- Example 10-2: Results CGI Screen Code (friendsA.py)
- Example 10-3: Generating Form and Results Pages (friendsB.py)
- Example 10-4: Full User Interaction and Error Processing (friendsC.py)
- Example 10-5: Python 3 port of friendsC.py (friendsC3.py)
- Example 10-6: Simple Unicode CGI Example (uniCGI.py)
- Example 10-7: Advanced CGI Application (advCGI.py)
- WSGI musings (wsgi_musings.py)