Files

18 lines
1.1 KiB
HTML

<!doctype html><meta charset='utf-8'><style>
body{margin:0;background:#1e1e1e;font-family:Consolas,'DejaVu Sans Mono',monospace;color:#d4d4d4}
.bar{background:#333;color:#ccc;padding:8px 14px;font-size:14px}
pre{margin:0;padding:16px 18px;font-size:15px;line-height:1.45;white-space:pre-wrap}
.p{color:#6a9955}.c{color:#9cdcfe}
</style><div class='bar'>Terminal - lecture 4: __name__ and __main__</div><pre><span class="p">$</span> <span class="c">python -m flask_day_54.domain.name_demo</span>
Running as the main program: the file was executed directly
<span class="p">$</span> <span class="c">python -c &quot;import flask_day_54.domain.name_demo as m; print(m.describe_name(m.__name__))&quot;</span>
Running as an imported module named flask_day_54.domain.name_demo
<span class="p">$</span> <span class="c">python -m flask_day_54.presentation.hello</span>
* Serving Flask app &#x27;hello&#x27;
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
* Restarting with stat
* Debugger is active!
^C</pre>