i start we2py with:
python2.5 web2py.py -a <my admin password>
note that i have python2.5 on my path. i'm also running the source
distribution.
is that what you needed to get the python version for web2py?
cfh
On 5/31/12 16:23 , Janath wrote:
Thank you for the reply.****
I am on doing last method of your list.****
“just need to run web2py using the version of python that the PSSE lib
requires (i use web2py on python2.5****
This api needs it to be run in python 2.5 ( It doesn’t work for other
versions of python I have tested for 2.3) . If I can start web2py in python
2.5 which is already installed in my computer, then it will be fine (as I
use the same to run psse). Because I guess it checks the registry info for
the particular python version.****
** **
Also do you think I can try making the python version to 2.5 in web2 py,
but I don’t know how to do it.
On Thursday, May 31, 2012 10:14:30 AM UTC-5, howesc wrote:
i don't know anything about the PSSE system, but i'm confused. is there a
PSSE server that you communicate with over a socket to make the API calls?
the traditional API model is that there is a long running "server" process,
and the client (in this case the web2py server) connects to some socket and
invokes the API calls. is this what you are doing?
or is what you are doing using a PSSE python lib to connect to some PSSE
server? in this case you should be able to use the PSSE lib from within
web2py. perhaps you just need to run web2py using the version of python
that the PSSE lib requires (i use web2py on python2.5 all the time for
google app engine apps that i have not yet upgraded to python2.7, it's
still supported!)
hope that helps some!
On Tuesday, May 29, 2012 9:41:57 PM UTC-7, Janath wrote:
trying to be more specific :)
I am trying to see if I can start a python 2.5 shell (from within web2py)
and execute some commands to receive the results back to web2py.
is there any way of doing that, or should I drop that idea. If it sounds
not possible at this time with web2py, or if it takes some extensive time
consuming programming I am happy to drop that idea to seek for some other
way of getting the work done.
please advice.
On Friday, May 25, 2012 10:35:11 PM UTC-5, Janath wrote:
I am afraid I was unable capture the stack.
any clue as to how I can run a python process and keep communicating
with it during execution of web2py forms. If so I can send and receive the
commands and data to webpy.
Thank you,
Janath
On Wednesday, May 23, 2012 4:13:23 PM UTC-5, Derek wrote:
Then it is an unhandled exception. Which one? Run it in debug mode and
see if you can get the stack trace.
On Wednesday, May 23, 2012 10:50:41 AM UTC-7, Janath wrote:
when following runs at the initialisation, even the web2py server goes
down. the line in the bold face, tries to initialise psse and make trouble.
for me it seems, that psse needs the exact version (which is 2.5) to run
the api commands.
(I am not sure whether it checks the registry entry for particular
python version)
def index():
import os,sys
#import psspath
mymodule = local_import('pssepath')
sys.path.append('C:\\Program Files (x86)\\PTI\PSSE32\\PSSBIN')
import psspy
import win32gui
mymodule.add_pssepath()
try:
*ierr=psspy.psseinit(80000)*
if ierr:
print "can not initiate psse! quits"
#raise SystemExit(" can not load case")
except SystemExit:
pass
thank you,
Janath
On Wednesday, May 23, 2012 9:17:46 AM UTC-5, Massimo Di Pierro wrote:
Can you point us to some code?
On Tuesday, 22 May 2012 21:07:37 UTC-5, Janath wrote:
I have written python scripts to automate PSSE (Siemens power system
simulation tool) using the pythonAPI provided.
I can run them using the gui I have made for python 2.5.
Psse 32 needs the exact version of python (2.5) to run the API.
I am trying to convert my application to a web based application
using web2py. I am unable to use API statements from web2py.
I think, if I can run the python 2.5 and get the outputs to web2py,
I will be able to do that.
Can someone give me a hand to do that.... also, better workarounds
are welcome.
Thank you,