from unnaturalcode.http import unnaturalhttp
from flask import Flask

app = Flask(__name__)
app.register_blueprint(unnaturalhttp)
app.run(host='0.0.0.0')


try:
    from unnaturalcode.http import unnaturalhttp
except ImportError:
    import sys, os
    # Oiugh. 
    sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
    from unnaturalcode.http import unnaturalhttp

from flask import Flask

app = Flask(__name__)
app.register_blueprint(unnaturalhttp)
app.run(host='0.0.0.0')

Fix to allow invocation by `python unnaturalcode/http`
Fix to allow invocation by `python unnaturalcode/http`

+ 
+ try:
- from unnaturalcode.http import unnaturalhttp
+     from unnaturalcode.http import unnaturalhttp
+ except ImportError:
+     import sys, os
+     # Oiugh. 
+     sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
+     from unnaturalcode.http import unnaturalhttp
+ 
  from flask import Flask
  
  app = Flask(__name__)
  app.register_blueprint(unnaturalhttp)
  app.run(host='0.0.0.0')
  
Fix to allow invocation by `python unnaturalcode/http`
## Code Before:
from unnaturalcode.http import unnaturalhttp
from flask import Flask

app = Flask(__name__)
app.register_blueprint(unnaturalhttp)
app.run(host='0.0.0.0')

## Instruction:
Fix to allow invocation by `python unnaturalcode/http`
## Code After:

try:
    from unnaturalcode.http import unnaturalhttp
except ImportError:
    import sys, os
    # Oiugh. 
    sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
    from unnaturalcode.http import unnaturalhttp

from flask import Flask

app = Flask(__name__)
app.register_blueprint(unnaturalhttp)
app.run(host='0.0.0.0')
