├── README.md ├── chapter10_re ├── compiling_example.py ├── finding_multiple_instances.py └── pattern_matching.py ├── chapter11_builtins ├── any_example.py ├── enumerate_example.py ├── eval_example.py ├── filter_example.py ├── map_example.py └── zip_example.py ├── chapter12_unicode └── README.txt ├── chapter13_benchmarking ├── memo_prof.py ├── profhooks.py ├── profhooks2.py ├── silly_functions.py ├── simple_func.py ├── simple_func2.py ├── timing_context_manager.py └── timing_decorator.py ├── chapter14_encryption ├── fernet_encryption.py ├── file_decryption.py ├── file_encryption.py ├── hashing.py ├── key_derivation.py ├── rsa_key_generation.py └── string_encryption.py ├── chapter15_databases ├── adodb_example.py ├── mysql_example.py ├── postgres_example.py └── pyodbc_example.py ├── chapter16_super ├── mro_example.py ├── mro_example2.py ├── python2_super_example.py ├── python3_super_example.py ├── regular_class.py ├── super_args.py └── super_mro_this.py ├── chapter17_descriptors ├── descriptor_example.py └── validation.py ├── chapter18_scope ├── global_example.py ├── global_local_mix.py ├── incrementer.py ├── local_scope.py ├── local_scope_unbound.py └── nonlocal_example.py ├── chapter19_web_scraping ├── beautifulsoup_example.py ├── beautifulsoup_example2.py ├── blog.py └── items.py ├── chapter1_argparse ├── arg_demo.py ├── arg_demo2.py └── conflicting_options.py ├── chapter20_web_apis ├── reddit_example.py ├── tweepy_example.py └── wikipedia_example.py ├── chapter21_ftplib ├── ftp_upload.py └── ftplib_example.py ├── chapter22_urllib ├── custom_user_agent.py ├── download_file.py ├── download_file2.py ├── download_file_simple.py ├── robot_parser_example.py ├── submit_form.py ├── url_information.py └── url_parsing.py ├── chapter23_doctest ├── add.txt ├── mymath.py ├── mymath.pyc ├── mymath_with_doctest.py └── test_mymath.py ├── chapter24_unittest ├── mymath.py ├── simple_db.py ├── skipping_tests_example.py ├── test_db.py ├── test_mymath.py ├── test_mymath2.py ├── test_suite_example.py └── tests │ ├── my_docs.py │ └── test_doctests.py ├── chapter25_mock ├── autospec.py ├── mock_webreader.py ├── side_effects.py ├── simple_mock.py ├── simple_mock2.py └── webreader.py ├── chapter26_coverage_py ├── mymath.py ├── test_mymath.py ├── test_mymath2.py └── test_mymath3.py ├── chapter27_asyncio ├── bad_downloader.py ├── downloader.py ├── new_coroutine.py ├── old_coroutine.py ├── scheduling_calls.py └── tasks.py ├── chapter28_threading ├── access_functions.py ├── access_functions_hung.py ├── access_functions_reentrant.py ├── locking_example.py ├── locking_with_context.py ├── no_locks.py ├── thread_intro.py ├── thread_logging.py ├── thread_pool.py ├── thread_subclass.py └── timer_example.py ├── chapter29_multiprocessing ├── get_process_id.py ├── get_process_name.py ├── locking.py ├── logging_example.py ├── pool_example.py ├── pool_example2.py └── process_communication.py ├── chapter2_collections ├── chainmap_example.py ├── defaultdict_counter.py ├── defaultdict_counter2.py ├── deque_example.py ├── namedtuple_example.py ├── regular_dict_counter.py └── regular_dict_counter2.py ├── chapter30_concurrent_futures ├── deadlock_fixed.py ├── deadlocked.py ├── pool_downloader.py └── pool_downloader_map.py ├── chapter3_context_managers ├── context_sqlite.py ├── contextlib_closing.py ├── contextlib_context.py ├── contextlib_redirect.py └── contextlib_suppress.py ├── chapter4_functools ├── cache.py ├── decorum.py ├── function_overloading.py ├── function_overloading2.py ├── partial_events.py ├── partial_math.py └── wrap_rescue.py ├── chapter5_imports ├── circular_imports │ ├── a.py │ └── b.py ├── local_imports.py ├── math.py ├── my_package │ ├── __init__.py │ ├── module_a.py │ ├── subpackage1 │ │ ├── __init__.py │ │ ├── module_x.py │ │ └── module_y.py │ └── subpackage2 │ │ ├── __init__.py │ │ └── module_z.py ├── optional_imports.py └── optional_imports2.py ├── chapter6_importlib ├── bar.py ├── foo.py ├── import_checking.py ├── import_from_source.py └── importer.py ├── chapter7_iterators_generators ├── custom_iterator.py └── infinite_iterator.py └── chapter8_itertools ├── accumulate_example.py ├── chain_example.py ├── combinations_example.py ├── combinations_example2.py ├── combinations_with_replacement_example.py ├── compress_example.py ├── cycle_example.py ├── dropwhile_example.py ├── dropwhile_example2.py ├── filterfalse_example.py ├── groupby_example.py ├── islice_example.py ├── itertools_count.py ├── limit_count.py ├── permutations_example.py ├── product_example.py ├── starmap_example.py ├── takewhile_example.py ├── tee_example.py └── zip_longest_example.py /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/README.md -------------------------------------------------------------------------------- /chapter10_re/compiling_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter10_re/compiling_example.py -------------------------------------------------------------------------------- /chapter10_re/finding_multiple_instances.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter10_re/finding_multiple_instances.py -------------------------------------------------------------------------------- /chapter10_re/pattern_matching.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter10_re/pattern_matching.py -------------------------------------------------------------------------------- /chapter11_builtins/any_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter11_builtins/any_example.py -------------------------------------------------------------------------------- /chapter11_builtins/enumerate_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter11_builtins/enumerate_example.py -------------------------------------------------------------------------------- /chapter11_builtins/eval_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter11_builtins/eval_example.py -------------------------------------------------------------------------------- /chapter11_builtins/filter_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter11_builtins/filter_example.py -------------------------------------------------------------------------------- /chapter11_builtins/map_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter11_builtins/map_example.py -------------------------------------------------------------------------------- /chapter11_builtins/zip_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter11_builtins/zip_example.py -------------------------------------------------------------------------------- /chapter12_unicode/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter12_unicode/README.txt -------------------------------------------------------------------------------- /chapter13_benchmarking/memo_prof.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter13_benchmarking/memo_prof.py -------------------------------------------------------------------------------- /chapter13_benchmarking/profhooks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter13_benchmarking/profhooks.py -------------------------------------------------------------------------------- /chapter13_benchmarking/profhooks2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter13_benchmarking/profhooks2.py -------------------------------------------------------------------------------- /chapter13_benchmarking/silly_functions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter13_benchmarking/silly_functions.py -------------------------------------------------------------------------------- /chapter13_benchmarking/simple_func.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter13_benchmarking/simple_func.py -------------------------------------------------------------------------------- /chapter13_benchmarking/simple_func2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter13_benchmarking/simple_func2.py -------------------------------------------------------------------------------- /chapter13_benchmarking/timing_context_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter13_benchmarking/timing_context_manager.py -------------------------------------------------------------------------------- /chapter13_benchmarking/timing_decorator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter13_benchmarking/timing_decorator.py -------------------------------------------------------------------------------- /chapter14_encryption/fernet_encryption.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter14_encryption/fernet_encryption.py -------------------------------------------------------------------------------- /chapter14_encryption/file_decryption.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter14_encryption/file_decryption.py -------------------------------------------------------------------------------- /chapter14_encryption/file_encryption.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter14_encryption/file_encryption.py -------------------------------------------------------------------------------- /chapter14_encryption/hashing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter14_encryption/hashing.py -------------------------------------------------------------------------------- /chapter14_encryption/key_derivation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter14_encryption/key_derivation.py -------------------------------------------------------------------------------- /chapter14_encryption/rsa_key_generation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter14_encryption/rsa_key_generation.py -------------------------------------------------------------------------------- /chapter14_encryption/string_encryption.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter14_encryption/string_encryption.py -------------------------------------------------------------------------------- /chapter15_databases/adodb_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter15_databases/adodb_example.py -------------------------------------------------------------------------------- /chapter15_databases/mysql_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter15_databases/mysql_example.py -------------------------------------------------------------------------------- /chapter15_databases/postgres_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter15_databases/postgres_example.py -------------------------------------------------------------------------------- /chapter15_databases/pyodbc_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter15_databases/pyodbc_example.py -------------------------------------------------------------------------------- /chapter16_super/mro_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter16_super/mro_example.py -------------------------------------------------------------------------------- /chapter16_super/mro_example2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter16_super/mro_example2.py -------------------------------------------------------------------------------- /chapter16_super/python2_super_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter16_super/python2_super_example.py -------------------------------------------------------------------------------- /chapter16_super/python3_super_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter16_super/python3_super_example.py -------------------------------------------------------------------------------- /chapter16_super/regular_class.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter16_super/regular_class.py -------------------------------------------------------------------------------- /chapter16_super/super_args.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter16_super/super_args.py -------------------------------------------------------------------------------- /chapter16_super/super_mro_this.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter16_super/super_mro_this.py -------------------------------------------------------------------------------- /chapter17_descriptors/descriptor_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter17_descriptors/descriptor_example.py -------------------------------------------------------------------------------- /chapter17_descriptors/validation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter17_descriptors/validation.py -------------------------------------------------------------------------------- /chapter18_scope/global_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter18_scope/global_example.py -------------------------------------------------------------------------------- /chapter18_scope/global_local_mix.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter18_scope/global_local_mix.py -------------------------------------------------------------------------------- /chapter18_scope/incrementer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter18_scope/incrementer.py -------------------------------------------------------------------------------- /chapter18_scope/local_scope.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter18_scope/local_scope.py -------------------------------------------------------------------------------- /chapter18_scope/local_scope_unbound.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter18_scope/local_scope_unbound.py -------------------------------------------------------------------------------- /chapter18_scope/nonlocal_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter18_scope/nonlocal_example.py -------------------------------------------------------------------------------- /chapter19_web_scraping/beautifulsoup_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter19_web_scraping/beautifulsoup_example.py -------------------------------------------------------------------------------- /chapter19_web_scraping/beautifulsoup_example2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter19_web_scraping/beautifulsoup_example2.py -------------------------------------------------------------------------------- /chapter19_web_scraping/blog.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter19_web_scraping/blog.py -------------------------------------------------------------------------------- /chapter19_web_scraping/items.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter19_web_scraping/items.py -------------------------------------------------------------------------------- /chapter1_argparse/arg_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter1_argparse/arg_demo.py -------------------------------------------------------------------------------- /chapter1_argparse/arg_demo2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter1_argparse/arg_demo2.py -------------------------------------------------------------------------------- /chapter1_argparse/conflicting_options.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter1_argparse/conflicting_options.py -------------------------------------------------------------------------------- /chapter20_web_apis/reddit_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter20_web_apis/reddit_example.py -------------------------------------------------------------------------------- /chapter20_web_apis/tweepy_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter20_web_apis/tweepy_example.py -------------------------------------------------------------------------------- /chapter20_web_apis/wikipedia_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter20_web_apis/wikipedia_example.py -------------------------------------------------------------------------------- /chapter21_ftplib/ftp_upload.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter21_ftplib/ftp_upload.py -------------------------------------------------------------------------------- /chapter21_ftplib/ftplib_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter21_ftplib/ftplib_example.py -------------------------------------------------------------------------------- /chapter22_urllib/custom_user_agent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter22_urllib/custom_user_agent.py -------------------------------------------------------------------------------- /chapter22_urllib/download_file.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter22_urllib/download_file.py -------------------------------------------------------------------------------- /chapter22_urllib/download_file2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter22_urllib/download_file2.py -------------------------------------------------------------------------------- /chapter22_urllib/download_file_simple.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter22_urllib/download_file_simple.py -------------------------------------------------------------------------------- /chapter22_urllib/robot_parser_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter22_urllib/robot_parser_example.py -------------------------------------------------------------------------------- /chapter22_urllib/submit_form.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter22_urllib/submit_form.py -------------------------------------------------------------------------------- /chapter22_urllib/url_information.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter22_urllib/url_information.py -------------------------------------------------------------------------------- /chapter22_urllib/url_parsing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter22_urllib/url_parsing.py -------------------------------------------------------------------------------- /chapter23_doctest/add.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter23_doctest/add.txt -------------------------------------------------------------------------------- /chapter23_doctest/mymath.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter23_doctest/mymath.py -------------------------------------------------------------------------------- /chapter23_doctest/mymath.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter23_doctest/mymath.pyc -------------------------------------------------------------------------------- /chapter23_doctest/mymath_with_doctest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter23_doctest/mymath_with_doctest.py -------------------------------------------------------------------------------- /chapter23_doctest/test_mymath.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter23_doctest/test_mymath.py -------------------------------------------------------------------------------- /chapter24_unittest/mymath.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter24_unittest/mymath.py -------------------------------------------------------------------------------- /chapter24_unittest/simple_db.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter24_unittest/simple_db.py -------------------------------------------------------------------------------- /chapter24_unittest/skipping_tests_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter24_unittest/skipping_tests_example.py -------------------------------------------------------------------------------- /chapter24_unittest/test_db.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter24_unittest/test_db.py -------------------------------------------------------------------------------- /chapter24_unittest/test_mymath.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter24_unittest/test_mymath.py -------------------------------------------------------------------------------- /chapter24_unittest/test_mymath2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter24_unittest/test_mymath2.py -------------------------------------------------------------------------------- /chapter24_unittest/test_suite_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter24_unittest/test_suite_example.py -------------------------------------------------------------------------------- /chapter24_unittest/tests/my_docs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter24_unittest/tests/my_docs.py -------------------------------------------------------------------------------- /chapter24_unittest/tests/test_doctests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter24_unittest/tests/test_doctests.py -------------------------------------------------------------------------------- /chapter25_mock/autospec.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter25_mock/autospec.py -------------------------------------------------------------------------------- /chapter25_mock/mock_webreader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter25_mock/mock_webreader.py -------------------------------------------------------------------------------- /chapter25_mock/side_effects.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter25_mock/side_effects.py -------------------------------------------------------------------------------- /chapter25_mock/simple_mock.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter25_mock/simple_mock.py -------------------------------------------------------------------------------- /chapter25_mock/simple_mock2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter25_mock/simple_mock2.py -------------------------------------------------------------------------------- /chapter25_mock/webreader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter25_mock/webreader.py -------------------------------------------------------------------------------- /chapter26_coverage_py/mymath.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter26_coverage_py/mymath.py -------------------------------------------------------------------------------- /chapter26_coverage_py/test_mymath.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter26_coverage_py/test_mymath.py -------------------------------------------------------------------------------- /chapter26_coverage_py/test_mymath2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter26_coverage_py/test_mymath2.py -------------------------------------------------------------------------------- /chapter26_coverage_py/test_mymath3.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter26_coverage_py/test_mymath3.py -------------------------------------------------------------------------------- /chapter27_asyncio/bad_downloader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter27_asyncio/bad_downloader.py -------------------------------------------------------------------------------- /chapter27_asyncio/downloader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter27_asyncio/downloader.py -------------------------------------------------------------------------------- /chapter27_asyncio/new_coroutine.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter27_asyncio/new_coroutine.py -------------------------------------------------------------------------------- /chapter27_asyncio/old_coroutine.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter27_asyncio/old_coroutine.py -------------------------------------------------------------------------------- /chapter27_asyncio/scheduling_calls.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter27_asyncio/scheduling_calls.py -------------------------------------------------------------------------------- /chapter27_asyncio/tasks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter27_asyncio/tasks.py -------------------------------------------------------------------------------- /chapter28_threading/access_functions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/access_functions.py -------------------------------------------------------------------------------- /chapter28_threading/access_functions_hung.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/access_functions_hung.py -------------------------------------------------------------------------------- /chapter28_threading/access_functions_reentrant.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/access_functions_reentrant.py -------------------------------------------------------------------------------- /chapter28_threading/locking_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/locking_example.py -------------------------------------------------------------------------------- /chapter28_threading/locking_with_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/locking_with_context.py -------------------------------------------------------------------------------- /chapter28_threading/no_locks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/no_locks.py -------------------------------------------------------------------------------- /chapter28_threading/thread_intro.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/thread_intro.py -------------------------------------------------------------------------------- /chapter28_threading/thread_logging.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/thread_logging.py -------------------------------------------------------------------------------- /chapter28_threading/thread_pool.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/thread_pool.py -------------------------------------------------------------------------------- /chapter28_threading/thread_subclass.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/thread_subclass.py -------------------------------------------------------------------------------- /chapter28_threading/timer_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter28_threading/timer_example.py -------------------------------------------------------------------------------- /chapter29_multiprocessing/get_process_id.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter29_multiprocessing/get_process_id.py -------------------------------------------------------------------------------- /chapter29_multiprocessing/get_process_name.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter29_multiprocessing/get_process_name.py -------------------------------------------------------------------------------- /chapter29_multiprocessing/locking.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter29_multiprocessing/locking.py -------------------------------------------------------------------------------- /chapter29_multiprocessing/logging_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter29_multiprocessing/logging_example.py -------------------------------------------------------------------------------- /chapter29_multiprocessing/pool_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter29_multiprocessing/pool_example.py -------------------------------------------------------------------------------- /chapter29_multiprocessing/pool_example2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter29_multiprocessing/pool_example2.py -------------------------------------------------------------------------------- /chapter29_multiprocessing/process_communication.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter29_multiprocessing/process_communication.py -------------------------------------------------------------------------------- /chapter2_collections/chainmap_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter2_collections/chainmap_example.py -------------------------------------------------------------------------------- /chapter2_collections/defaultdict_counter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter2_collections/defaultdict_counter.py -------------------------------------------------------------------------------- /chapter2_collections/defaultdict_counter2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter2_collections/defaultdict_counter2.py -------------------------------------------------------------------------------- /chapter2_collections/deque_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter2_collections/deque_example.py -------------------------------------------------------------------------------- /chapter2_collections/namedtuple_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter2_collections/namedtuple_example.py -------------------------------------------------------------------------------- /chapter2_collections/regular_dict_counter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter2_collections/regular_dict_counter.py -------------------------------------------------------------------------------- /chapter2_collections/regular_dict_counter2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter2_collections/regular_dict_counter2.py -------------------------------------------------------------------------------- /chapter30_concurrent_futures/deadlock_fixed.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter30_concurrent_futures/deadlock_fixed.py -------------------------------------------------------------------------------- /chapter30_concurrent_futures/deadlocked.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter30_concurrent_futures/deadlocked.py -------------------------------------------------------------------------------- /chapter30_concurrent_futures/pool_downloader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter30_concurrent_futures/pool_downloader.py -------------------------------------------------------------------------------- /chapter30_concurrent_futures/pool_downloader_map.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter30_concurrent_futures/pool_downloader_map.py -------------------------------------------------------------------------------- /chapter3_context_managers/context_sqlite.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter3_context_managers/context_sqlite.py -------------------------------------------------------------------------------- /chapter3_context_managers/contextlib_closing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter3_context_managers/contextlib_closing.py -------------------------------------------------------------------------------- /chapter3_context_managers/contextlib_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter3_context_managers/contextlib_context.py -------------------------------------------------------------------------------- /chapter3_context_managers/contextlib_redirect.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter3_context_managers/contextlib_redirect.py -------------------------------------------------------------------------------- /chapter3_context_managers/contextlib_suppress.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter3_context_managers/contextlib_suppress.py -------------------------------------------------------------------------------- /chapter4_functools/cache.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter4_functools/cache.py -------------------------------------------------------------------------------- /chapter4_functools/decorum.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter4_functools/decorum.py -------------------------------------------------------------------------------- /chapter4_functools/function_overloading.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter4_functools/function_overloading.py -------------------------------------------------------------------------------- /chapter4_functools/function_overloading2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter4_functools/function_overloading2.py -------------------------------------------------------------------------------- /chapter4_functools/partial_events.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter4_functools/partial_events.py -------------------------------------------------------------------------------- /chapter4_functools/partial_math.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter4_functools/partial_math.py -------------------------------------------------------------------------------- /chapter4_functools/wrap_rescue.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter4_functools/wrap_rescue.py -------------------------------------------------------------------------------- /chapter5_imports/circular_imports/a.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/circular_imports/a.py -------------------------------------------------------------------------------- /chapter5_imports/circular_imports/b.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/circular_imports/b.py -------------------------------------------------------------------------------- /chapter5_imports/local_imports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/local_imports.py -------------------------------------------------------------------------------- /chapter5_imports/math.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/math.py -------------------------------------------------------------------------------- /chapter5_imports/my_package/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/my_package/__init__.py -------------------------------------------------------------------------------- /chapter5_imports/my_package/module_a.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter5_imports/my_package/subpackage1/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/my_package/subpackage1/__init__.py -------------------------------------------------------------------------------- /chapter5_imports/my_package/subpackage1/module_x.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/my_package/subpackage1/module_x.py -------------------------------------------------------------------------------- /chapter5_imports/my_package/subpackage1/module_y.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/my_package/subpackage1/module_y.py -------------------------------------------------------------------------------- /chapter5_imports/my_package/subpackage2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter5_imports/my_package/subpackage2/module_z.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chapter5_imports/optional_imports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/optional_imports.py -------------------------------------------------------------------------------- /chapter5_imports/optional_imports2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter5_imports/optional_imports2.py -------------------------------------------------------------------------------- /chapter6_importlib/bar.py: -------------------------------------------------------------------------------- 1 | def main(): 2 | print(__name__) -------------------------------------------------------------------------------- /chapter6_importlib/foo.py: -------------------------------------------------------------------------------- 1 | def main(): 2 | print(__name__) -------------------------------------------------------------------------------- /chapter6_importlib/import_checking.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter6_importlib/import_checking.py -------------------------------------------------------------------------------- /chapter6_importlib/import_from_source.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter6_importlib/import_from_source.py -------------------------------------------------------------------------------- /chapter6_importlib/importer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter6_importlib/importer.py -------------------------------------------------------------------------------- /chapter7_iterators_generators/custom_iterator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter7_iterators_generators/custom_iterator.py -------------------------------------------------------------------------------- /chapter7_iterators_generators/infinite_iterator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter7_iterators_generators/infinite_iterator.py -------------------------------------------------------------------------------- /chapter8_itertools/accumulate_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/accumulate_example.py -------------------------------------------------------------------------------- /chapter8_itertools/chain_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/chain_example.py -------------------------------------------------------------------------------- /chapter8_itertools/combinations_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/combinations_example.py -------------------------------------------------------------------------------- /chapter8_itertools/combinations_example2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/combinations_example2.py -------------------------------------------------------------------------------- /chapter8_itertools/combinations_with_replacement_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/combinations_with_replacement_example.py -------------------------------------------------------------------------------- /chapter8_itertools/compress_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/compress_example.py -------------------------------------------------------------------------------- /chapter8_itertools/cycle_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/cycle_example.py -------------------------------------------------------------------------------- /chapter8_itertools/dropwhile_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/dropwhile_example.py -------------------------------------------------------------------------------- /chapter8_itertools/dropwhile_example2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/dropwhile_example2.py -------------------------------------------------------------------------------- /chapter8_itertools/filterfalse_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/filterfalse_example.py -------------------------------------------------------------------------------- /chapter8_itertools/groupby_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/groupby_example.py -------------------------------------------------------------------------------- /chapter8_itertools/islice_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/islice_example.py -------------------------------------------------------------------------------- /chapter8_itertools/itertools_count.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/itertools_count.py -------------------------------------------------------------------------------- /chapter8_itertools/limit_count.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/limit_count.py -------------------------------------------------------------------------------- /chapter8_itertools/permutations_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/permutations_example.py -------------------------------------------------------------------------------- /chapter8_itertools/product_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/product_example.py -------------------------------------------------------------------------------- /chapter8_itertools/starmap_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/starmap_example.py -------------------------------------------------------------------------------- /chapter8_itertools/takewhile_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/takewhile_example.py -------------------------------------------------------------------------------- /chapter8_itertools/tee_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/tee_example.py -------------------------------------------------------------------------------- /chapter8_itertools/zip_longest_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/driscollis/python201bookcode/HEAD/chapter8_itertools/zip_longest_example.py --------------------------------------------------------------------------------