Python 2.3 on PSSE 30
asked 2012-05-06 23:37:16 -0500
Anonymous
The following is asked on behalf of @Fagundes I've migrated it from here: http://forum.whit.com.au/psse-help-forum/question/122/how-do-i-import-the-psspy-module-in-a-python?answer=262#post-id-262
Hi.
I'm using PSS/E version 30 and using python 2.3 to program it. Can I use a newer version of python? Is it compatible? I use the code written by JervisW. The code written by me is:
import os,sys
PSSE_LOCATION = r"D:\COMPONENTE_LOGICA\PSSE\PSSE30\PSSBIN"
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION
import psspy
print sys.path
Although python reports the following message:
Traceback (most recent call last):
File "D:\ISEL\TESE\zTestes_python\Testes\teste.py", line 8, in -toplevel-
import psspy
ImportError: DLL load failed: The specified module could not be found.
If I write the same code but without import pssy, python prints the following paths:
['D:\\ISEL\\TESE\\zTestes_python\\Testes',
'D:\\COMPON~1\\PYTHON_2.3\\Lib\\idlelib',
'C:\\Windows\\system32\\python23.zip',
'D:\\COMPON~1\\PYTHON_2.3',
'D:\\COMPONENTE_LOGICA\\PYTHON_2.3\\DLLs',
'D:\\COMPONENTE_LOGICA\\PYTHON_2.3\\lib',
'D:\\COMPONENTE_LOGICA\\PYTHON_2.3\\lib\\plat-win',
'D:\\COMPONENTE_LOGICA\\PYTHON_2.3\\lib\\lib-tk',
'D:\\COMPONENTE_LOGICA\\PYTHON_2.3',
'D:\\COMPONENTE_LOGICA\\PYTHON_2.3\\lib\\site-packages',
'D:\\COMPONENTE_LOGICA\\PSSE\\PSSE30\\PSSBIN']
So he add the path of PSS/E. Can someone tell me what problem might be? I check for a psspy.dll and it exits. But there is no more files with the name psspy.
I haven't got a copy of PSSE v 30 around to check this out. Does anyone else? Copying files from a later version of PSSE is unlikely to work because of the difference in Python version used.