python学习手册15 文档

简介: 点击(此处)折叠或打开 #!/usr/bin/env python # -*- coding:utf8 -*- ''' python文档资...

点击(此处)折叠或打开

  1. #!/usr/bin/env python
  2. # -*- coding:utf8 -*-
  3. '''
  4. python文档资源
  5. 形式 角色
  6. #注释 文件中的文档
  7. dir函数 对象中可用属性的列表
  8. 文档字符串:__doc__ 附加在对象上的文件中的文档
  9. PyDoc:help函数 对象的交互帮助
  10. PyDoc:HTML函数 浏览器中的模块文档
  11. 标准手册 正式的语言和库的说明
  12. 网站资源 在线教程,例子等
  13. 出版的书籍 商业参考书籍
  14. '''
  15. import sys
  16. import __future__
  17. #查看sys的属性
  18. print(dir(sys))
  19. print('================')
  20. #查看future的属性
  21. print(dir(__future__))
  22. #查看列表属性
  23. print(dir([]))
  24. print(dir([]) == dir(list))
  25. #查看字符串属性
  26. print(dir(''))
  27. print(dir('') == dir(str))
  28. #文档字符串:__doc__
  29. #这类注释是写成字符串,放在模块文件,函数以及类语句的顶端python会自动封装这个字符串,使其成为__doc__属性.
  30. """
  31. 文档内容
  32. """
  33. import t14
  34. print(t14.__doc__)
  35. print(sys.__doc__)
  36. print(sys.getrefcount.__doc__)
  37. print(int.__doc__)
  38. print(map.__doc__)

  39. #PyDoc:help函数
  40. #PyDoc是python程序代码,提取文档字符串,help函数会启动pydoc产生报表
  41. print('=============================')
  42. help(sys.getrefcount)
  43. help(sys)
  44. #Pydoc:html报表
  45. #标准手册集



