python - How to run the flash policy socket server? -
I'm trying to create a simple chat app in the DNS, but when I try to run the following Python file, Failed to launch flash policy server (flash policy server) on port 9000 and port 843: [Error 13] Permission denied: ('0.0.0.0', 843 )
I'm getting the error above, because I need to use root permissions but when i su Do not use
, my local virtualized work
is not working, it takes root packages, but packages were not included in the root. I need to run my code with virtualenv
, I do not need to run the route How to solve this problem, here my run_example.py code,
#! / Usr / bin / env python pORT = 9000 Import OS os.environ ['DJANGO_SETTINGS_MODULE'] = 'Import settings' Django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler () Socket import socket EOVERVER if __name__ == '__main__': listen to port '% s' and port 843 (flash policy server) listen to'% port SocketIOServer (('', PORT), application, resource = "socket.io"). Service_forever ()
Comments
Post a Comment