Apr-29-2020, 08:18 AM
PSA: Python noob trying to learn the whole module import, Class usage, and function creation stuff.
Error:Traceback (most recent call last):
File "waveshare.py", line 3, in <module>
cmd(AT)
NameError: name 'cmd' is not defined
=== Waveshare.py ===import SIM800 cmd(AT)=== SIM800/V25ter.py ===
import serial import time class V25ter(): def __init__(command): self.cmd = command def cmd(): print(command)=== SIM800/__init__.py ===
import V25ter"AT" is an example of a command that I want to send.