点击(此处)折叠或打开

  1. /usr/bin/python2.7 /home/talen/PycharmProjects/untitled/t15.py
  2. ['__displayhook__', '__doc__', '__excepthook__', '__name__', '__package__', '__stderr__', '__stdin__', '__stdout__', '_clear_type_cache', '_current_frames', '_debugmallocstats', '_getframe', '_mercurial', 'api_version', 'argv', 'builtin_module_names', 'byteorder', 'call_tracing', 'callstats', 'copyright', 'displayhook', 'dont_write_bytecode', 'exc_clear', 'exc_info', 'exc_type', 'excepthook', 'exec_prefix', 'executable', 'exit', 'flags', 'float_info', 'float_repr_style', 'getcheckinterval', 'getdefaultencoding', 'getdlopenflags', 'getfilesystemencoding', 'getprofile', 'getrecursionlimit', 'getrefcount', 'getsizeof', 'gettrace', 'hexversion', 'long_info', 'maxint', 'maxsize', 'maxunicode', 'meta_path', 'modules', 'path', 'path_hooks', 'path_importer_cache', 'platform', 'prefix', 'py3kwarning', 'pydebug', 'setcheckinterval', 'setdlopenflags', 'setprofile', 'setrecursionlimit', 'settrace', 'stderr', 'stdin', 'stdout', 'subversion', 'version', 'version_info', 'warnoptions']
  3. ================
  4. ['CO_FUTURE_ABSOLUTE_IMPORT', 'CO_FUTURE_DIVISION', 'CO_FUTURE_PRINT_FUNCTION', 'CO_FUTURE_UNICODE_LITERALS', 'CO_FUTURE_WITH_STATEMENT', 'CO_GENERATOR_ALLOWED', 'CO_NESTED', '_Feature', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'absolute_import', 'all_feature_names', 'division', 'generators', 'nested_scopes', 'print_function', 'unicode_literals', 'with_statement']
  5. ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__delslice__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getslice__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__setslice__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']
  6. True
  7. ['__add__', '__class__', '__contains__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
  8. True
  9. #!/usr/bin/env python

  10. #-*- coding:utf8 -*-

  11. from __future__ import print_function




  12. #!/USR/BIN/ENV PYTHON
  13. #-*- CODING:UTF8 -*-
  14. FROM __FUTURE__ IMPORT PRINT_FUNCTION

  15. #!/usr/bin/env python

  16. #-*- coding:utf8 -*-

  17. from __future__ import print_function



  18. True
  19. #!/usr/bin/env python

  20. #-*- coding:utf8 -*-

  21. 1 2 3 1_2_3_a : 1
  22. c : 3
  23. b : 2
  24. a => 1
  25. c => 3
  26. b => 2
  27. a
  28. c
  29. b
  30. ['a', 'c', 'b']
  31. [(0, 't'), (1, 'a'), (2, 'l'), (3, 'e'), (4, 'n')]
  32. [11, 12, 13, 14]
  33. ['#!/usr/bin/env python\n', '#-*- coding:utf8 -*-\n', 'from __future__ import print_function\n', '\n']
  34. ['#!/usr/bin/env python', '#-*- coding:utf8 -*-', 'from __future__ import print_function', '']
  35. ['#!/usr/bin/env python', '#-*- coding:utf8 -*-', 'from __future__ import print_function', '']
  36. ['#!/USR/BIN/ENV PYTHON\n', '#-*- CODING:UTF8 -*-\n', 'FROM __FUTURE__ IMPORT PRINT_FUNCTION\n', '\n']
  37. ['#!/USR/BIN/ENV PYTHON', '#-*- CODING:UTF8 -*-', 'FROM __FUTURE__ IMPORT PRINT_FUNCTION', '']
  38. [['#!/usr/bin/env', 'python'], ['#-*-', 'coding:utf8', '-*-'], ['from', '__future__', 'import', 'print_function'], []]
  39. ['#!/usr/bin/env!python\n', '#-*-!coding:utf8!-*-\n', 'from!__future__!import!print_function\n', '\n']
  40. [(False, '#'), (False, '#'), (False, 'f'), (False, '\n')]
  41. ['#!/usr/bin/env python', '#-*- coding:utf8 -*-']
  42. ['a1', 'a2', 'a3', 'b1', 'b2', 'b3', 'c1', 'c2', 'c3']
  43. False
  44. False

  45. 文档内容

  46. This module provides access to some objects used or maintained by the
  47. interpreter and to functions that interact strongly with the interpreter.

  48. Dynamic objects:

  49. argv -- command line arguments; argv[0] is the script pathname if known
  50. path -- module search path; path[0] is the script directory, else ''
  51. modules -- dictionary of loaded modules

  52. displayhook -- called to show results in an interactive session
  53. excepthook -- called to handle any uncaught exception other than SystemExit
  54.   To customize printing in an interactive session or to install a custom
  55.   top-level exception handler, assign other functions to replace these.

  56. exitfunc -- if sys.exitfunc exists, this routine is called when Python exits
  57.   Assigning to sys.exitfunc is deprecated; use the atexit module instead.

  58. stdin -- standard input file object; used by raw_input() and input()
  59. stdout -- standard output file object; used by the print statement
  60. stderr -- standard error object; used for error messages
  61.   By assigning other file objects (or objects that behave like files)
  62.   to these, it is possible to redirect all of the interpreter's I/O.

  63. last_type -- type of last uncaught exception
  64. last_value -- value of last uncaught exception
  65. last_traceback -- traceback of last uncaught exception
  66.   These three are only available in an interactive session after a
  67.   traceback has been printed.

  68. exc_type -- type of exception currently being handled
  69. exc_value -- value of exception currently being handled
  70. exc_traceback -- traceback of exception currently being handled
  71.   The function exc_info() should be used instead of these three,
  72.   because it is thread-safe.

  73. Static objects:

  74. float_info -- a dict with information about the float inplementation.
  75. long_info -- a struct sequence with information about the long implementation.
  76. maxint -- the largest supported integer (the smallest is -maxint-1)
  77. maxsize -- the largest supported length of containers.
  78. maxunicode -- the largest supported character
  79. builtin_module_names -- tuple of module names built into this interpreter
  80. version -- the version of this interpreter as a string
  81. version_info -- version information as a named tuple
  82. hexversion -- version information encoded as a single integer
  83. copyright -- copyright notice pertaining to this interpreter
  84. platform -- platform identifier
  85. executable -- absolute path of the executable binary of the Python interpreter
  86. prefix -- prefix used to find the Python library
  87. exec_prefix -- prefix used to find the machine-specific Python library
  88. float_repr_style -- string indicating the style of repr() output for floats
  89. __stdin__ -- the original stdin; don't
  90. __stdout__ -- the original stdout; don't touch!
  91. __stderr__ -- the original stderr; don't
  92. __displayhook__ -- the original displayhook; don't touch!
  93. __excepthook__ -- the original excepthook; don't

  94. Functions:

  95. displayhook() -- print an object to the screen, and save it in __builtin__._
  96. excepthook() -- print an exception and its traceback to sys.stderr
  97. exc_info() -- return thread-safe information about the current exception
  98. exc_clear() -- clear the exception state for the current thread
  99. exit() -- exit the interpreter by raising SystemExit
  100. getdlopenflags() -- returns flags to be used for dlopen() calls
  101. getprofile() -- get the global profiling function
  102. getrefcount() -- return the reference count for an object (plus one :-)
  103. getrecursionlimit() -- return the max recursion depth for the interpreter
  104. getsizeof() -- return the size of an object in bytes
  105. gettrace() -- get the global debug tracing function
  106. setcheckinterval() -- control how often the interpreter checks for events
  107. setdlopenflags() -- set the flags to be used for dlopen() calls
  108. setprofile() -- set the global profiling function
  109. setrecursionlimit() -- set the max recursion depth for the interpreter
  110. settrace() -- set the global debug tracing function

  111. getrefcount(object) -> integer

  112. Return the reference count of object. The count returned is generally
  113. one higher than you might expect, because it includes the (temporary)
  114. reference as an argument to getrefcount().
  115. int(x=0) -> int or long
  116. int(x, base=10) -> int or long

  117. Convert a number or string to an integer, or return 0 if no arguments
  118. are given. If x is floating point, the conversion truncates towards zero.
  119. If x is outside the integer range, the function returns a long instead.

  120. If x is not a number or if base is given, then x must be a string or
  121. Unicode object representing an integer literal in the given base. The
  122. literal can be preceded by '+' or '-' and be surrounded by whitespace.
  123. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to
  124. interpret the base from the string as an integer literal.
  125. >>> int('0b100', base=0)
  126. 4
  127. map(function, sequence[, sequence, ...]) -> list

  128. Return a list of the results of applying the function to the items of
  129. the argument sequence(s). If more than one sequence is given, the
  130. function is called with an argument list consisting of the corresponding
  131. item of each sequence, substituting None for missing values when not all
  132. sequences have the same length. If the function is None, return a list of
  133. the items of the sequence (or a list of tuples if more than one sequence).
  134. =============================
  135. Help on built-in function getrefcount in module sys:

  136. getrefcount(...)
  137.     getrefcount(object) -> integer
  138.     
  139.     Return the reference count of object. The count returned is generally
  140.     one higher than you might expect, because it includes the (temporary)
  141.     reference as an argument to getrefcount().

  142. Help on built-in module sys:

  143. NAME
  144.     sys

  145. FILE
  146.     (built-in)

  147. MODULE DOCS
  148.     http://docs.python.org/library/sys

  149. DESCRIPTION
  150.     This module provides access to some objects used or maintained by the
  151.     interpreter and to functions that interact strongly with the interpreter.
  152.     
  153.     Dynamic objects:
  154.     
  155.     argv -- command line arguments; argv[0] is the script pathname if known
  156.     path -- module search path; path[0] is the script directory, else ''
  157.     modules -- dictionary of loaded modules
  158.     
  159.     displayhook -- called to show results in an interactive session
  160.     excepthook -- called to handle any uncaught exception other than SystemExit
  161.       To customize printing in an interactive session or to install a custom
  162.       top-level exception handler, assign other functions to replace these.
  163.     
  164.     exitfunc -- if sys.exitfunc exists, this routine is called when Python exits
  165.       Assigning to sys.exitfunc is deprecated; use the atexit module instead.
  166.     
  167.     stdin -- standard input file object; used by raw_input() and input()
  168.     stdout -- standard output file object; used by the print statement
  169.     stderr -- standard error object; used for error messages
  170.       By assigning other file objects (or objects that behave like files)
  171.       to these, it is possible to redirect all of the interpreter's I/O.
  172.     
  173.     last_type -- type of last uncaught exception
  174.     last_value -- value of last uncaught exception
  175.     last_traceback -- traceback of last uncaught exception
  176.       These three are only available in an interactive session after a
  177.       traceback has been printed.
  178.     
  179.     exc_type -- type of exception currently being handled
  180.     exc_value -- value of exception currently being handled
  181.     exc_traceback -- traceback of exception currently being handled
  182.       The function exc_info() should be used instead of these three,
  183.       because it is thread-safe.
  184.     
  185.     Static objects:
  186.     
  187.     float_info -- a dict with information about the float inplementation.
  188.     long_info -- a struct sequence with information about the long implementation.
  189.     maxint -- the largest supported integer (the smallest is -maxint-1)
  190.     maxsize -- the largest supported length of containers.
  191.     maxunicode -- the largest supported character
  192.     builtin_module_names -- tuple of module names built into this interpreter
  193.     version -- the version of this interpreter as a string
  194.     version_info -- version information as a named tuple
  195.     hexversion -- version information encoded as a single integer
  196.     copyright -- copyright notice pertaining to this interpreter
  197.     platform -- platform identifier
  198.     executable -- absolute path of the executable binary of the Python interpreter
  199.     prefix -- prefix used to find the Python library
  200.     exec_prefix -- prefix used to find the machine-specific Python library
  201.     float_repr_style -- string indicating the style of repr() output for floats
  202.     __stdin__ -- the original stdin; don't
  203.     __stdout__ -- the original stdout; don't touch!
  204.     __stderr__ -- the original stderr; don't
  205.     __displayhook__ -- the original displayhook; don't touch!
  206.     __excepthook__ -- the original excepthook; don't
  207.     
  208.     Functions:
  209.     
  210.     displayhook() -- print an object to the screen, and save it in __builtin__._
  211.     excepthook() -- print an exception and its traceback to sys.stderr
  212.     exc_info() -- return thread-safe information about the current exception
  213.     exc_clear() -- clear the exception state for the current thread
  214.     exit() -- exit the interpreter by raising SystemExit
  215.     getdlopenflags() -- returns flags to be used for dlopen() calls
  216.     getprofile() -- get the global profiling function
  217.     getrefcount() -- return the reference count for an object (plus one :-)
  218.     getrecursionlimit() -- return the max recursion depth for the interpreter
  219.     getsizeof() -- return the size of an object in bytes
  220.     gettrace() -- get the global debug tracing function
  221.     setcheckinterval() -- control how often the interpreter checks for events
  222.     setdlopenflags() -- set the flags to be used for dlopen() calls
  223.     setprofile() -- set the global profiling function
  224.     setrecursionlimit() -- set the max recursion depth for the interpreter
  225.     settrace() -- set the global debug tracing function

  226. FUNCTIONS
  227.     __displayhook__ = displayhook(...)
  228.         displayhook(object) -> None
  229.         
  230.         Print an object to sys.stdout and also save it in __builtin__._
  231.     
  232.     __excepthook__ = excepthook(...)
  233.         excepthook(exctype, value, traceback) -> None
  234.         
  235.         Handle an exception by displaying it with a traceback on sys.stderr.
  236.     
  237.     call_tracing(...)
  238.         call_tracing(func, args) -> object
  239.         
  240.         Call func(*args), while tracing is enabled. The tracing state is
  241.         saved, and restored afterwards. This is intended to be called from
  242.         a debugger from a checkpoint, to recursively debug some other code.
  243.     
  244.     callstats(...)
  245.         callstats() -> tuple of integers
  246.         
  247.         Return a tuple of function call statistics, if CALL_PROFILE was defined
  248.         when Python was built. Otherwise, return None.
  249.         
  250.         When enabled, this function returns detailed, implementation-specific
  251.         details about the number of function calls executed. The return value is
  252.         a 11-tuple where the entries in the tuple are counts of:
  253.         0. all function calls
  254.         1. calls to PyFunction_Type objects
  255.         2. PyFunction calls that do not create an argument tuple
  256.         3. PyFunction calls that do not create an argument tuple
  257.            and bypass PyEval_EvalCodeEx()
  258.         4. PyMethod calls
  259.         5. PyMethod calls on bound methods
  260.         6. PyType calls
  261.         7. PyCFunction calls
  262.         8. generator calls
  263.         9. All other calls
  264.         10. Number of stack pops performed by call_function()
  265.     
  266.     displayhook(...)
  267.         displayhook(object) -> None
  268.         
  269.         Print an object to sys.stdout and also save it in __builtin__._
  270.     
  271.     exc_clear(...)
  272.         exc_clear() -> None
  273.         
  274.         Clear global information on the current exception. Subsequent calls to
  275.         exc_info() will return (None,None,None) until another exception is raised
  276.         in the current thread or the execution stack returns to a frame where
  277.         another exception is being handled.
  278.     
  279.     exc_info(...)
  280.         exc_info() -> (type, value, traceback)
  281.         
  282.         Return information about the most recent exception caught by an except
  283.         clause in the current stack frame or in an older stack frame.
  284.     
  285.     excepthook(...)
  286.         excepthook(exctype, value, traceback) -> None
  287.         
  288.         Handle an exception by displaying it with a traceback on sys.stderr.
  289.     
  290.     exit(...)
  291.         exit([status])
  292.         
  293.         Exit the interpreter by raising SystemExit(status).
  294.         If the status is omitted or None, it defaults to zero (i.e., success).
  295.         If the status is an integer, it will be used as the system exit status.
  296.         If it is another kind of object, it will be printed and the system
  297.         exit status will be one (i.e., failure).
  298.     
  299.     getcheckinterval(...)
  300.         getcheckinterval() -> current check interval; see setcheckinterval().
  301.     
  302.     getdefaultencoding(...)
  303.         getdefaultencoding() -> string
  304.         
  305.         Return the current default string encoding used by the Unicode
  306.         implementation.
  307.     
  308.     getdlopenflags(...)
  309.         getdlopenflags() -> int
  310.         
  311.         Return the current value of the flags that are used for dlopen calls.
  312.         The flag constants are defined in the ctypes and DLFCN modules.
  313.     
  314.     getfilesystemencoding(...)
  315.         getfilesystemencoding() -> string
  316.         
  317.         Return the encoding used to convert Unicode filenames in
  318.         operating system filenames.
  319.     
  320.     getprofile(...)
  321.         getprofile()
  322.         
  323.         Return the profiling function set with sys.setprofile.
  324.         See the profiler chapter in the library manual.
  325.     
  326.     getrecursionlimit(...)
  327.         getrecursionlimit()
  328.         
  329.         Return the current value of the recursion limit, the maximum depth
  330.         of the Python interpreter stack. This limit prevents infinite
  331.         recursion from causing an overflow of the C stack and crashing Python.
  332.     
  333.     getrefcount(...)
  334.         getrefcount(object) -> integer
  335.         
  336.         Return the reference count of object. The count returned is generally
  337.         one higher than you might expect, because it includes the (temporary)
  338.         reference as an argument to getrefcount().
  339.     
  340.     getsizeof(...)
  341.         getsizeof(object, default) -> int
  342.         
  343.         Return the size of object in bytes.
  344.     
  345.     gettrace(...)
  346.         gettrace()
  347.         
  348.         Return the global debug tracing function set with sys.settrace.
  349.         See the debugger chapter in the library manual.
  350.     
  351.     setcheckinterval(...)
  352.         setcheckinterval(n)
  353.         
  354.         Tell the Python interpreter to check for asynchronous events every
  355.         n instructions. This also affects how often thread switches occur.
  356.     
  357.     setdlopenflags(...)
  358.         setdlopenflags(n) -> None
  359.         
  360.         Set the flags used by the interpreter for dlopen calls, such as when the
  361.         interpreter loads extension modules. Among other things, this will enable
  362.         a lazy resolving of symbols when importing a module, if called as
  363.         sys.setdlopenflags(0). To share symbols across extension modules, call as
  364.         sys.setdlopenflags(ctypes.RTLD_GLOBAL). Symbolic names for the flag modules
  365.         can be either found in the ctypes module, or in the DLFCN module. If DLFCN
  366.         is not available, it can be generated from /usr/include/dlfcn.h using the
  367.         h2py script.
  368.     
  369.     setprofile(...)
  370.         setprofile(function)
  371.         
  372.         Set the profiling function. It will be called on each function call
  373.         and return. See the profiler chapter in the library manual.
  374.     
  375.     setrecursionlimit(...)
  376.         setrecursionlimit(n)
  377.         
  378.         Set the maximum depth of the Python interpreter stack to n. This
  379.         limit prevents infinite recursion from causing an overflow of the C
  380.         stack and crashing Python. The highest possible limit is platform-
  381.         dependent.
  382.     
  383.     settrace(...)
  384.         settrace(function)
  385.         
  386.         Set the global debug tracing function. It will be called on each
  387.         function call. See the debugger chapter in the library manual.

  388. DATA
  389.     __stderr__ = open file '', mode 'w'>
  390.     __stdin__ = open file '', mode 'r'>
  391.     __stdout__ = open file '', mode 'w'>
  392.     api_version = 1013
  393.     argv = ['/home/talen/PycharmProjects/untitled/t15.py']
  394.     builtin_module_names = ('__builtin__', '__main__', '_ast', '_codecs', ...
  395.     byteorder = 'little'
  396.     copyright = 'Copyright (c) 2001-2015 Python Software Foundati...ematis...
  397.     dont_write_bytecode = False
  398.     exc_value = TypeError("' (built-in)> is a built-in module"...
  399.     exec_prefix = '/usr'
  400.     executable = '/usr/bin/python2.7'
  401.     flags = sys.flags(debug=0, py3k_warning=0, division_warn...unicode=0, ...
  402.     float_info = sys.float_info(max=1.7976931348623157e+308, max_...epsilo...
  403.     float_repr_style = 'short'
  404.     hexversion = 34015984
  405.     long_info = sys.long_info(bits_per_digit=30, sizeof_digit=4)
  406.     maxint = 9223372036854775807
  407.     maxsize = 9223372036854775807
  408.     maxunicode = 1114111
  409.     meta_path = []
  410.     modules = {'UserDict': UserDict' from '/usr/lib64/python2.7/U...
  411.     path = ['/home/talen/PycharmProjects/untitled', '/home/talen/PycharmPr...
  412.     path_hooks = [.zipimporter'>]
  413.     path_importer_cache = {'/home/talen/PycharmProjects/untitled': None, '...
  414.     platform = 'linux2'
  415.     prefix = '/usr'
  416.     py3kwarning = False
  417.     pydebug = False
  418.     stderr = open file '', mode 'w'>
  419.     stdin = open file '', mode 'r'>
  420.     stdout = open file '', mode 'w'>
  421.     subversion = ('CPython', '', '')
  422.     version =


目录
相关文章
|
11月前
|
XML 数据格式 Python
从手动编辑到代码生成:Python 助你高效创建 Word 文档
本文介绍如何用Python实现Word文档自动化生成,结合python-docx、openpyxl和matplotlib库,高效完成报告撰写、数据插入与图表生成,大幅提升办公效率,降低格式错误,实现数据驱动的文档管理。
1409 2
|
11月前
|
存储 JavaScript Java
(Python基础)新时代语言!一起学习Python吧!(四):dict字典和set类型;切片类型、列表生成式;map和reduce迭代器;filter过滤函数、sorted排序函数;lambda函数
dict字典 Python内置了字典:dict的支持,dict全称dictionary,在其他语言中也称为map,使用键-值(key-value)存储,具有极快的查找速度。 我们可以通过声明JS对象一样的方式声明dict
592 2
|
11月前
|
存储 Java 数据处理
(numpy)Python做数据处理必备框架!(一):认识numpy;从概念层面开始学习ndarray数组:形状、数组转置、数值范围、矩阵...
Numpy是什么? numpy是Python中科学计算的基础包。 它是一个Python库,提供多维数组对象、各种派生对象(例如掩码数组和矩阵)以及用于对数组进行快速操作的各种方法,包括数学、逻辑、形状操作、排序、选择、I/0 、离散傅里叶变换、基本线性代数、基本统计运算、随机模拟等等。 Numpy能做什么? numpy的部分功能如下: ndarray,一个具有矢量算术运算和复杂广播能力的快速且节省空间的多维数组 用于对整组数据进行快速运算的标准数学函数(无需编写循环)。 用于读写磁盘数据的工具以及用于操作内存映射文件的工具。 线性代数、随机数生成以及傅里叶变换功能。 用于集成由C、C++
805 1
|
11月前
|
算法 Java Docker
(Python基础)新时代语言!一起学习Python吧!(三):IF条件判断和match匹配;Python中的循环:for...in、while循环;循环操作关键字;Python函数使用方法
IF 条件判断 使用if语句,对条件进行判断 true则执行代码块缩进语句 false则不执行代码块缩进语句,如果有else 或 elif 则进入相应的规则中执行
1751 1
|
安全 JavaScript 开发者
Python 自动化办公神器|一键转换所有文档为 PDF
本文介绍一个自动化批量将 Word、Excel、PPT、TXT、HTML 及图片转换为 PDF 的 Python 脚本。支持多格式识别、错误处理与日志记录,适用于文档归档、报告整理等场景,大幅提升办公效率。仅限 Windows 平台,需安装 Office 及相关依赖。
659 0
|
11月前
|
存储 Java 索引
(Python基础)新时代语言!一起学习Python吧!(二):字符编码由来;Python字符串、字符串格式化;list集合和tuple元组区别
字符编码 我们要清楚,计算机最开始的表达都是由二进制而来 我们要想通过二进制来表示我们熟知的字符看看以下的变化 例如: 1 的二进制编码为 0000 0001 我们通过A这个字符,让其在计算机内部存储(现如今,A 字符在地址通常表示为65) 现在拿A举例: 在计算机内部 A字符,它本身表示为 65这个数,在计算机底层会转为二进制码 也意味着A字符在底层表示为 1000001 通过这样的字符表示进行转换,逐步发展为拥有127个字符的编码存储到计算机中,这个编码表也被称为ASCII编码。 但随时代变迁,ASCII编码逐渐暴露短板,全球有上百种语言,光是ASCII编码并不能够满足需求
450 4
|
12月前
|
JavaScript Java 大数据
基于python的网络课程在线学习交流系统
本研究聚焦网络课程在线学习交流系统,从社会、技术、教育三方面探讨其发展背景与意义。系统借助Java、Spring Boot、MySQL、Vue等技术实现,融合云计算、大数据与人工智能,推动教育公平与教学模式创新,具有重要理论价值与实践意义。
|
JSON 数据安全/隐私保护 数据格式
拼多多批量下单软件,拼多多无限账号下单软件,python框架仅供学习参考
完整的拼多多自动化下单框架,包含登录、搜索商品、获取商品列表、下单等功能。
|
机器学习/深度学习 数据安全/隐私保护 计算机视觉
过三色刷脸技术,过三色刷脸技术教程,插件过人脸python分享学习
三色刷脸技术是基于RGB三通道分离的人脸特征提取方法,通过分析人脸在不同颜色通道的特征差异

推荐镜像

更多