First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
    |  1 |    initial version    |  
You can pass the reference to psspy between files in the function arguments. Lets say you're running one Python file, and you call a function from another file. In the second file, you'd have a function like:
def get_data_from_psse(psspy):
    # code here
    return data
 Then, in the main file that you're running, you can import psspy and just pass it to your function in the other file:
import psspy
import other_file
data = other_file.get_data_from_psse(psspy)
 I'm not sure that this is the best method, but it works for me.
 
                
                whit loves you.      Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.