NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
| import sys | |
| sys.stdout = sys.stderr | |
| sys.path.insert(0,'/home/user/public/appname.example.com/public/appname') | |
| activate_this = '/home/user/public/appname.example.com/public/appname/appvirtualenv/bin/activate_this.py' | |
| execfile(activate_this, dict(__file__=activate_this)) | |
| from app import app as application |
| #!/usr/bin/env python | |
| # | |
| # Proof of Concept: UDP Hole Punching | |
| # Two client connect to a server and get redirected to each other. | |
| # | |
| # This is the client. | |
| # | |
| # Koen Bollen <meneer koenbollen nl> | |
| # 2010 GPL | |
| # |