python – How to manipulate the text file

In Python 3.x I would like to know how to identify the "=" character in the text and copy only what is written up to n. This content is in a file .txt.

public catalog =

= Public scheme

Database = 0007_banco

port = 5455

After reading, save the result for example "0007_banco" in a variable.