Flask based simple web app : show random quote

Save a file named app.py as follow. This project will need mysql database and a table. Test it by running “flask run” on terminal on same folder with app.py. Prerequsite is pymysql and flask module (do pip install).

Python package manager

Ruby have its gem command to install package and python have pip. Since python 3.4, pip is included to default install.

On my linux mint pip command is pip3 and i try to list installed package with pip list command.

To install a package try : pip install <package name>

To search a package try : pip search <searched word>

 

Python compile to bytecode

To compile a python script to bytecode we can use py_compile module.

Above we try to compile tk_login_app.py and the bytecode available at __pycache__ folder. We can execute the bytecode as usual. This bytecode cant be used to hide your source code because one can “uncompile” it.

 

Tkinter Application with login form

Hooray this is my first python post !

Here i want to share a tkinter based application on python 3 with login form. If user is logging in by clicked a login button then login form will disappear and main form will show up. This code is not connected to database yet ! Only playing with 2 toplevel tk window placement and control its state.

Donwload py source code below.

tk_login_app