Basic Modules Flashcards

1
Q

Importar libreria x

A

import x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Imprimir metodos y objetos de una libreria x

A

print(dir(x))

Dejar x vacia para metodos y objetos de python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Imprimir metodos y objetos de la clase x de la libreria y

A

print(dir(y.x))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Imprimir documentacion de libreria x

A

help(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Imprimir documentacion de un elemento x de una libreria y

A

help(y.x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Libreria para buscador web

A

webbrowser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Libreria para juego de la tortuga

A

turtle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Libreria para operaciones de tiempo

A

time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Importar funciones x y de una libreria z

A

from z import x, y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Importar todo de una libreria x

A

from x import *

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Llamar a una funcion x de una libreria importada y

A

y.x()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Llamar a una funcion importada x de una libreria

A

x()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Importar funcion x como y de una libreria z

A

from z import x as y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Ver documentacion de un elemento de una libreria en un IDE

A

Ctrl + Clic Izquierdo

en un IDE comun

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Libreria para fechas y horas

A

datetime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Libreria para zonas horarias

A

pytz

17
Q

Libreria para GUIs

A

tkinter

18
Q

Importar libreria x y si hay error de importacion, importar libreria y como x

A

try:
import x
except ImportError:
import y as x

19
Q

Libreria para operaciones con sistema operativo

A

os

20
Q

Libreria para obtener resultados aleatorios

A

random

21
Q

Libreria para operaciones matematicas

A

math

22
Q

Libreria para manejo de base de datos SQLite

A

sqlite3