The command line version has existed for some time, so I decided to make a Python script that can send broadcasts to any computer with Scratch Remote Sensor Connections enabled (that is of course on your network). I made a page on the Scratch Wiki on how to do it, so that it becomes more widespread than this forum thread that *knock on wood* probably will get like 2 views. Here is the tutorial: http://wiki.scratch.mit.edu/wiki/Commun … with_a_GUI
Offline
When I ran it, I got:
(location, beginning line stuff) python connect.py
connecting...
(I inserted the IP here)
connected
Traceback (most recent call last):
File "connect.py", line 21, in <module>
a.append(chr((n >> 24) & 0xFF))
NameError: name 'n' is not definedOffline
gbear605 wrote:
When I ran it, I got:
Code:
(location, beginning line stuff) python connect.py connecting... (I inserted the IP here) connected Traceback (most recent call last): File "connect.py", line 21, in <module> a.append(chr((n >> 24) & 0xFF)) NameError: name 'n' is not defined
What version of Python are you using? Cause n was clearly defined.
Offline
gbear605 wrote:
When I ran it, I got:
Code:
(location, beginning line stuff) python connect.py connecting... (I inserted the IP here) connected Traceback (most recent call last): File "connect.py", line 21, in <module> a.append(chr((n >> 24) & 0xFF)) NameError: name 'n' is not defined
As Magnie said, you should state the Python version. Also, what OS are you using? I have also noticed that you might be using a different version of the code, it should say connecting and connected after you enter the IP, at least for the GUI version.
Offline