2

I'm trying to pass a username and password input() variables from a master script to a different script. However, when the next script runs it asks me for the input() again rather than passing through the string value.

MasterScript.py

Username = input('Enter Username: ') 
Password = input('Enter Password: ') 

print('Running First Section')
import Firstsection

SectionOne.py

import cx_Oracle
from MasterScript import (Username, Password)

connection = cx_Oracle.connect(Username, Password, "myurl.co.uk:1234 /abcd1")

Once section one is called via the MasterScript.py it asks me for the username and password again, any ideas?

Thanks.

Ryan Davies
  • 446
  • 1
  • 4
  • 13

0 Answers0