I tried breaking out of a scene by raising an exception, but I was unable to catch it. Instead of being handled by the try/except clause I put around run(), it took me back to the interpreter and highlighted the line where the exception was raised.
Latest posts made by achorrath233
RE: Using Camera within the scene?
RE: A Simple HTTP Server
socket.gethostname() and socket.getfqdn() both return the name of the iPad, such as 'Johns-iPad'. This name is not going to be in DNS, which is why you're getting 'nodename ... not known'
The way to turn the name into something that can be looked up is to append '.local' as omz does in his script. This allows the name to be looked up via Bonjour/mdns.
If this isn't working for you, my first thought is to go to the Settings app and look up your IP address under the Wi-Fi section by tapping the arrow next to your current network.
Tip: Mixing Spaces with Tabs
I'm used to using spaces in my python code, and I'm not used to having a tab key in iOS, so I spent some time struggling with "Indent doesn't match" type errors.
Then I remembered that modern python does have some support for mixing spaces with tabs. I did some digging and found that you can set the tab width in a comment at the top of your code:
I now use this at the top of all my scripts and I no longer see indentation complaints when running them.