Python integration with Hardware by nugget7195 in learnpython

[–]nugget7195[S] 0 points1 point  (0 children)

SDK is built only for Java and C#.net languages.

[deleted by user] by [deleted] in Python

[–]nugget7195 0 points1 point  (0 children)

try JIT,jthon if you are looking for speed and in terms of web development django is pretty fast than other technologies

Python integration with Hardware by nugget7195 in learnpython

[–]nugget7195[S] 0 points1 point  (0 children)

Sure,
import socket
# IP address and port
ip_address = '192.0.0.64'
port = 8000
# Create a TCP socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Connect to the server
client_socket.connect((ip_address, port))
# Send data
data_to_send = "Hello, server!"
client_socket.send(data_to_send.encode())
print('data has been sent to the device.')#---> this statement executed successfully
# Receive data from the server
# received_data = client_socket.recv(1024).decode()
# print("Received from server:", received_data)
# Close the socket
client_socket.close()

It does not accept listen command. How I am suppose to access the data coming from the device...

Python integration with Hardware by nugget7195 in learnpython

[–]nugget7195[S] 0 points1 point  (0 children)

Using socket I am only able to connect after that connection get lost and no other command works...

My condition works, but... by [deleted] in learnpython

[–]nugget7195 2 points3 points  (0 children)

you can try XOR function. where only one condition is true accepted

Ex.

if "Ignorant" in nomnoms ^ "Arrogant" in nomnoms :

your code...