Python Forum

Full Version: For Xilinx EthernetLite LWIP:Need help in Python SOCKET Coding
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Now i am able to print the data in Hercules, instead i need to print the data in Python Shell. I don`t know anything about Python Socket eventhough i have tried but i am not able to do that. Please apologize me and help in Python coding part.

Thank you in advance

The below screenshot , results are printing in XSDk using Hercules. I need to Print the data in Python Shell instead Hercules.


Please refer this link. I have posted my files


Below code is working for Normal UART
import serial.tools.list_ports
list = serial.tools.list_ports.grep('VID:PID=10C4:EA60','hwid')
connected = []
for element in list:
connected.append(element.device)
a=str(connected)
try:
port = connected[0]
baud = 115200
ser = serial.Serial(port, baud, timeout=1)
#input1.encode('UTF-8')
if ser.isOpen():
print(ser.name + ' is open...')
while (1):
out1 = ser.read()
print out1,
ser.close()
except:
pass


But i need code for SOCKET Programming . Anyone Please Huh
Error message means,

Output from TCP Ethernet Files (C-code) is printing in Hercules only.

But i need to read the data into Python, without using Hercules. How ?
I have compiled below code only.