importing python custom library


Trying out custom library in python. I think the better way to write is basically to have different object into a specific file. For example, paymentMethod in a file instead of nested paymentMethod, payee, account into a single py file.

Let's say we are creating a custom library called payment and placed it under a folder called payment.

First we need to create a "payment" folder. Create a file called __init__.py.

a) __init__.py file

b) payment.py



c) then import it using the following code






Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm