all: Replace all uses of umodule in Python code.

Applies to drivers/examples/extmod/port-modules/tools.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2022-08-19 22:58:37 +10:00
parent 9d7eac0713
commit 5fd042e7d1
29 changed files with 99 additions and 121 deletions

View File

@@ -1,7 +1,4 @@
try:
import usocket as socket
except:
import socket
import socket
def main(use_stream=False):

View File

@@ -1,17 +1,11 @@
try:
import usocket as _socket
except:
import _socket
try:
import ussl as ssl
except:
import ssl
import socket
import ssl
def main(use_stream=True):
s = _socket.socket()
s = socket.socket()
ai = _socket.getaddrinfo("google.com", 443)
ai = socket.getaddrinfo("google.com", 443)
print("Address infos:", ai)
addr = ai[0][-1]

View File

@@ -1,7 +1,4 @@
try:
import usocket as socket
except:
import socket
import socket
CONTENT = b"""\

View File

@@ -1,9 +1,6 @@
# Do not use this code in real projects! Read
# http_server_simplistic_commented.py for details.
try:
import usocket as socket
except:
import socket
import socket
CONTENT = b"""\

View File

@@ -8,10 +8,7 @@
# details, and use this code only for quick hacks, preferring
# http_server.py for "real thing".
#
try:
import usocket as socket
except:
import socket
import socket
CONTENT = b"""\

View File

@@ -1,10 +1,6 @@
import ubinascii as binascii
try:
import usocket as socket
except:
import socket
import ussl as ssl
import binascii
import socket
import ssl
# This self-signed key/cert pair is randomly generated and to be used for