Hi
I am running a python script in the user mode that is supposed to
communicate to a client with a very simple udp protocol
When I run the script in a shell it works fine but when I load it as a
user component in lcnc I get this error. I have the feeling it has to do
with the fact that it is not run by python but by lcnc's own python
interpreter but I am not sure.
*Snippet of the script:*
data = " ".join(sys.argv[3:])
print ("data = ", data)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
while 1:
sock.sendto(data + "\n", (HOST, PORT))
received = sock.recv(1024)
*the error :*
Starting LinuxCNC...
('HOST = ', '192.168.1.200')
('PORT = ', '8888')
('nout= ', 6)
('data = ', '6')
Traceback (most recent call last):
File "/home/marius/bin/udps", line 88, in <module>
sock.sendto(data + "\n", (HOST, PORT))
TypeError: an integer is required
No matter how I change the data variable the error remains the same.
Any help will be appreciated.
--
Regards /Groete
Marius D. Liebenberg
+27 82 698 3251
+27 12 743 6064
QQ 1767394877
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers