分类:Python3-cookbook
来自菜鸟教程
分类“Python3-cookbook”中的页面
以下200个页面属于本分类,共283个页面。
(上一页)(下一页)P
- Python3-cookbook/aboutme
- Python3-cookbook/c01/p01 unpack sequence into separate variables
- Python3-cookbook/c01/p02 unpack elements from iterables
- Python3-cookbook/c01/p03 keep last n items
- Python3-cookbook/c01/p04 find largest or smallest n items
- Python3-cookbook/c01/p05 implement a priority queue
- Python3-cookbook/c01/p06 map keys to multiple values in dict
- Python3-cookbook/c01/p07 keep dict in order
- Python3-cookbook/c01/p08 calculating with dict
- Python3-cookbook/c01/p09 find commonalities in dicts
- Python3-cookbook/c01/p10 remove duplicates from seq order
- Python3-cookbook/c01/p11 naming slice
- Python3-cookbook/c01/p12 determine most freqently items in seq
- Python3-cookbook/c01/p13 sort list of dicts by key
- Python3-cookbook/c01/p14 sort objects without compare support
- Python3-cookbook/c01/p15 group records based on field
- Python3-cookbook/c01/p16 filter sequence elements
- Python3-cookbook/c01/p17 extract subset of dict
- Python3-cookbook/c01/p18 map names to sequence elements
- Python3-cookbook/c01/p19 transform and reduce data same time
- Python3-cookbook/c01/p20 combine multiple map to single map
- Python3-cookbook/c02/p01 split string on multiple delimiters
- Python3-cookbook/c02/p02 match text at start end
- Python3-cookbook/c02/p03 match strings with shell wildcard
- Python3-cookbook/c02/p04 match and search text
- Python3-cookbook/c02/p05 search and replace text
- Python3-cookbook/c02/p06 search replace case insensitive
- Python3-cookbook/c02/p07 specify regexp for shortest match
- Python3-cookbook/c02/p08 regexp for multiline partterns
- Python3-cookbook/c02/p09 normalize unicode text to regexp
- Python3-cookbook/c02/p10 work with unicode in regexp
- Python3-cookbook/c02/p11 strip unwanted characters
- Python3-cookbook/c02/p12 sanitizing clean up text
- Python3-cookbook/c02/p13 aligning text strings
- Python3-cookbook/c02/p14 combine and concatenate strings
- Python3-cookbook/c02/p15 interpolating variables in strings
- Python3-cookbook/c02/p16 reformat text to fixed number columns
- Python3-cookbook/c02/p17 handle html xml in text
- Python3-cookbook/c02/p18 tokenizing text
- Python3-cookbook/c02/p19 writing recursive descent parser
- Python3-cookbook/c02/p20 perform text operations on byte string
- Python3-cookbook/c03/p01 round number
- Python3-cookbook/c03/p02 accurate decimal calculations
- Python3-cookbook/c03/p03 format numbers for output
- Python3-cookbook/c03/p04 binary octal hexadecimal int
- Python3-cookbook/c03/p05 pack unpack large int from bytes
- Python3-cookbook/c03/p06 complex math
- Python3-cookbook/c03/p07 infinity and nan
- Python3-cookbook/c03/p08 calculating with fractions
- Python3-cookbook/c03/p09 calculating with large num arrays
- Python3-cookbook/c03/p10 matrix and linear algebra calculation
- Python3-cookbook/c03/p11 pick things at random
- Python3-cookbook/c03/p12 convert days to seconds and others
- Python3-cookbook/c03/p13 determine last friday date
- Python3-cookbook/c03/p14 date range for current month
- Python3-cookbook/c03/p15 convert strings into datetimes
- Python3-cookbook/c03/p16 manipulate dates involving timezone
- Python3-cookbook/c04/p01 manually consuming iterator
- Python3-cookbook/c04/p02 delegating iteration
- Python3-cookbook/c04/p03 create new iteration with generators
- Python3-cookbook/c04/p04 implement iterator protocol
- Python3-cookbook/c04/p05 iterating in reverse
- Python3-cookbook/c04/p06 define generator func with extra state
- Python3-cookbook/c04/p07 taking slice of iterator
- Python3-cookbook/c04/p08 skip first part of iterable
- Python3-cookbook/c04/p09 iterate over combination or permutation
- Python3-cookbook/c04/p10 iterate over index value pairs of sequence
- Python3-cookbook/c04/p11 iterate over multiple sequences simultaneously
- Python3-cookbook/c04/p12 iterate on items in separate containers
- Python3-cookbook/c04/p13 create data processing pipelines
- Python3-cookbook/c04/p14 flattening nested sequence
- Python3-cookbook/c04/p15 iterate in sorted order over merged sorted iterables
- Python3-cookbook/c04/p16 replace infinite while loops with iterator
- Python3-cookbook/c05/p01 read write text data
- Python3-cookbook/c05/p02 printing to file
- Python3-cookbook/c05/p03 print with different separator or line ending
- Python3-cookbook/c05/p04 read write binary data
- Python3-cookbook/c05/p05 write to file not exist
- Python3-cookbook/c05/p06 io operations on string
- Python3-cookbook/c05/p07 read write compressed datafiles
- Python3-cookbook/c05/p08 iterate over fixed sized records
- Python3-cookbook/c05/p09 read binary data into mutable buffer
- Python3-cookbook/c05/p10 memory mapping binary files
- Python3-cookbook/c05/p11 manipulating pathnames
- Python3-cookbook/c05/p12 test for the existence of file
- Python3-cookbook/c05/p13 get directory listing
- Python3-cookbook/c05/p14 bypassing filename encoding
- Python3-cookbook/c05/p15 printing bad filenames
- Python3-cookbook/c05/p16 add change encoding of already open file
- Python3-cookbook/c05/p17 write bytes to text file
- Python3-cookbook/c05/p18 wrap existing file descriptor as file object
- Python3-cookbook/c05/p19 make temporary files and directories
- Python3-cookbook/c05/p20 communicating with serial ports
- Python3-cookbook/c05/p21 serializing python objects
- Python3-cookbook/c06/p01 read write csv data
- Python3-cookbook/c06/p02 read-write json data
- Python3-cookbook/c06/p03 parse simple xml data
- Python3-cookbook/c06/p04 parse huge xml files incrementally
- Python3-cookbook/c06/p05 turning dictionary into xml
- Python3-cookbook/c06/p06 parse modify rewrite xml
- Python3-cookbook/c06/p07 parse xml documents with namespaces
- Python3-cookbook/c06/p08 interact with relational database
- Python3-cookbook/c06/p09 decode encode hexadecimal digits
- Python3-cookbook/c06/p10 decode encode base64
- Python3-cookbook/c06/p11 read write binary arrays of structures
- Python3-cookbook/c06/p12 read nested and variable sized binary structures
- Python3-cookbook/c06/p13 summarizing and perform statistics
- Python3-cookbook/c07/p01 functions that accept any number arguments
- Python3-cookbook/c07/p02 functions that only accept keyword arguments
- Python3-cookbook/c07/p03 attach informatinal matadata to function arguments
- Python3-cookbook/c07/p04 return multiple values from function
- Python3-cookbook/c07/p05 define functions with default arguments
- Python3-cookbook/c07/p06 define anonymous or inline functions
- Python3-cookbook/c07/p07 capturing variables in anonymous functions
- Python3-cookbook/c07/p08 make callable with fewer arguments
- Python3-cookbook/c07/p09 replace single method classes with functions
- Python3-cookbook/c07/p10 carry extra state with callback functions
- Python3-cookbook/c07/p11 inline callback functions
- Python3-cookbook/c07/p12 access variables defined inside closure
- Python3-cookbook/c08/p01 change string representation of instances
- Python3-cookbook/c08/p02 customizing string formatting
- Python3-cookbook/c08/p03 make objects support context management protocol
- Python3-cookbook/c08/p04 save memory when create large number instances
- Python3-cookbook/c08/p05 encapsulating names in class
- Python3-cookbook/c08/p06 create managed attributes
- Python3-cookbook/c08/p07 calling method on parent class
- Python3-cookbook/c08/p08 extending property in subclass
- Python3-cookbook/c08/p09 create new kind of class or instance attribute
- Python3-cookbook/c08/p10 using lazily computed properties
- Python3-cookbook/c08/p11 simplify initialization of data structure
- Python3-cookbook/c08/p12 define interface or abstract base class
- Python3-cookbook/c08/p13 implementing data model or type system
- Python3-cookbook/c08/p14 implementing custom containers
- Python3-cookbook/c08/p15 delegating attribute access
- Python3-cookbook/c08/p16 define more than one constructor in class
- Python3-cookbook/c08/p17 create instance without invoking init method
- Python3-cookbook/c08/p18 extending classes with mixins
- Python3-cookbook/c08/p19 implements stateful objects or state machines
- Python3-cookbook/c08/p20 call method on object by string name
- Python3-cookbook/c08/p21 implementing visitor pattern
- Python3-cookbook/c08/p22 implementing visitor pattern without recursion
- Python3-cookbook/c08/p23 managing memory in cyclic data structures
- Python3-cookbook/c08/p24 making classes support comparison operations
- Python3-cookbook/c08/p25 creating cached instances
- Python3-cookbook/c09/p01 put wrapper around function
- Python3-cookbook/c09/p02 preserve function metadata when write decorators
- Python3-cookbook/c09/p03 unwrapping decorator
- Python3-cookbook/c09/p04 define decorator that takes arguments
- Python3-cookbook/c09/p05 define decorator with user adjustable attributes
- Python3-cookbook/c09/p06 define decorator that takes optional argument
- Python3-cookbook/c09/p07 enforcing type check on function using decorator
- Python3-cookbook/c09/p08 define decorators as part of class
- Python3-cookbook/c09/p09 define decorators as classes
- Python3-cookbook/c09/p10 apply decorators to class and static methods
- Python3-cookbook/c09/p11 write decorators that add arguments to functions
- Python3-cookbook/c09/p12 using decorators to patch class definitions
- Python3-cookbook/c09/p13 using mataclass to control instance creation
- Python3-cookbook/c09/p14 capture class attribute definition order
- Python3-cookbook/c09/p15 define metaclass that takes optional arguments
- Python3-cookbook/c09/p16 enforce argument signature on args kwargs
- Python3-cookbook/c09/p17 enforce coding conventions in classes
- Python3-cookbook/c09/p18 define classes programmatically
- Python3-cookbook/c09/p19 initializing class members at definition time
- Python3-cookbook/c09/p20 implement multiple dispatch with function annotations
- Python3-cookbook/c09/p21 avoid repetitive property methods
- Python3-cookbook/c09/p22 define context managers the easy way
- Python3-cookbook/c09/p23 executing code with local side effects
- Python3-cookbook/c09/p24 parse and analyzing python source
- Python3-cookbook/c09/p25 disassembling python byte code
- Python3-cookbook/c10/p01 make hierarchical package of modules
- Python3-cookbook/c10/p02 control the import of everything
- Python3-cookbook/c10/p03 import submodules by relative names
- Python3-cookbook/c10/p04 split module into multiple files
- Python3-cookbook/c10/p05 separate directories import by namespace
- Python3-cookbook/c10/p06 reloading modules
- Python3-cookbook/c10/p07 make directory or zip runnable as main script
- Python3-cookbook/c10/p08 read datafile within package
- Python3-cookbook/c10/p09 add directories to sys path
- Python3-cookbook/c10/p10 import modules using name given in string
- Python3-cookbook/c10/p11 load modules from remote machine by hooks
- Python3-cookbook/c10/p12 patching modules on import
- Python3-cookbook/c10/p13 installing packages just for yourself
- Python3-cookbook/c10/p14 creating new python environment
- Python3-cookbook/c10/p15 distributing packages
- Python3-cookbook/c11/p01 interact with http services as client
- Python3-cookbook/c11/p02 creating tcp server
- Python3-cookbook/c11/p03 creating udp server
- Python3-cookbook/c11/p04 generate range of ip addresses from cidr address
- Python3-cookbook/c11/p05 creating simple rest based interface
- Python3-cookbook/c11/p06 implement simple remote procedure call with xml rpc
- Python3-cookbook/c11/p07 communicate simply between interpreters
- Python3-cookbook/c11/p08 implementing remote procedure calls
- Python3-cookbook/c11/p09 authenticating clients simply
- Python3-cookbook/c11/p10 add ssl to network services
- Python3-cookbook/c11/p11 pass socket file descriptor between processes
- Python3-cookbook/c11/p12 understanding event driven io
- Python3-cookbook/c11/p13 sending receiving large arrays
- Python3-cookbook/c12/p01 start stop thread
- Python3-cookbook/c12/p02 determining if thread has started
- Python3-cookbook/c12/p03 communicating between threads