Magnie wrote:
Solarbuddy wrote:
This is what my scripts look after I'm done:
http://troll.ws/mRoIWD
Is that right?No.
It's When I Receive "^follow_update"
Is anyone even on it?
Is it broken?
How can you tell who's on?
Where do you see the text that I write?
Offline
Solarbuddy wrote:
Magnie wrote:
Solarbuddy wrote:
This is what my scripts look after I'm done:
http://troll.ws/mRoIWD
Is that right?No.
It's When I Receive "^follow_update"Is anyone even on it?
Is it broken?
How can you tell who's on?
Where do you see the text that I write?
You aren't even connected. Did you run the ScratchMirror.exe?
1. I am, but no one else because only one person has successfully join the chat.
2. No it isn't
3. I can tell by the output on the server, no one else can see who is online.
4. I see it in the server and on the chat program.
Last edited by Magnie (2011-12-22 18:02:55)
Offline
I just tried connecting with the java one, and it either doesn't work on macs, or something is wrong.
Error:
java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at java.net.Socket.<init>(Socket.java:375) at java.net.Socket.<init>(Socket.java:189) at Mirror.main(Mirror.java:11)
Last edited by gbear605 (2011-12-22 18:08:08)
Offline
gbear605 wrote:
I just tried connecting with the java one, and it either doesn't work on macs, or something is wrong.
Hmm, what IP and port did you use?
Offline
Magnie wrote:
gbear605 wrote:
I just tried connecting with the java one, and it either doesn't work on macs, or something is wrong.
Hmm, what IP and port did you use?
That came up as soon as the program started. It didn't even say anything
Offline
gbear605 wrote:
Magnie wrote:
gbear605 wrote:
I just tried connecting with the java one, and it either doesn't work on macs, or something is wrong.
Hmm, what IP and port did you use?
That came up as soon as the program started. It didn't even say anything
I feel so stupid... Enable Remote Connections on Scratch first then try again.
Offline
Oh XD
Offline
gbear605 wrote:
Oh XD
Yeah, I had just realized.
It's broadcast "<var 1" not "var 1"
Offline
Tell me if you arre getting stuff.
Offline
gbear605 wrote:
Tell me if you arre getting stuff.
I am. You just aren't sending it correctly. It's "<var 1" to set a variable...
Offline
Magnie wrote:
gbear605 wrote:
Tell me if you arre getting stuff.
I am. You just aren't sending it correctly. It's "<var 1" to set a variable...
I don't completely understand that
I'm opening up scratch while running the server, enable remote connections, and then I use the broadcast block to broadcast "<var1" or whatever (without quotes)
Also, I know it isn't scratch, but someone should make a java client for it, and release the source code.
Last edited by gbear605 (2011-12-22 18:28:59)
Offline
gbear605 wrote:
Magnie wrote:
gbear605 wrote:
Tell me if you arre getting stuff.
I am. You just aren't sending it correctly. It's "<var 1" to set a variable...
I don't completely understand that
I'm opening up scratch while running the server, enable remote connections, and then I use the broadcast block to broadcast "<var1" or whatever (without quotes)
Did you read through the instructions?
broadcast "<var value1 value2 value3 etc"
Offline
I just tried saying something. Did it work?
Offline
Ok, now this time the run program actually stayed up and not crash.
Can you see my messages?
How do you receive messages?
that
Set a Variable: <[var] [value]
Get a Variable: >[var]
Follow a Variable: ^[var]
stuff?
I don't get how to do that stuff.
Offline
gbear605 wrote:
I just tried saying something. Did it work?
I got stuff from Solarbuddy, but nothing from you. What mirror are you using?
Solarbuddy: What client are you using?
Overlap wait time... Following 'chat' variable. Overlap wait time... Magnie has joined! Solarbuddy: Hello? Magnie: Hiya Solarbuddy: la la la Solarbuddy: lalala Solarbuddy: hello? Solarbuddy: Can you see this? Magnie: Hello? Magnie: Can you see this?
I can get your messages...
Offline
Magnie wrote:
gbear605 wrote:
I just tried saying something. Did it work?
I got stuff from Solarbuddy, but nothing from you. What mirror are you using?
Solarbuddy: What client are you using?Code:
Overlap wait time... Following 'chat' variable. Overlap wait time... Magnie has joined! Solarbuddy: Hello? Magnie: Hiya Solarbuddy: la la la Solarbuddy: lalala Solarbuddy: hello? Solarbuddy: Can you see this? Magnie: Hello? Magnie: Can you see this?I can get your messages...
I am using the java mirror, and I'm just using scratch as a client
Offline
gbear605 wrote:
I am using the java mirror, and I'm just using scratch as a client
The Java Mirror MathWhiz made doesn't send and receive at the same time, so it won't work with the chat project.
Offline
I see my own!!!! :DDDDDD Used <Var1
I sorta get it.
Offline
Magnie wrote:
gbear605 wrote:
I am using the java mirror, and I'm just using scratch as a client
The Java Mirror MathWhiz made doesn't send and receive at the same time, so it won't work with the chat project.
See, I need someone to compile the python mirror for mac, because my python compiler isn't working
Offline
gbear605 wrote:
Magnie wrote:
gbear605 wrote:
I am using the java mirror, and I'm just using scratch as a client
The Java Mirror MathWhiz made doesn't send and receive at the same time, so it won't work with the chat project.
See, I need someone to compile the python mirror for mac, because my python compiler isn't working
Just run the source code, Python is almost never compiled.
Offline
This is what I got when I tried to run it
>>> >>> # Version 1.5.0 File "<stdin>", line 1 >>> # Version 1.5.0 ^ SyntaxError: invalid syntax >>> ... # By: Magnie File "<stdin>", line 1 ... # By: Magnie ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> import socket # Network base File "<stdin>", line 1 >>> import socket # Network base ^ SyntaxError: invalid syntax >>> >>> import time # For delaying purposes mostly. File "<stdin>", line 1 >>> import time # For delaying purposes mostly. ^ SyntaxError: invalid syntax >>> >>> import threading # So it can send and receive at the same time anytime. File "<stdin>", line 1 >>> import threading # So it can send and receive at the same time anytime. ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # CHOST is the IP Scratch is running on, if you are running it # ... # on this computer, then the IP is 127.0.0.1 # ... # Theoretically you could run this Mirror on another computer. # ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # CPOST is the port Scratch is listening on, the default is # ... # 42001. Usually this is only change by a Scratcher who knows a # ... # about Squeak and networking with sockets. # ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... CHOST = '127.0.0.1' >>> CPORT = 42001 >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # SHOST is the IP the server is running on. # ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # SPORT is the port that the server is using. 42002 is the # ... # unofficial port for Scratch Servers. The host will need to make # ... # sure to port-for>>> ... >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 7 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CHOST is the IP Scratch is running on, if you are running it # File "<stdin>", line 1 ... # CHOST is the IP Scratch is running on, if you are running it # ^ SyntaxError: invalid syntax >>> ... # on this computer, then the IP is 127.0.0.1 # File "<stdin>", line 1 ... # on this computer, then the IP is 127.0.0.1 # ^ SyntaxError: invalid syntax >>> ... # Theoretically you could run this Mirror on another computer. # File "<stdin>", line 1 ... # Theoretically you could run this Mirror on another computer. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CPOST is the port Scratch is listening on, the default is # File "<stdin>", line 1 ... # CPOST is the port Scratch is listening on, the default is # ^ SyntaxError: invalid syntax >>> ... # 42001. Usually this is only change by a Scratcher who knows a # File "<stdin>", line 1 ... # 42001. Usually this is only change by a Scratcher who knows a # ^ SyntaxError: invalid syntax >>> ... # about Squeak and networking with sockets. # File "<stdin>", line 1 ... # about Squeak and networking with sockets. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... CHOST = '127.0.0.1' File "<stdin>", line 1 ... CHOST = '127.0.0.1' ^ SyntaxError: invalid syntax >>> >>> CPORT = 42001 File "<stdin>", line 1 >>> CPORT = 42001 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SHOST is the IP the server is running on. # File "<stdin>", line 1 ... # SHOST is the IP the server is running on. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SPORT is the port that the server is using. 42002 is the # File "<stdin>", line 1 ... # SPORT is the port that the server is using. 42002 is the # ^ SyntaxError: invalid syntax >>> ... # unofficial port for Scratch Servers. The host will need to make # File "<stdin>", line 1 ... # unofficial port for Scratch Servers. The host will need to make # ^ SyntaxError: invalid syntax >>> ... # sure to port-forward the port so people can connect from the # File "<stdin>", line 1 ... # sure to port-forward the port so people can connect from the # ^ SyntaxError: invalid syntax >>> ... # internet. # File "<stdin>", line 1 ... # internet. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... SHOST = raw_input("Server IP: ") File "<stdin>", line 1 ... SHOST = raw_input("Server IP: ") ^ SyntaxError: invalid syntax >>> Server IP: SPORT = int( raw_input("Server Port: ") ) File "<stdin>", line 1 Server IP: SPORT = int( raw_input("Server Port: ") ) ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # Some extra settings that are more for advanced users are below. # File "<stdin>", line 1 ... # Some extra settings that are more for advanced users are below. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> # Time between checking the threads for broken ones. File "<stdin>", line 1 >>> # Time between checking the threads for broken ones. ^ SyntaxError: invalid syntax >>> ... THREADCHECK = 5 File "<stdin>", line 1 ... THREADCHECK = 5 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. File "<stdin>", line 1 >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. ^ SyntaxError: invalid syntax >>> ... def __init__(self, CHOST, CPORT): File "<stdin>", line 1 ... def __init__(self, CHOST, CPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch...") File "<stdin>", line 1 ... print("Connecting to Scratch...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch File "<stdin>", line 1 ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch ^ SyntaxError: invalid syntax >>> ... print("Connected to Scratch!") File "<stdin>", line 1 ... print("Connected to Scratch!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Scratch messages." File "<stdin>", line 1 ... print "Listening for Scratch messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... server.sock.send(message) # Send the data to the server. File "<stdin>", line 1 ... server.sock.send(message) # Send the data to the server. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. File "<stdin>", line 1 >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. ^ SyntaxError: invalid syntax >>> ... def __init__(self, SHOST, SPORT): File "<stdin>", line 1 ... def __init__(self, SHOST, SPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch Server...") File "<stdin>", line 1 ... print("Connecting to Scratch Server...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. File "<stdin>", line 1 ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. ^ SyntaxError: invalid syntax >>> ... print("Connected to Server!") File "<stdin>", line 1 ... print("Connected to Server!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Server messages." File "<stdin>", line 1 ... print "Listening for Server messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from the Server. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from the Server. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... scratch.sock.send(message) # Sends messages to Scratch. File "<stdin>", line 1 ... scratch.sock.send(message) # Sends messages to Scratch. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> running = 1 File "<stdin>", line 1 >>> running = 1 ^ SyntaxError: invalid syntax >>> >>> server = Server(SHOST, SPORT) # Start up the class for Server File "<stdin>", line 1 >>> server = Server(SHOST, SPORT) # Start up the class for Server ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'SPORT' is not defined File "<stdin>", line 1 NameError: name 'SPORT' is not defined ^ SyntaxError: invalid syntax >>> >>> server.start() # This starts the 'run' function on the class as well. File "<stdin>", line 1 >>> server.start() # This starts the 'run' function on the class as well. ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch File "<stdin>", line 1 >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch ^ SyntaxError: invalid syntax >>> Connecting to Scratch... File "<stdin>", line 1 Connecting to Scratch... ^ SyntaxError: invalid syntax >>> Connected to Scratch! File "<stdin>", line 1 Connected to Scratch! ^ SyntaxError: invalid syntax >>> >>> scratch.start() # This starts the 'run' function. File "<stdin>", line 1 >>> scratch.start() # This starts the 'run' function. ^ SyntaxError: invalid syntax >>> Listening for Scratch messages. File "<stdin>", line 1 Listening for Scratch messages. ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> while running: File "<stdin>", line 1 >>> while running: ^ SyntaxError: invalid syntax >>> ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. File "<stdin>", line 1 ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. ^ SyntaxError: invalid syntax >>> ... if scratch.alive != 1: running = 0 File "<stdin>", line 1 ... if scratch.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... if server.alive != 1: running = 0 File "<stdin>", line 1 ... if server.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... if running == 0: File "<stdin>", line 1 ... if running == 0: ^ SyntaxError: invalid syntax >>> ... running = 0 File "<stdin>", line 1 ... running = 0 ^ SyntaxError: invalid syntax >>> ... server.disconnect() # Tell the server thread to disconnect File "<stdin>", line 1 ... server.disconnect() # Tell the server thread to disconnect ^ SyntaxError: invalid syntax >>> ... scratch.disconnect() # Tell the scratch thread to disconnect File "<stdin>", line 1 ... scratch.disconnect() # Tell the scratch thread to disconnect ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 4, in <module> File "<stdin>", line 1 File "<stdin>", line 4, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> server.join() # End the server thread. File "<stdin>", line 1 >>> server.join() # End the server thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> server.join() # End the server thread. File "<stdin>", line 1 server.join() # End the server thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 >>> scratch.join() # End the scratch thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 scratch.join() # End the scratch thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print 'Error Check: Yes.' File "<stdin>", line 1 >>> print 'Error Check: Yes.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> print 'Error Check: Yes.' File "<stdin>", line 1 print 'Error Check: Yes.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 >>> else: print 'Error Check: No errors.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 else: print 'Error Check: No errors.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print "Finished running." File "<stdin>", line 1 >>> print "Finished running." ^ SyntaxError: invalid syntax >>> Finished running. File "<stdin>", line 1 Finished running. ^ SyntaxError: invalid syntax >>> >>> # Scratch Mirror File "<stdin>", line 1 >>> # Scratch Mirror ^ SyntaxError: invalid syntax >>> ... # Version 1.5.0 File "<stdin>", line 1 ... # Version 1.5.0 ^ SyntaxError: invalid syntax >>> ... # By: Magnie File "<stdin>", line 1 ... # By: Magnie ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> import socket # Network base File "<stdin>", line 1 >>> import socket # Network base ^ SyntaxError: invalid syntax >>> >>> import time # For delaying purposes mostly. File "<stdin>", line 1 >>> import time # For delaying purposes mostly. ^ SyntaxError: invalid syntax >>> >>> import threading # So it can send and receive at the same time anytime. File "<stdin>", line 1 >>> import threading # So it can send and receive at the same time anytime. ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CHOST is the IP Scratch is running on, if you are running it # File "<stdin>", line 1 ... # CHOST is the IP Scratch is running on, if you are running it # ^ SyntaxError: invalid syntax >>> ... # on this computer, then the IP is 127.0.0.1 # File "<stdin>", line 1 ... # on this computer, then the IP is 127.0.0.1 # ^ SyntaxError: invalid syntax >>> ... # Theoretically you could run this Mirror on another computer. # File "<stdin>", line 1 ... # Theoretically you could run this Mirror on another computer. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CPOST is the port Scratch is listening on, the default is # File "<stdin>", line 1 ... # CPOST is the port Scratch is listening on, the default is # ^ SyntaxError: invalid syntax >>> ... # 42001. Usually this is only change by a Scratcher who knows a # File "<stdin>", line 1 ... # 42001. Usually this is only change by a Scratcher who knows a # ^ SyntaxError: invalid syntax >>> ... # about Squeak and networking with sockets. # File "<stdin>", line 1 ... # about Squeak and networking with sockets. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... CHOST = '127.0.0.1' File "<stdin>", line 1 ... CHOST = '127.0.0.1' ^ SyntaxError: invalid syntax >>> >>> CPORT = 42001 File "<stdin>", line 1 >>> CPORT = 42001 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SHOST is the IP the server is running on. # File "<stdin>", line 1 ... # SHOST is the IP the server is running on. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SPORT is the port that the server is using. 42002 is the # File "<stdin>", line 1 ... # SPORT is the port that the server is using. 42002 is the # ^ SyntaxError: invalid syntax >>> ... # unofficial port for Scratch Servers. The host will need to make # File "<stdin>", line 1 ... # unofficial port for Scratch Servers. The host will need to make # ^ SyntaxError: invalid syntax >>> ... # sure to port-forward the port so people can connect from the # File "<stdin>", line 1 ... # sure to port-forward the port so people can connect from the # ^ SyntaxError: invalid syntax >>> ... # internet. # File "<stdin>", line 1 ... # internet. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... SHOST = raw_input("Server IP: ") File "<stdin>", line 1 ... SHOST = raw_input("Server IP: ") ^ SyntaxError: invalid syntax >>> Server IP: SPORT = int( raw_input("Server Port: ") ) File "<stdin>", line 1 Server IP: SPORT = int( raw_input("Server Port: ") ) ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # Some extra settings that are more for advanced users are below. # File "<stdin>", line 1 ... # Some extra settings that are more for advanced users are below. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> # Time between checking the threads for broken ones. File "<stdin>", line 1 >>> # Time between checking the threads for broken ones. ^ SyntaxError: invalid syntax >>> ... THREADCHECK = 5 File "<stdin>", line 1 ... THREADCHECK = 5 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. File "<stdin>", line 1 >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. ^ SyntaxError: invalid syntax >>> ... def __init__(self, CHOST, CPORT): File "<stdin>", line 1 ... def __init__(self, CHOST, CPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch...") File "<stdin>", line 1 ... print("Connecting to Scratch...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch File "<stdin>", line 1 ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch ^ SyntaxError: invalid syntax >>> ... print("Connected to Scratch!") File "<stdin>", line 1 ... print("Connected to Scratch!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Scratch messages." File "<stdin>", line 1 ... print "Listening for Scratch messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... server.sock.send(message) # Send the data to the server. File "<stdin>", line 1 ... server.sock.send(message) # Send the data to the server. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. File "<stdin>", line 1 >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. ^ SyntaxError: invalid syntax >>> ... def __init__(self, SHOST, SPORT): File "<stdin>", line 1 ... def __init__(self, SHOST, SPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch Server...") File "<stdin>", line 1 ... print("Connecting to Scratch Server...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. File "<stdin>", line 1 ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. ^ SyntaxError: invalid syntax >>> ... print("Connected to Server!") File "<stdin>", line 1 ... print("Connected to Server!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Server messages." File "<stdin>", line 1 ... print "Listening for Server messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from the Server. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from the Server. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... scratch.sock.send(message) # Sends messages to Scratch. File "<stdin>", line 1 ... scratch.sock.send(message) # Sends messages to Scratch. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> running = 1 File "<stdin>", line 1 >>> running = 1 ^ SyntaxError: invalid syntax >>> >>> server = Server(SHOST, SPORT) # Start up the class for Server File "<stdin>", line 1 >>> server = Server(SHOST, SPORT) # Start up the class for Server ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'SPORT' is not defined File "<stdin>", line 1 NameError: name 'SPORT' is not defined ^ SyntaxError: invalid syntax >>> >>> server.start() # This starts the 'run' function on the class as well. File "<stdin>", line 1 >>> server.start() # This starts the 'run' function on the class as well. ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch File "<stdin>", line 1 >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch ^ SyntaxError: invalid syntax >>> Connecting to Scratch... File "<stdin>", line 1 Connecting to Scratch... ^ SyntaxError: invalid syntax >>> Connected to Scratch! File "<stdin>", line 1 Connected to Scratch! ^ SyntaxError: invalid syntax >>> >>> scratch.start() # This starts the 'run' function. File "<stdin>", line 1 >>> scratch.start() # This starts the 'run' function. ^ SyntaxError: invalid syntax >>> Listening for Scratch messages. File "<stdin>", line 1 Listening for Scratch messages. ^ SyntaxError: invalid syntax >>> >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> while running: File "<stdin>", line 1 >>> while running: ^ SyntaxError: invalid syntax >>> ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. File "<stdin>", line 1 ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. ^ SyntaxError: invalid syntax >>> ... if scratch.alive != 1: running = 0 File "<stdin>", line 1 ... if scratch.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... if server.alive != 1: running = 0 File "<stdin>", line 1 ... if server.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... if running == 0: File "<stdin>", line 1 ... if running == 0: ^ SyntaxError: invalid syntax >>> ... running = 0 File "<stdin>", line 1 ... running = 0 ^ SyntaxError: invalid syntax >>> ... server.disconnect() # Tell the server thread to disconnect File "<stdin>", line 1 ... server.disconnect() # Tell the server thread to disconnect ^ SyntaxError: invalid syntax >>> ... scratch.disconnect() # Tell the scratch thread to disconnect File "<stdin>", line 1 ... scratch.disconnect() # Tell the scratch thread to disconnect ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 4, in <module> File "<stdin>", line 1 File "<stdin>", line 4, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> server.join() # End the server thread. File "<stdin>", line 1 >>> server.join() # End the server thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> server.join() # End the server thread. File "<stdin>", line 1 server.join() # End the server thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 >>> scratch.join() # End the scratch thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 scratch.join() # End the scratch thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print 'Error Check: Yes.' File "<stdin>", line 1 >>> print 'Error Check: Yes.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> print 'Error Check: Yes.' File "<stdin>", line 1 print 'Error Check: Yes.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 >>> else: print 'Error Check: No errors.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 else: print 'Error Check: No errors.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print "Finished running." File "<stdin>", line 1 >>> print "Finished running." ^ SyntaxError: invalid syntax >>>
Offline
gbear605 wrote:
This is what I got when I tried to run it
Code:
>>> >>> # Version 1.5.0 File "<stdin>", line 1 >>> # Version 1.5.0 ^ SyntaxError: invalid syntax >>> ... # By: Magnie File "<stdin>", line 1 ... # By: Magnie ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> import socket # Network base File "<stdin>", line 1 >>> import socket # Network base ^ SyntaxError: invalid syntax >>> >>> import time # For delaying purposes mostly. File "<stdin>", line 1 >>> import time # For delaying purposes mostly. ^ SyntaxError: invalid syntax >>> >>> import threading # So it can send and receive at the same time anytime. File "<stdin>", line 1 >>> import threading # So it can send and receive at the same time anytime. ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # CHOST is the IP Scratch is running on, if you are running it # ... # on this computer, then the IP is 127.0.0.1 # ... # Theoretically you could run this Mirror on another computer. # ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # CPOST is the port Scratch is listening on, the default is # ... # 42001. Usually this is only change by a Scratcher who knows a # ... # about Squeak and networking with sockets. # ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... CHOST = '127.0.0.1' >>> CPORT = 42001 >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # SHOST is the IP the server is running on. # ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # SPORT is the port that the server is using. 42002 is the # ... # unofficial port for Scratch Servers. The host will need to make # ... # sure to port-for>>> ... >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 7 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CHOST is the IP Scratch is running on, if you are running it # File "<stdin>", line 1 ... # CHOST is the IP Scratch is running on, if you are running it # ^ SyntaxError: invalid syntax >>> ... # on this computer, then the IP is 127.0.0.1 # File "<stdin>", line 1 ... # on this computer, then the IP is 127.0.0.1 # ^ SyntaxError: invalid syntax >>> ... # Theoretically you could run this Mirror on another computer. # File "<stdin>", line 1 ... # Theoretically you could run this Mirror on another computer. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CPOST is the port Scratch is listening on, the default is # File "<stdin>", line 1 ... # CPOST is the port Scratch is listening on, the default is # ^ SyntaxError: invalid syntax >>> ... # 42001. Usually this is only change by a Scratcher who knows a # File "<stdin>", line 1 ... # 42001. Usually this is only change by a Scratcher who knows a # ^ SyntaxError: invalid syntax >>> ... # about Squeak and networking with sockets. # File "<stdin>", line 1 ... # about Squeak and networking with sockets. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... CHOST = '127.0.0.1' File "<stdin>", line 1 ... CHOST = '127.0.0.1' ^ SyntaxError: invalid syntax >>> >>> CPORT = 42001 File "<stdin>", line 1 >>> CPORT = 42001 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SHOST is the IP the server is running on. # File "<stdin>", line 1 ... # SHOST is the IP the server is running on. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SPORT is the port that the server is using. 42002 is the # File "<stdin>", line 1 ... # SPORT is the port that the server is using. 42002 is the # ^ SyntaxError: invalid syntax >>> ... # unofficial port for Scratch Servers. The host will need to make # File "<stdin>", line 1 ... # unofficial port for Scratch Servers. The host will need to make # ^ SyntaxError: invalid syntax >>> ... # sure to port-forward the port so people can connect from the # File "<stdin>", line 1 ... # sure to port-forward the port so people can connect from the # ^ SyntaxError: invalid syntax >>> ... # internet. # File "<stdin>", line 1 ... # internet. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... SHOST = raw_input("Server IP: ") File "<stdin>", line 1 ... SHOST = raw_input("Server IP: ") ^ SyntaxError: invalid syntax >>> Server IP: SPORT = int( raw_input("Server Port: ") ) File "<stdin>", line 1 Server IP: SPORT = int( raw_input("Server Port: ") ) ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # Some extra settings that are more for advanced users are below. # File "<stdin>", line 1 ... # Some extra settings that are more for advanced users are below. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> # Time between checking the threads for broken ones. File "<stdin>", line 1 >>> # Time between checking the threads for broken ones. ^ SyntaxError: invalid syntax >>> ... THREADCHECK = 5 File "<stdin>", line 1 ... THREADCHECK = 5 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. File "<stdin>", line 1 >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. ^ SyntaxError: invalid syntax >>> ... def __init__(self, CHOST, CPORT): File "<stdin>", line 1 ... def __init__(self, CHOST, CPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch...") File "<stdin>", line 1 ... print("Connecting to Scratch...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch File "<stdin>", line 1 ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch ^ SyntaxError: invalid syntax >>> ... print("Connected to Scratch!") File "<stdin>", line 1 ... print("Connected to Scratch!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Scratch messages." File "<stdin>", line 1 ... print "Listening for Scratch messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... server.sock.send(message) # Send the data to the server. File "<stdin>", line 1 ... server.sock.send(message) # Send the data to the server. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. File "<stdin>", line 1 >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. ^ SyntaxError: invalid syntax >>> ... def __init__(self, SHOST, SPORT): File "<stdin>", line 1 ... def __init__(self, SHOST, SPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch Server...") File "<stdin>", line 1 ... print("Connecting to Scratch Server...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. File "<stdin>", line 1 ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. ^ SyntaxError: invalid syntax >>> ... print("Connected to Server!") File "<stdin>", line 1 ... print("Connected to Server!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Server messages." File "<stdin>", line 1 ... print "Listening for Server messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from the Server. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from the Server. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... scratch.sock.send(message) # Sends messages to Scratch. File "<stdin>", line 1 ... scratch.sock.send(message) # Sends messages to Scratch. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> running = 1 File "<stdin>", line 1 >>> running = 1 ^ SyntaxError: invalid syntax >>> >>> server = Server(SHOST, SPORT) # Start up the class for Server File "<stdin>", line 1 >>> server = Server(SHOST, SPORT) # Start up the class for Server ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'SPORT' is not defined File "<stdin>", line 1 NameError: name 'SPORT' is not defined ^ SyntaxError: invalid syntax >>> >>> server.start() # This starts the 'run' function on the class as well. File "<stdin>", line 1 >>> server.start() # This starts the 'run' function on the class as well. ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch File "<stdin>", line 1 >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch ^ SyntaxError: invalid syntax >>> Connecting to Scratch... File "<stdin>", line 1 Connecting to Scratch... ^ SyntaxError: invalid syntax >>> Connected to Scratch! File "<stdin>", line 1 Connected to Scratch! ^ SyntaxError: invalid syntax >>> >>> scratch.start() # This starts the 'run' function. File "<stdin>", line 1 >>> scratch.start() # This starts the 'run' function. ^ SyntaxError: invalid syntax >>> Listening for Scratch messages. File "<stdin>", line 1 Listening for Scratch messages. ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> while running: File "<stdin>", line 1 >>> while running: ^ SyntaxError: invalid syntax >>> ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. File "<stdin>", line 1 ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. ^ SyntaxError: invalid syntax >>> ... if scratch.alive != 1: running = 0 File "<stdin>", line 1 ... if scratch.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... if server.alive != 1: running = 0 File "<stdin>", line 1 ... if server.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... if running == 0: File "<stdin>", line 1 ... if running == 0: ^ SyntaxError: invalid syntax >>> ... running = 0 File "<stdin>", line 1 ... running = 0 ^ SyntaxError: invalid syntax >>> ... server.disconnect() # Tell the server thread to disconnect File "<stdin>", line 1 ... server.disconnect() # Tell the server thread to disconnect ^ SyntaxError: invalid syntax >>> ... scratch.disconnect() # Tell the scratch thread to disconnect File "<stdin>", line 1 ... scratch.disconnect() # Tell the scratch thread to disconnect ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 4, in <module> File "<stdin>", line 1 File "<stdin>", line 4, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> server.join() # End the server thread. File "<stdin>", line 1 >>> server.join() # End the server thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> server.join() # End the server thread. File "<stdin>", line 1 server.join() # End the server thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 >>> scratch.join() # End the scratch thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 scratch.join() # End the scratch thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print 'Error Check: Yes.' File "<stdin>", line 1 >>> print 'Error Check: Yes.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> print 'Error Check: Yes.' File "<stdin>", line 1 print 'Error Check: Yes.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 >>> else: print 'Error Check: No errors.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 else: print 'Error Check: No errors.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print "Finished running." File "<stdin>", line 1 >>> print "Finished running." ^ SyntaxError: invalid syntax >>> Finished running. File "<stdin>", line 1 Finished running. ^ SyntaxError: invalid syntax >>> >>> # Scratch Mirror File "<stdin>", line 1 >>> # Scratch Mirror ^ SyntaxError: invalid syntax >>> ... # Version 1.5.0 File "<stdin>", line 1 ... # Version 1.5.0 ^ SyntaxError: invalid syntax >>> ... # By: Magnie File "<stdin>", line 1 ... # By: Magnie ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> import socket # Network base File "<stdin>", line 1 >>> import socket # Network base ^ SyntaxError: invalid syntax >>> >>> import time # For delaying purposes mostly. File "<stdin>", line 1 >>> import time # For delaying purposes mostly. ^ SyntaxError: invalid syntax >>> >>> import threading # So it can send and receive at the same time anytime. File "<stdin>", line 1 >>> import threading # So it can send and receive at the same time anytime. ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CHOST is the IP Scratch is running on, if you are running it # File "<stdin>", line 1 ... # CHOST is the IP Scratch is running on, if you are running it # ^ SyntaxError: invalid syntax >>> ... # on this computer, then the IP is 127.0.0.1 # File "<stdin>", line 1 ... # on this computer, then the IP is 127.0.0.1 # ^ SyntaxError: invalid syntax >>> ... # Theoretically you could run this Mirror on another computer. # File "<stdin>", line 1 ... # Theoretically you could run this Mirror on another computer. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CPOST is the port Scratch is listening on, the default is # File "<stdin>", line 1 ... # CPOST is the port Scratch is listening on, the default is # ^ SyntaxError: invalid syntax >>> ... # 42001. Usually this is only change by a Scratcher who knows a # File "<stdin>", line 1 ... # 42001. Usually this is only change by a Scratcher who knows a # ^ SyntaxError: invalid syntax >>> ... # about Squeak and networking with sockets. # File "<stdin>", line 1 ... # about Squeak and networking with sockets. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... CHOST = '127.0.0.1' File "<stdin>", line 1 ... CHOST = '127.0.0.1' ^ SyntaxError: invalid syntax >>> >>> CPORT = 42001 File "<stdin>", line 1 >>> CPORT = 42001 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SHOST is the IP the server is running on. # File "<stdin>", line 1 ... # SHOST is the IP the server is running on. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SPORT is the port that the server is using. 42002 is the # File "<stdin>", line 1 ... # SPORT is the port that the server is using. 42002 is the # ^ SyntaxError: invalid syntax >>> ... # unofficial port for Scratch Servers. The host will need to make # File "<stdin>", line 1 ... # unofficial port for Scratch Servers. The host will need to make # ^ SyntaxError: invalid syntax >>> ... # sure to port-forward the port so people can connect from the # File "<stdin>", line 1 ... # sure to port-forward the port so people can connect from the # ^ SyntaxError: invalid syntax >>> ... # internet. # File "<stdin>", line 1 ... # internet. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... SHOST = raw_input("Server IP: ") File "<stdin>", line 1 ... SHOST = raw_input("Server IP: ") ^ SyntaxError: invalid syntax >>> Server IP: SPORT = int( raw_input("Server Port: ") ) File "<stdin>", line 1 Server IP: SPORT = int( raw_input("Server Port: ") ) ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # Some extra settings that are more for advanced users are below. # File "<stdin>", line 1 ... # Some extra settings that are more for advanced users are below. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> # Time between checking the threads for broken ones. File "<stdin>", line 1 >>> # Time between checking the threads for broken ones. ^ SyntaxError: invalid syntax >>> ... THREADCHECK = 5 File "<stdin>", line 1 ... THREADCHECK = 5 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. File "<stdin>", line 1 >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. ^ SyntaxError: invalid syntax >>> ... def __init__(self, CHOST, CPORT): File "<stdin>", line 1 ... def __init__(self, CHOST, CPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch...") File "<stdin>", line 1 ... print("Connecting to Scratch...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch File "<stdin>", line 1 ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch ^ SyntaxError: invalid syntax >>> ... print("Connected to Scratch!") File "<stdin>", line 1 ... print("Connected to Scratch!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Scratch messages." File "<stdin>", line 1 ... print "Listening for Scratch messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... server.sock.send(message) # Send the data to the server. File "<stdin>", line 1 ... server.sock.send(message) # Send the data to the server. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. File "<stdin>", line 1 >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. ^ SyntaxError: invalid syntax >>> ... def __init__(self, SHOST, SPORT): File "<stdin>", line 1 ... def __init__(self, SHOST, SPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch Server...") File "<stdin>", line 1 ... print("Connecting to Scratch Server...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. File "<stdin>", line 1 ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. ^ SyntaxError: invalid syntax >>> ... print("Connected to Server!") File "<stdin>", line 1 ... print("Connected to Server!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Server messages." File "<stdin>", line 1 ... print "Listening for Server messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from the Server. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from the Server. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... scratch.sock.send(message) # Sends messages to Scratch. File "<stdin>", line 1 ... scratch.sock.send(message) # Sends messages to Scratch. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> running = 1 File "<stdin>", line 1 >>> running = 1 ^ SyntaxError: invalid syntax >>> >>> server = Server(SHOST, SPORT) # Start up the class for Server File "<stdin>", line 1 >>> server = Server(SHOST, SPORT) # Start up the class for Server ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'SPORT' is not defined File "<stdin>", line 1 NameError: name 'SPORT' is not defined ^ SyntaxError: invalid syntax >>> >>> server.start() # This starts the 'run' function on the class as well. File "<stdin>", line 1 >>> server.start() # This starts the 'run' function on the class as well. ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch File "<stdin>", line 1 >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch ^ SyntaxError: invalid syntax >>> Connecting to Scratch... File "<stdin>", line 1 Connecting to Scratch... ^ SyntaxError: invalid syntax >>> Connected to Scratch! File "<stdin>", line 1 Connected to Scratch! ^ SyntaxError: invalid syntax >>> >>> scratch.start() # This starts the 'run' function. File "<stdin>", line 1 >>> scratch.start() # This starts the 'run' function. ^ SyntaxError: invalid syntax >>> Listening for Scratch messages. File "<stdin>", line 1 Listening for Scratch messages. ^ SyntaxError: invalid syntax >>> >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> while running: File "<stdin>", line 1 >>> while running: ^ SyntaxError: invalid syntax >>> ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. File "<stdin>", line 1 ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. ^ SyntaxError: invalid syntax >>> ... if scratch.alive != 1: running = 0 File "<stdin>", line 1 ... if scratch.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... if server.alive != 1: running = 0 File "<stdin>", line 1 ... if server.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... if running == 0: File "<stdin>", line 1 ... if running == 0: ^ SyntaxError: invalid syntax >>> ... running = 0 File "<stdin>", line 1 ... running = 0 ^ SyntaxError: invalid syntax >>> ... server.disconnect() # Tell the server thread to disconnect File "<stdin>", line 1 ... server.disconnect() # Tell the server thread to disconnect ^ SyntaxError: invalid syntax >>> ... scratch.disconnect() # Tell the scratch thread to disconnect File "<stdin>", line 1 ... scratch.disconnect() # Tell the scratch thread to disconnect ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 4, in <module> File "<stdin>", line 1 File "<stdin>", line 4, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> server.join() # End the server thread. File "<stdin>", line 1 >>> server.join() # End the server thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> server.join() # End the server thread. File "<stdin>", line 1 server.join() # End the server thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 >>> scratch.join() # End the scratch thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 scratch.join() # End the scratch thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print 'Error Check: Yes.' File "<stdin>", line 1 >>> print 'Error Check: Yes.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> print 'Error Check: Yes.' File "<stdin>", line 1 print 'Error Check: Yes.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 >>> else: print 'Error Check: No errors.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 else: print 'Error Check: No errors.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print "Finished running." File "<stdin>", line 1 >>> print "Finished running." ^ SyntaxError: invalid syntax >>>
Click "File" > "New Window" paste the code into that, save it, then open up the window again and press F5.
Offline
Magnie wrote:
gbear605 wrote:
This is what I got when I tried to run it
Code:
>>> >>> # Version 1.5.0 File "<stdin>", line 1 >>> # Version 1.5.0 ^ SyntaxError: invalid syntax >>> ... # By: Magnie File "<stdin>", line 1 ... # By: Magnie ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> import socket # Network base File "<stdin>", line 1 >>> import socket # Network base ^ SyntaxError: invalid syntax >>> >>> import time # For delaying purposes mostly. File "<stdin>", line 1 >>> import time # For delaying purposes mostly. ^ SyntaxError: invalid syntax >>> >>> import threading # So it can send and receive at the same time anytime. File "<stdin>", line 1 >>> import threading # So it can send and receive at the same time anytime. ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # CHOST is the IP Scratch is running on, if you are running it # ... # on this computer, then the IP is 127.0.0.1 # ... # Theoretically you could run this Mirror on another computer. # ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # CPOST is the port Scratch is listening on, the default is # ... # 42001. Usually this is only change by a Scratcher who knows a # ... # about Squeak and networking with sockets. # ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... CHOST = '127.0.0.1' >>> CPORT = 42001 >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # SHOST is the IP the server is running on. # ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ... # SPORT is the port that the server is using. 42002 is the # ... # unofficial port for Scratch Servers. The host will need to make # ... # sure to port-for>>> ... >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 7 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CHOST is the IP Scratch is running on, if you are running it # File "<stdin>", line 1 ... # CHOST is the IP Scratch is running on, if you are running it # ^ SyntaxError: invalid syntax >>> ... # on this computer, then the IP is 127.0.0.1 # File "<stdin>", line 1 ... # on this computer, then the IP is 127.0.0.1 # ^ SyntaxError: invalid syntax >>> ... # Theoretically you could run this Mirror on another computer. # File "<stdin>", line 1 ... # Theoretically you could run this Mirror on another computer. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CPOST is the port Scratch is listening on, the default is # File "<stdin>", line 1 ... # CPOST is the port Scratch is listening on, the default is # ^ SyntaxError: invalid syntax >>> ... # 42001. Usually this is only change by a Scratcher who knows a # File "<stdin>", line 1 ... # 42001. Usually this is only change by a Scratcher who knows a # ^ SyntaxError: invalid syntax >>> ... # about Squeak and networking with sockets. # File "<stdin>", line 1 ... # about Squeak and networking with sockets. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... CHOST = '127.0.0.1' File "<stdin>", line 1 ... CHOST = '127.0.0.1' ^ SyntaxError: invalid syntax >>> >>> CPORT = 42001 File "<stdin>", line 1 >>> CPORT = 42001 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SHOST is the IP the server is running on. # File "<stdin>", line 1 ... # SHOST is the IP the server is running on. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SPORT is the port that the server is using. 42002 is the # File "<stdin>", line 1 ... # SPORT is the port that the server is using. 42002 is the # ^ SyntaxError: invalid syntax >>> ... # unofficial port for Scratch Servers. The host will need to make # File "<stdin>", line 1 ... # unofficial port for Scratch Servers. The host will need to make # ^ SyntaxError: invalid syntax >>> ... # sure to port-forward the port so people can connect from the # File "<stdin>", line 1 ... # sure to port-forward the port so people can connect from the # ^ SyntaxError: invalid syntax >>> ... # internet. # File "<stdin>", line 1 ... # internet. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... SHOST = raw_input("Server IP: ") File "<stdin>", line 1 ... SHOST = raw_input("Server IP: ") ^ SyntaxError: invalid syntax >>> Server IP: SPORT = int( raw_input("Server Port: ") ) File "<stdin>", line 1 Server IP: SPORT = int( raw_input("Server Port: ") ) ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # Some extra settings that are more for advanced users are below. # File "<stdin>", line 1 ... # Some extra settings that are more for advanced users are below. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> # Time between checking the threads for broken ones. File "<stdin>", line 1 >>> # Time between checking the threads for broken ones. ^ SyntaxError: invalid syntax >>> ... THREADCHECK = 5 File "<stdin>", line 1 ... THREADCHECK = 5 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. File "<stdin>", line 1 >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. ^ SyntaxError: invalid syntax >>> ... def __init__(self, CHOST, CPORT): File "<stdin>", line 1 ... def __init__(self, CHOST, CPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch...") File "<stdin>", line 1 ... print("Connecting to Scratch...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch File "<stdin>", line 1 ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch ^ SyntaxError: invalid syntax >>> ... print("Connected to Scratch!") File "<stdin>", line 1 ... print("Connected to Scratch!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Scratch messages." File "<stdin>", line 1 ... print "Listening for Scratch messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... server.sock.send(message) # Send the data to the server. File "<stdin>", line 1 ... server.sock.send(message) # Send the data to the server. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. File "<stdin>", line 1 >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. ^ SyntaxError: invalid syntax >>> ... def __init__(self, SHOST, SPORT): File "<stdin>", line 1 ... def __init__(self, SHOST, SPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch Server...") File "<stdin>", line 1 ... print("Connecting to Scratch Server...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. File "<stdin>", line 1 ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. ^ SyntaxError: invalid syntax >>> ... print("Connected to Server!") File "<stdin>", line 1 ... print("Connected to Server!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Server messages." File "<stdin>", line 1 ... print "Listening for Server messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from the Server. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from the Server. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... scratch.sock.send(message) # Sends messages to Scratch. File "<stdin>", line 1 ... scratch.sock.send(message) # Sends messages to Scratch. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> running = 1 File "<stdin>", line 1 >>> running = 1 ^ SyntaxError: invalid syntax >>> >>> server = Server(SHOST, SPORT) # Start up the class for Server File "<stdin>", line 1 >>> server = Server(SHOST, SPORT) # Start up the class for Server ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'SPORT' is not defined File "<stdin>", line 1 NameError: name 'SPORT' is not defined ^ SyntaxError: invalid syntax >>> >>> server.start() # This starts the 'run' function on the class as well. File "<stdin>", line 1 >>> server.start() # This starts the 'run' function on the class as well. ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch File "<stdin>", line 1 >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch ^ SyntaxError: invalid syntax >>> Connecting to Scratch... File "<stdin>", line 1 Connecting to Scratch... ^ SyntaxError: invalid syntax >>> Connected to Scratch! File "<stdin>", line 1 Connected to Scratch! ^ SyntaxError: invalid syntax >>> >>> scratch.start() # This starts the 'run' function. File "<stdin>", line 1 >>> scratch.start() # This starts the 'run' function. ^ SyntaxError: invalid syntax >>> Listening for Scratch messages. File "<stdin>", line 1 Listening for Scratch messages. ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> while running: File "<stdin>", line 1 >>> while running: ^ SyntaxError: invalid syntax >>> ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. File "<stdin>", line 1 ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. ^ SyntaxError: invalid syntax >>> ... if scratch.alive != 1: running = 0 File "<stdin>", line 1 ... if scratch.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... if server.alive != 1: running = 0 File "<stdin>", line 1 ... if server.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... if running == 0: File "<stdin>", line 1 ... if running == 0: ^ SyntaxError: invalid syntax >>> ... running = 0 File "<stdin>", line 1 ... running = 0 ^ SyntaxError: invalid syntax >>> ... server.disconnect() # Tell the server thread to disconnect File "<stdin>", line 1 ... server.disconnect() # Tell the server thread to disconnect ^ SyntaxError: invalid syntax >>> ... scratch.disconnect() # Tell the scratch thread to disconnect File "<stdin>", line 1 ... scratch.disconnect() # Tell the scratch thread to disconnect ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 4, in <module> File "<stdin>", line 1 File "<stdin>", line 4, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> server.join() # End the server thread. File "<stdin>", line 1 >>> server.join() # End the server thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> server.join() # End the server thread. File "<stdin>", line 1 server.join() # End the server thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 >>> scratch.join() # End the scratch thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 scratch.join() # End the scratch thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print 'Error Check: Yes.' File "<stdin>", line 1 >>> print 'Error Check: Yes.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> print 'Error Check: Yes.' File "<stdin>", line 1 print 'Error Check: Yes.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 >>> else: print 'Error Check: No errors.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 else: print 'Error Check: No errors.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print "Finished running." File "<stdin>", line 1 >>> print "Finished running." ^ SyntaxError: invalid syntax >>> Finished running. File "<stdin>", line 1 Finished running. ^ SyntaxError: invalid syntax >>> >>> # Scratch Mirror File "<stdin>", line 1 >>> # Scratch Mirror ^ SyntaxError: invalid syntax >>> ... # Version 1.5.0 File "<stdin>", line 1 ... # Version 1.5.0 ^ SyntaxError: invalid syntax >>> ... # By: Magnie File "<stdin>", line 1 ... # By: Magnie ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> import socket # Network base File "<stdin>", line 1 >>> import socket # Network base ^ SyntaxError: invalid syntax >>> >>> import time # For delaying purposes mostly. File "<stdin>", line 1 >>> import time # For delaying purposes mostly. ^ SyntaxError: invalid syntax >>> >>> import threading # So it can send and receive at the same time anytime. File "<stdin>", line 1 >>> import threading # So it can send and receive at the same time anytime. ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CHOST is the IP Scratch is running on, if you are running it # File "<stdin>", line 1 ... # CHOST is the IP Scratch is running on, if you are running it # ^ SyntaxError: invalid syntax >>> ... # on this computer, then the IP is 127.0.0.1 # File "<stdin>", line 1 ... # on this computer, then the IP is 127.0.0.1 # ^ SyntaxError: invalid syntax >>> ... # Theoretically you could run this Mirror on another computer. # File "<stdin>", line 1 ... # Theoretically you could run this Mirror on another computer. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # CPOST is the port Scratch is listening on, the default is # File "<stdin>", line 1 ... # CPOST is the port Scratch is listening on, the default is # ^ SyntaxError: invalid syntax >>> ... # 42001. Usually this is only change by a Scratcher who knows a # File "<stdin>", line 1 ... # 42001. Usually this is only change by a Scratcher who knows a # ^ SyntaxError: invalid syntax >>> ... # about Squeak and networking with sockets. # File "<stdin>", line 1 ... # about Squeak and networking with sockets. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... CHOST = '127.0.0.1' File "<stdin>", line 1 ... CHOST = '127.0.0.1' ^ SyntaxError: invalid syntax >>> >>> CPORT = 42001 File "<stdin>", line 1 >>> CPORT = 42001 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SHOST is the IP the server is running on. # File "<stdin>", line 1 ... # SHOST is the IP the server is running on. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # SPORT is the port that the server is using. 42002 is the # File "<stdin>", line 1 ... # SPORT is the port that the server is using. 42002 is the # ^ SyntaxError: invalid syntax >>> ... # unofficial port for Scratch Servers. The host will need to make # File "<stdin>", line 1 ... # unofficial port for Scratch Servers. The host will need to make # ^ SyntaxError: invalid syntax >>> ... # sure to port-forward the port so people can connect from the # File "<stdin>", line 1 ... # sure to port-forward the port so people can connect from the # ^ SyntaxError: invalid syntax >>> ... # internet. # File "<stdin>", line 1 ... # internet. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... SHOST = raw_input("Server IP: ") File "<stdin>", line 1 ... SHOST = raw_input("Server IP: ") ^ SyntaxError: invalid syntax >>> Server IP: SPORT = int( raw_input("Server Port: ") ) File "<stdin>", line 1 Server IP: SPORT = int( raw_input("Server Port: ") ) ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 >>> # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... # Some extra settings that are more for advanced users are below. # File "<stdin>", line 1 ... # Some extra settings that are more for advanced users are below. # ^ SyntaxError: invalid syntax >>> ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # File "<stdin>", line 1 ... # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> # Time between checking the threads for broken ones. File "<stdin>", line 1 >>> # Time between checking the threads for broken ones. ^ SyntaxError: invalid syntax >>> ... THREADCHECK = 5 File "<stdin>", line 1 ... THREADCHECK = 5 ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. File "<stdin>", line 1 >>> class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server. ^ SyntaxError: invalid syntax >>> ... def __init__(self, CHOST, CPORT): File "<stdin>", line 1 ... def __init__(self, CHOST, CPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch...") File "<stdin>", line 1 ... print("Connecting to Scratch...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch File "<stdin>", line 1 ... self.sock.connect((CHOST, CPORT)) # Connect to Scratch ^ SyntaxError: invalid syntax >>> ... print("Connected to Scratch!") File "<stdin>", line 1 ... print("Connected to Scratch!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Scratch messages." File "<stdin>", line 1 ... print "Listening for Scratch messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from Scratch. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... server.sock.send(message) # Send the data to the server. File "<stdin>", line 1 ... server.sock.send(message) # Send the data to the server. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. File "<stdin>", line 1 >>> class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch. ^ SyntaxError: invalid syntax >>> ... def __init__(self, SHOST, SPORT): File "<stdin>", line 1 ... def __init__(self, SHOST, SPORT): ^ SyntaxError: invalid syntax >>> ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. File "<stdin>", line 1 ... threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread. ^ SyntaxError: invalid syntax >>> ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) File "<stdin>", line 1 ... self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 ) ^ SyntaxError: invalid syntax >>> ... print("Connecting to Scratch Server...") File "<stdin>", line 1 ... print("Connecting to Scratch Server...") ^ SyntaxError: invalid syntax >>> ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. File "<stdin>", line 1 ... self.sock.connect((SHOST, SPORT)) # Connect to the Server. ^ SyntaxError: invalid syntax >>> ... print("Connected to Server!") File "<stdin>", line 1 ... print("Connected to Server!") ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... self.alive = 1 File "<stdin>", line 1 ... self.alive = 1 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def run(self): File "<stdin>", line 1 ... def run(self): ^ SyntaxError: invalid syntax >>> ... global running File "<stdin>", line 1 ... global running ^ SyntaxError: invalid syntax >>> ... print "Listening for Server messages." File "<stdin>", line 1 ... print "Listening for Server messages." ^ SyntaxError: invalid syntax >>> ... while running: File "<stdin>", line 1 ... while running: ^ SyntaxError: invalid syntax >>> ... try: File "<stdin>", line 1 ... try: ^ SyntaxError: invalid syntax >>> ... data = self.sock.recv(1024) # Listens for messages sent from the Server. File "<stdin>", line 1 ... data = self.sock.recv(1024) # Listens for messages sent from the Server. ^ SyntaxError: invalid syntax >>> ... self.send(data) File "<stdin>", line 1 ... self.send(data) ^ SyntaxError: invalid syntax >>> ... except: File "<stdin>", line 1 ... except: ^ SyntaxError: invalid syntax >>> ... self.alive = 0 File "<stdin>", line 1 ... self.alive = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def send(self, message): File "<stdin>", line 1 ... def send(self, message): ^ SyntaxError: invalid syntax >>> ... scratch.sock.send(message) # Sends messages to Scratch. File "<stdin>", line 1 ... scratch.sock.send(message) # Sends messages to Scratch. ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... def disconnect(self): File "<stdin>", line 1 ... def disconnect(self): ^ SyntaxError: invalid syntax >>> ... self.sock.close() File "<stdin>", line 1 ... self.sock.close() ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> running = 1 File "<stdin>", line 1 >>> running = 1 ^ SyntaxError: invalid syntax >>> >>> server = Server(SHOST, SPORT) # Start up the class for Server File "<stdin>", line 1 >>> server = Server(SHOST, SPORT) # Start up the class for Server ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'SPORT' is not defined File "<stdin>", line 1 NameError: name 'SPORT' is not defined ^ SyntaxError: invalid syntax >>> >>> server.start() # This starts the 'run' function on the class as well. File "<stdin>", line 1 >>> server.start() # This starts the 'run' function on the class as well. ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1, in <module> File "<stdin>", line 1 File "<stdin>", line 1, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch File "<stdin>", line 1 >>> scratch = Client(CHOST, CPORT) # Start up the class for Scratch ^ SyntaxError: invalid syntax >>> Connecting to Scratch... File "<stdin>", line 1 Connecting to Scratch... ^ SyntaxError: invalid syntax >>> Connected to Scratch! File "<stdin>", line 1 Connected to Scratch! ^ SyntaxError: invalid syntax >>> >>> scratch.start() # This starts the 'run' function. File "<stdin>", line 1 >>> scratch.start() # This starts the 'run' function. ^ SyntaxError: invalid syntax >>> Listening for Scratch messages. File "<stdin>", line 1 Listening for Scratch messages. ^ SyntaxError: invalid syntax >>> >>> >>> File "<stdin>", line 1 >>> ^ SyntaxError: invalid syntax >>> >>> while running: File "<stdin>", line 1 >>> while running: ^ SyntaxError: invalid syntax >>> ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. File "<stdin>", line 1 ... time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think. ^ SyntaxError: invalid syntax >>> ... if scratch.alive != 1: running = 0 File "<stdin>", line 1 ... if scratch.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... if server.alive != 1: running = 0 File "<stdin>", line 1 ... if server.alive != 1: running = 0 ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> ... if running == 0: File "<stdin>", line 1 ... if running == 0: ^ SyntaxError: invalid syntax >>> ... running = 0 File "<stdin>", line 1 ... running = 0 ^ SyntaxError: invalid syntax >>> ... server.disconnect() # Tell the server thread to disconnect File "<stdin>", line 1 ... server.disconnect() # Tell the server thread to disconnect ^ SyntaxError: invalid syntax >>> ... scratch.disconnect() # Tell the scratch thread to disconnect File "<stdin>", line 1 ... scratch.disconnect() # Tell the scratch thread to disconnect ^ SyntaxError: invalid syntax >>> ... File "<stdin>", line 1 ... ^ SyntaxError: invalid syntax >>> Traceback (most recent call last): File "<stdin>", line 1 Traceback (most recent call last): ^ SyntaxError: invalid syntax >>> File "<stdin>", line 4, in <module> File "<stdin>", line 1 File "<stdin>", line 4, in <module> ^ IndentationError: unexpected indent >>> NameError: name 'server' is not defined File "<stdin>", line 1 NameError: name 'server' is not defined ^ SyntaxError: invalid syntax >>> >>> server.join() # End the server thread. File "<stdin>", line 1 >>> server.join() # End the server thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> server.join() # End the server thread. File "<stdin>", line 1 server.join() # End the server thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 >>> scratch.join() # End the scratch thread. ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> scratch.join() # End the scratch thread. File "<stdin>", line 1 scratch.join() # End the scratch thread. ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print 'Error Check: Yes.' File "<stdin>", line 1 >>> print 'Error Check: Yes.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> print 'Error Check: Yes.' File "<stdin>", line 1 print 'Error Check: Yes.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 >>> else: print 'Error Check: No errors.' ^ SyntaxError: invalid syntax >>> File "<stdin>", line 1 File "<stdin>", line 1 File "<stdin>", line 1 ^ IndentationError: unexpected indent >>> else: print 'Error Check: No errors.' File "<stdin>", line 1 else: print 'Error Check: No errors.' ^ IndentationError: unexpected indent >>> ^ File "<stdin>", line 1 ^ ^ IndentationError: unexpected indent >>> IndentationError: unexpected indent File "<stdin>", line 1 IndentationError: unexpected indent ^ SyntaxError: invalid syntax >>> >>> print "Finished running." File "<stdin>", line 1 >>> print "Finished running." ^ SyntaxError: invalid syntax >>>Click "File" > "New Window" paste the code into that, save it, then open up the window again and press F5.
Works now!
Offline
BTW, you should make it so the mirror doesn't say that there are no errors, it should only says if there are errors XD
Offline
gbear605 wrote:
BTW, you should make it so the mirror doesn't say that there are no errors, it should only says if there are errors XD
Yeah, that was meant for debugging.
Offline