I want to run a this Python script:
import socket
def isConnected():
try:
# connect to the host -- tells us if the host is actually
# reachable
sock = socket.create_connection(("www.google.com", 80))
if sock is not None:
print('OK')
sock.close
return True
except OSError:
pass
return False
inside a brand new React Native app for testing purposes.
I'm working inside a team and somebody else is handling the real Python code for the project. They asked me whether I'll be able to run their Python scripts from within my React Native app and I wasn't sure if it was possible, so that's why I'm posting my question here.
Note: My React Native app is initialized with react-native cli and not expo.
Please provide a detailed answer as I'm a newbie when it comes to Python and any AWS features.