diff --git a/MQTT.py b/MQTT.py index b645e89..ef156a1 100644 --- a/MQTT.py +++ b/MQTT.py @@ -4,7 +4,7 @@ import time import paho.mqtt.client as mqtt -from tool import push_stream, close_stream, update, exec_sh, get_record, get_list_record, get_status +from src.tool import push_stream, close_stream, update, exec_sh, get_record, get_list_record, get_status def on_connect(client, userdata, flags, rc): @@ -69,8 +69,6 @@ def exec_shutdown(): pass -import os - if __name__ == '__main__': p = subprocess.Popen(['cat /home/pi/device_name'], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() diff --git a/__pycache__/tool.cpython-310.pyc b/__pycache__/tool.cpython-310.pyc deleted file mode 100644 index 721a189..0000000 Binary files a/__pycache__/tool.cpython-310.pyc and /dev/null differ diff --git a/api.py b/src/api.py similarity index 100% rename from api.py rename to src/api.py diff --git a/create_db.py b/src/create_db.py similarity index 100% rename from create_db.py rename to src/create_db.py diff --git a/data_upload.py b/src/data_upload.py similarity index 100% rename from data_upload.py rename to src/data_upload.py diff --git a/sensor_to_local.py b/src/sensor_to_local.py similarity index 100% rename from sensor_to_local.py rename to src/sensor_to_local.py diff --git a/sensor_to_server.py b/src/sensor_to_server.py similarity index 100% rename from sensor_to_server.py rename to src/sensor_to_server.py diff --git a/tool.py b/src/tool.py similarity index 100% rename from tool.py rename to src/tool.py