I have a problem when I want to execute as parameters or variables the data I extract from a txt file. For example:
conexion = kinterbasdb.connect(dsn=str(dir),user=str(user), password=str(password))
global variable1
variable1 = 'C:/carpeta/etc/'
Y dir
is a variable where I store the data extracted from a txt:
dir_tb= variable1
archivo = open('texto.txt','w')
archivo.write(dir_tb+"\n")
archivo = open('texto.txt','r')
dir = archivo.readline()
But if I replace the dir
parameter with the global variable it works fine.