C:\users\ceshi>python
Python 2.7.12 (v2.7.12:d33e0cf91556, June, 15:24:40) [MSC v.1500-bit (AMD64)] on Win32
Type "Help", "copyright", "credits" or "license" for more information.
>>> Import Copy
>>> dir (copy)
[' Error ', ' pystringmap ', ' _emptyclass ', ' __all__ ', ' __builtins__ ', ' __doc__ ', ' __file__ ', ' __name__ ', ' __package__ ', ' _ Copy_dispatch ', ' _copy_immutable ', ' _copy_inst ',
' _copy_with_constructor ', ' _copy_with_copy_method ', ' _deepcopy_atomic ', ' _deepcopy_dict ', ' _deepcopy_dispatch ', ' _ Deepcopy_inst ', ' _deepcopy_list ', ' _deepcopy_method ',
' _deepcopy_tuple ', ' _keep_alive ', ' _reconstruct ', ' _test ', ' Copy ', ' deepcopy ', ' dispatch_table ', ' Error ', ' name ', ' t ', ' Weakref ']
>>> [n for N in dir (copy) if not N.startswith (' __ ')]
[' Error ', ' pystringmap ', ' _emptyclass ', ' _copy_dispatch ', ' _copy_immutable ', ' _copy_inst ', ' _copy_with_constructor ', ' _copy_with_copy_method ', ' _deepcopy_atomic ',
' _deepcopy_dict ', ' _deepcopy_dispatch ', ' _deepcopy_inst ', ' _deepcopy_list ', ' _deepcopy_method ', ' _deepcopy_tuple ', ' _keep_alive ', ' _reconstruct ', ' _test ', ' Copy ', ' Deepcopy ',
' Dispatch_table ', ' Error ', ' name ', ' t ', ' weakref '
>>> copy.__all__
[' Error ', ' Copy ', ' Deepcopy ']
#用help获取帮助
>>> Help (Copy.copy)
Help on function copy in module copy:
Copy (x)
Shallow copy operation on arbitrary Python objects.
See the module ' s __doc__ string for more info.
#快速查看函数的参数
>>> Print range.__doc__
Range (stop), List of integers
Range (start, stop[, Step), List of integers
Return a list containing an arithmetic progression of integers.
Range (I, j) returns [I, I+1, i+2, ..., j-1]; Start (!) defaults to 0.
When step is given, it specifies the increment (or decrement).
For example, range (4) returns [0, 1, 2, 3]. The end point is omitted!
These is exactly the valid indices for a list of 4 elements.
#查看源码位置, find the corresponding. py file open to view
>>> Print copy.__file__
D:\Python27\lib\copy.pyc
Help with Python in the interactive