Python - dir - Imprimiendo todas las funciones en el módulo

##################################################### #Importar el módulo sys import sys print(sys.modules.keys()) # devuelve la lista horizontal de todos los módulos que se han importado. import sys print('\n'.join(sys.modules.keys())) # devuelve la lista vertical de todos los módulos que se han importado. ##################################################### import sys # Obtener una lista de los nombres de los módulos importados module_names = list(sys.modules.keys()) # Ordenar la lista alfabéticamente module_names_sorted = sorted(module_names) module_names2 = [cadena for cadena in module_names_sorted if cadena.isalnum()] # devuelve la lista de todos los módulos alfanuméricos que se han importado print('\n'.join(module_names2)) # devuelve la lista vertical de todos los módulos alfanuméricos que se han importado print(len(module_names2)) # devuelve la cantidad de módulos alfanuméricos que se han importado ##################################################### #Importar el módulo ggb import ggb #Imprimiendo todas las funciones en el módulo ggb usando dir print(dir(ggb)) """ ['Boolean', 'Circle', 'ClearConsole', 'Distance', 'Ellipse', 'Function', 'If', 'Intersect', 'Line', 'Number', 'Parabola', 'Point', 'Polygon', 'Rotate', 'Segment', 'Slider', 'Vector', '__doc__', '__name__', '__package__', 'interruptible_sleep', 'on_temperature_report'] ############ import ggb module_names = dir(ggb) # Ordenar la lista alfabéticamente module_names_sorted = sorted(module_names) module_names2 = [cadena for cadena in module_names_sorted if cadena.isalnum()] # devuelve la lista de todos los módulos alfanuméricos que se han importado print('\n'.join(module_names2)) # devuelve la lista vertical de todos los módulos alfanuméricos que se han importado print(len(module_names2)) # devuelve la cantidad de módulos alfanuméricos que se han importado ##################################################### #Importar el módulo time import time #Imprimiendo todas las funciones en el módulo time usando dir print(dir(time)) """ ['__doc__', '__name__', '__package__', 'accept2dyear', 'altzone', 'asctime', 'clock', 'ctime', 'daylight', 'gmtime', 'localtime', 'mktime', 'sleep', 'strftime', 'strptime', 'struct_time', 'time', 'timezone', 'tzname', 'tzset'] """ ##################################################### #Importar el módulo array import array #Imprimiendo todas las funciones en el módulo array usando dir print(dir(array)) """ ['__doc__', '__name__', '__package__', 'array'] """ ##################################################### #Importar el módulo collections import collections #Imprimiendo todas las funciones en el módulo collections usando dir print(dir(collections)) """ ['Counter', 'OrderedDict', '__all__', '__doc__', '__name__', '__package__', '_chain', '_iskeyword', '_itemgetter', '_repeat', '_starmap', 'defaultdict', 'deque', 'namedtuple'] """ ##################################################### #Importar el módulo keyword import keyword #Imprimiendo todas las funciones en el módulo keyword usando dir print(dir(keyword)) """ ['__all__', '__doc__', '__file__', '__name__', '__package__', 'iskeyword', 'kwlist'] """ ##################################################### #Importar el módulo itertools import itertools #Imprimiendo todas las funciones en el módulo itertools usando dir print(dir(itertools)) """ ['__doc__', '__name__', '__package__', '_grouper', 'accumulate', 'chain', 'combinations', 'combinations_with_replacement', 'compress', 'count', 'cycle', 'dropwhile', 'filterfalse', 'groupby', 'islice', 'permutations', 'product', 'repeat', 'starmap', 'takewhile', 'tee', 'zip_longest'] """ ##################################################### #Importar el módulo operator import operator #Imprimiendo todas las funciones en el módulo operator usando dir print(dir(operator)) """ ['__abs__', '__add__', '__all__', '__and__', '__concat__', '__contains__', '__delitem__', '__div__', '__doc__', '__eq__', '__floordiv__', '__ge__', '__getitem__', '__gt__', '__iadd__', '__iand__', '__iconcat__', '__ifloordiv__', '__ilshift__', '__imatmul__', '__imod__', '__imul__', '__index__', '__inv__', '__invert__', '__ior__', '__ipow__', '__irshift__', '__isub__', '__itruediv__', '__ixor__', '__le__', '__lshift__', '__lt__', '__matmul__', '__mod__', '__mul__', '__name__', '__ne__', '__neg__', '__not__', '__or__', '__package__', '__pos__', '__pow__', '__rshift__', '__setitem__', '__sub__', '__truediv__', '__xor__', '_abs', 'abs', 'add', 'and_', 'attrgetter', 'concat', 'contains', 'countOf', 'delitem', 'div', 'eq', 'floordiv', 'ge', 'getitem', 'gt', 'iadd', 'iand', 'iconcat', 'ifloordiv', 'ilshift', 'imatmul', 'imod', 'imul', 'index', 'indexOf', 'inv', 'invert', 'ior', 'ipow', 'irshift', 'is_', 'is_not', 'isub', 'itemgetter', 'itruediv', 'ixor', 'le', 'length_hint', 'lshift', 'lt', 'matmul', 'methodcaller', 'mod', 'mul', 'ne', 'neg', 'not_', 'or_', 'pos', 'pow', 'rshift', 'setitem', 'sub', 'truediv', 'truth', 'xor'] """ ##################################################### #Importar el módulo datetime import datetime #Imprimiendo todas las funciones en el módulo datetime usando dir print(dir(datetime)) """ ['MAXYEAR', 'MINYEAR', '_DAYNAMES', '_DAYS_BEFORE_MONTH', '_DAYS_IN_MONTH', '_DI100Y', '_DI400Y', '_DI4Y', '_MAX_DELTA_DAYS', '_MINYEARFMT', '_MONTHNAMES', '_SECONDS_PER_DAY', '_SENTINEL', '_US_PER_DAY', '_US_PER_HOUR', '_US_PER_MINUTE', '_US_PER_MS', '_US_PER_SECOND', '_US_PER_US', '_US_PER_WEEK', '__class__', '__doc__', '__file__', '__name__', '__package__', '_accum', '_build_struct_time', '_check_date_fields', '_check_int_field', '_check_time_fields', '_check_tzinfo_arg', '_check_tzname', '_check_utc_offset', '_cmp', '_cmperror', '_date_class', '_days_before_month', '_days_before_year', '_days_in_month', '_format_time', '_is_leap', '_isoweek1monday', '_math', '_normalize_date', '_normalize_datetime', '_normalize_pair', '_ord2ymd', '_round', '_time', '_time_class', '_tzinfo_class', '_wrap_strftime', '_ymd2ord', 'date', 'datetime', 'sys', 'time', 'timedelta', 'tzinfo', 'unicode'] """ ##################################################### #Importar el módulo math import math #Imprimiendo todas las funciones en el módulo math usando dir print(dir(math)) """ ['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'inf', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'log2', 'modf', 'nan', 'pi', 'pow', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'tau', 'trunc'] """ ##################################################### #Importar el módulo sys import sys #Imprimiendo todas las funciones en el módulo sys usando dir print(dir(sys)) """ ['__doc__', '__name__', '__package__', '__stdin__', '__stdout__', 'argv', 'copyright', 'debug', 'getExecutionLimit', 'getYieldLimit', 'maxint', 'maxsize', 'modules', 'path', 'resetTimeout', 'setExecutionLimit', 'setYieldLimit', 'stdin', 'stdout', 'version', 'version_info'] """ ##################################################### #Importar el módulo document import document #Imprimiendo todas las funciones en el módulo document usando dir print(dir(document)) """ ['Element', '__doc__', '__name__', '__package__', 'createElement', 'currentDiv', 'getElementById', 'getElementsByClassName', 'getElementsByName', 'getElementsByTagName'] """ ##################################################### #Importar el módulo image import image #Imprimiendo todas las funciones en el módulo image usando dir print(dir(image)) """ ['EmptyImage', 'Image', 'ImageWin', 'Pixel', '__doc__', '__name__', '__package__'] """ ##################################################### #Importar el módulo platform import platform #Imprimiendo todas las funciones en el módulo platform usando dir print(dir(platform)) """ ['__doc__', '__name__', '__package__', 'architecture', 'machine', 'node', 'processor', 'python_implementation', 'python_version', 'release', 'system', 'version'] """ ##################################################### #Importar el módulo processing import processing #Imprimiendo todas las funciones en el módulo processing usando dir print(dir(processing)) """ ['A', 'AB', 'ADD', 'AG', 'ALPHA', 'ALPHA_MASK', 'ALT', 'AMBIENT', 'AR', 'ARC', 'ARGB', 'ARROW', 'B', 'BACKSPACE', 'BASELINE', 'BEEN_LIT', 'BEVEL', 'BEZIER_VERTEX', 'BLEND', 'BLUE_MASK', 'BLUR', 'BOTTOM', 'BOX', 'BREAK', 'BURN', 'CAPSLK', 'CENTER', 'CLOSE', 'CLOSESHAPE', 'CMYK', 'CODED', 'CONTROL', 'CORNER', 'CORNERS', 'CROSS', 'CURVE_VERTEX', 'CUSTOM', 'DA', 'DARKEST', 'DB', 'DEG_TO_RAD', 'DELETE', 'DG', 'DIAMETER', 'DIFFERENCE', 'DILATE', 'DIRECTIONAL', 'DISABLE_ACCURATE_TEXTURES', 'DISABLE_DEPTH_SORT', 'DISABLE_DEPTH_TEST', 'DISABLE_OPENGL_2X_SMOOTH', 'DISABLE_OPENGL_ERROR_REPORT', 'DODGE', 'DOWN', 'DR', 'DXF', 'EB', 'EDGE', 'EG', 'ELLIPSE', 'ENABLE_ACCURATE_TEXTURES', 'ENABLE_DEPTH_SORT', 'ENABLE_DEPTH_TEST', 'ENABLE_NATIVE_FONTS', 'ENABLE_OPENGL_2X_SMOOTH', 'ENABLE_OPENGL_4X_SMOOTH', 'ENABLE_OPENGL_ERROR_REPORT', 'END', 'ENTER', 'EPSILON', 'ER', 'ERODE', 'ESC', 'EXCLUSION', 'Environment', 'F1', 'F10', 'F11', 'F12', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'G', 'GEOMETRY', 'GIF', 'GRAY', 'GREEN_MASK', 'GROUP', 'HALF_PI', 'HAND', 'HARD_LIGHT', 'HINT_COUNT', 'HOME', 'HSB', 'IMAGE', 'INSERT', 'INVERT', 'JAVA2D', 'JPEG', 'Keyboard', 'LEFT', 'LIGHTEST', 'LINE', 'LINES', 'LINUX', 'MAXOSX', 'MAX_FLOAT', 'MAX_INT', 'MAX_LIGHTS', 'META', 'MIN_FLOAT', 'MIN_INT', 'MITER', 'MODEL', 'MOVE', 'MULTIPLY', 'Mouse', 'NOCURSOR', 'NORMAL', 'NORMALIZED', 'NORMAL_MODE_AUTO', 'NORMAL_MODE_SHAPE', 'NORMAL_MODE_VERTEX', 'NUMLK', 'NX', 'NY', 'NZ', 'OPAQUE', 'OPEN', 'OPENGL', 'ORTHOGRAPHIC', 'OTHER', 'OVERLAY', 'P2D', 'P3D', 'PATH', 'PDF', 'PERSPECTIVE', 'PFont', 'PGDN', 'PGUP', 'PGraphics', 'PI', 'PImage', 'POINT', 'POINTS', 'POLYGON', 'POSTERIZE', 'PRECISIONB', 'PRECISIONF', 'PREC_ALPHA_SHIFT', 'PREC_MAXVAL', 'PREC_RED_SHIFT', 'PRIMITIVE', 'PROJECT', 'PShapeSVG', 'PVector', 'QUAD', 'QUADS', 'QUAD_STRIP', 'QUARTER_PI', 'R', 'RADIUS', 'RAD_TO_DEG', 'RECT', 'RED_MASK', 'REPLACE', 'RETURN', 'RGB', 'RIGHT', 'ROUND', 'SA', 'SB', 'SCREEN', 'SG', 'SHAPE', 'SHIFT', 'SHINE', 'SINCOS_LENGTH', 'SOFT_LIGHT', 'SPB', 'SPG', 'SPHERE', 'SPOT', 'SPR', 'SQUARE', 'SR', 'SUBTRACT', 'SW', 'Screen', 'TAB', 'TARGA', 'TAU', 'TEXT', 'THIRD_PI', 'THRESHOLD', 'TIFF', 'TOP', 'TRIANGLE', 'TRIANGLES', 'TRIANGLE_FAN', 'TRIANGLE_STRIP', 'TWO_PI', 'TX', 'TY', 'TZ', 'U', 'UP', 'V', 'VERTEX', 'VERTEX_FIELD_COUNT', 'VW', 'VX', 'VY', 'VZ', 'WAIT', 'WEBGL', 'WHITESPACE', 'WINDOWS', 'X', 'Y', 'Z', '__doc__', '__name__', '__package__', 'alpha', 'ambient', 'ambientLight', 'applyMatrix', 'arc', 'background', 'beginCamera', 'beginShape', 'bezier', 'bezierDetail', 'bezierPoint', 'bezierTangent', 'bezierVertex', 'blend', 'blendColor', 'blue', 'box', 'brightness', 'camera', 'color', 'colorMode', 'constrain', 'copy', 'createFont', 'createGraphics', 'createImage', 'cursor', 'curve', 'curveDetail', 'curvePoint', 'curveTangent', 'curveTightness', 'curveVertex', 'day', 'degrees', 'directionalLight', 'dist', 'ellipse', 'ellipseMode', 'emissive', 'endCamera', 'endShape', 'environment', 'exitp', 'fill', 'filter', 'frameRate', 'frustum', 'get', 'green', 'height', 'hint', 'hour', 'hue', 'image', 'imageMode', 'keyboard', 'lerp', 'lerpColor', 'lightFalloff', 'lightSpecular', 'lights', 'line', 'loadBytes', 'loadFont', 'loadImage', 'loadPixels', 'loadShape', 'loadStrings', 'loop', 'mag', 'map', 'millis', 'minute', 'modelX', 'modelY', 'modelZ', 'month', 'mouse', 'mouseX', 'mouseY', 'noCursor', 'noFill', 'noLights', 'noLoop', 'noSmooth', 'noStroke', 'noTint', 'noise', 'noiseDetail', 'noiseSeed', 'norm', 'normal', 'ortho', 'p', 'perspective', 'pmouseX', 'pmouseY', 'point', 'pointLight', 'popMatrix', 'printCamera', 'printMatrix', 'printProjection', 'println', 'processing', 'pushMatrix', 'quad', 'radians', 'random', 'randomSeed', 'rect', 'rectMode', 'red', 'renderMode', 'requestImage', 'resetMatrix', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'run', 'saturation', 'save', 'saveFrame', 'saveStrings', 'scale', 'screen', 'screenX', 'screenY', 'screenZ', 'second', 'set', 'shape', 'shapeMode', 'shininess', 'size', 'smooth', 'specular', 'sphere', 'sphereDetail', 'spotLight', 'sq', 'status', 'stroke', 'strokeCap', 'strokeJoin', 'strokeWeight', 'text', 'textAlign', 'textAscent', 'textDescent', 'textFont', 'textLeading', 'textMode', 'textSize', 'textWidth', 'texture', 'textureMode', 'tint', 'translate', 'triangle', 'updatePixels', 'vertex', 'width', 'year'] """ ##################################################### #Importar el módulo random import random #Imprimiendo todas las funciones en el módulo random usando dir print(dir(random)) """ ['__doc__', '__name__', '__package__', 'choice', 'expovariate', 'gauss', 'lognormvariate', 'normalvariate', 'randint', 'random', 'randrange', 'sample', 'seed', 'shuffle', 'triangular', 'uniform'] """ ##################################################### #Importar el módulo re import re #Imprimiendo todas las funciones en el módulo re usando dir print(dir(re)) """ ['I', 'IGNORECASE', 'M', 'MULTILINE', 'MatchObject', 'RegexObject', '__doc__', '__name__', '__package__', '_findre', 'compile', 'findall', 'match', 'purge', 'search', 'split'] """ ##################################################### #Importar el módulo signal import signal #Imprimiendo todas las funciones en el módulo signal usando dir print(dir(signal)) """ ['CTRL_BREAK_EVENT', 'CTRL_C_EVENT', 'NSIG', 'SIGABRT', 'SIGBREAK', 'SIGFPE', 'SIGHUP', 'SIGILL', 'SIGKILL', 'SIGNINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_IGN', '__doc__', '__name__', '__package__', 'pause', 'signal'] """ ##################################################### #Importar el módulo string import string #Imprimiendo todas las funciones en el módulo string usando dir print(dir(string)) """ ['__doc__', '__name__', '__package__', 'ascii_letters', 'ascii_lowercase', 'ascii_uppercase', 'capitalize', 'capwords', 'digits', 'hexdigits', 'join', 'letters', 'lowercase', 'octdigits', 'printable', 'punctuation', 'split', 'uppercase', 'whitespace'] """ ##################################################### #Importar el módulo token import token #Imprimiendo todas las funciones en el módulo token usando dir print(dir(token)) """ ['AMPER', 'AMPEREQUAL', 'ASYNC', 'AT', 'ATEQUAL', 'AWAIT', 'CIRCUMFLEX', 'CIRCUMFLEXEQUAL', 'COLON', 'COMMA', 'COMMENT', 'DEDENT', 'DOT', 'DOUBLESLASH', 'DOUBLESLASHEQUAL', 'DOUBLESTAR', 'DOUBLESTAREQUAL', 'ELLIPSIS', 'ENCODING', 'ENDMARKER', 'EQEQUAL', 'EQUAL', 'ERRORTOKEN', 'GREATER', 'GREATEREQUAL', 'INDENT', 'ISEOF', 'ISNONTERMINAL', 'ISTERMINAL', 'LBRACE', 'LEFTSHIFT', 'LEFTSHIFTEQUAL', 'LESS', 'LESSEQUAL', 'LPAR', 'LSQB', 'MINEQUAL', 'MINUS', 'NAME', 'NEWLINE', 'NL', 'NOTEQUAL', 'NT_OFFSET', 'NUMBER', 'N_TOKENS', 'OP', 'PERCENT', 'PERCENTEQUAL', 'PLUS', 'PLUSEQUAL', 'RARROW', 'RBRACE', 'RIGHTSHIFT', 'RIGHTSHIFTEQUAL', 'RPAR', 'RSQB', 'SEMI', 'SLASH', 'SLASHEQUAL', 'STAR', 'STAREQUAL', 'STRING', 'TILDE', 'VBAR', 'VBAREQUAL', '__doc__', '__file__', '__name__', '__package__', 'tok_name'] """ ##################################################### #Importar el módulo tokenize import tokenize #Imprimiendo todas las funciones en el módulo tokenize usando dir print(dir(tokenize)) """ ['__doc__', '__name__', '__package__', 'tokenize'] """ ##################################################### #Importar el módulo webbrowser import webbrowser #Imprimiendo todas las funciones en el módulo webbrowser usando dir print(dir(webbrowser)) """ ['DefaultBrowser', '__doc__', '__name__', '__package__', 'get', 'open', 'open_new', 'open_new_tab'] """ #Importar el módulo bisect import bisect #Imprimiendo todas las funciones en el módulo bisect usando dir print(dir(bisect)) ''' ['__doc__', '__file__', '__name__', '__package__', 'bisect', 'bisect_left', 'bisect_right', 'insort', 'insort_left', 'insort_right'] ''' #Importar el módulo copy import copy #Imprimiendo todas las funciones en el módulo copy usando dir print(dir(copy)) ''' ['Error', '_EmptyClass', '__doc__', '__file__', '__name__', '__package__', '_copy_inst', '_deepcopy_atomic', '_deepcopy_dict', '_deepcopy_dispatch', '_deepcopy_frozenset', '_deepcopy_inst', '_deepcopy_list', '_deepcopy_set', '_deepcopy_tuple', '_keep_alive', '_reconstruct', 'copy', 'deepcopy', 'error', 'long'] ''' #Importar el módulo numbers import numbers #Imprimiendo todas las funciones en el módulo numbers usando dir print(dir(numbers)) ''' ['Complex', 'Integral', 'Number', '__doc__', '__file__', '__name__', '__package__'] ''' #Importar el módulo textwrap import textwrap #Imprimiendo todas las funciones en el módulo textwrap usando dir print(dir(textwrap)) ''' ['TextWrapper', '__all__', '__doc__', '__file__', '__name__', '__package__', '_whitespace', 'dedent', 'fill', 'indent', 're', 'shorten', 'string', 'wrap'] ''' #Importar el módulo types import types #Imprimiendo todas las funciones en el módulo types usando dir print(dir(types)) ''' ['BooleanType', 'BufferType', 'BuiltinFunctionType', 'BuiltinMethodType', 'ClassMethodDescriptorType', 'ClassType', 'ComplexType', 'DictType', 'DictionaryType', 'FileType', 'FloatType', 'FunctionType', 'GeneratorType', 'InstanceType', 'IntType', 'LambdaType', 'ListType', 'MappingProxyType', 'MethodDescriptorType', 'MethodType', 'MethodWrapperType', 'ModuleType', 'NoneType', 'NotImplementedType', 'ObjectType', 'SliceType', 'StringType', 'StringTypes', 'TupleType', 'TypeType', 'UnboundMethodType', 'WrapperDescriptorType', '__all__', '__doc__', '__file__', '__name__', '__package__'] '''

Geogebra Python