Hi Jesse,

Thanks for getting back. In your code, I see there are example usage at the
top of your script. However, did you used these commands from inside an XML
job? Since I'm thinking of using them from XML job.

I'm thinking of implementing it as:

1. XML job sends messsages to Python Interpreter as REQUESTS(started
initially through a stafcmd with a python interface script as STDIN)

2. Python i.e theis script gets these messages and execute them if they are
the name of other python scripts to execute. Then, this scrript sends the
return status of this execution back to XML as RESPONSE in the form of QUEUE
message.

3. XML, *waiting* for the response here, gets the RESPONSE and depending on
the response it decides to send further other REQUESTS.

Any suggestions how can I make XML job wait for a RESPONSE to arrive?

Many thanks,
Rajat



On Fri, Jan 23, 2009 at 6:31 PM, Jesse Millan <j.l.a.mil...@gmail.com>wrote:

> Rajat,
>
> I did implement what Charles Rankin suggested, i.e. leverage the
> Queue, which is associated with each STAF handle. The Jython/Python
> script periodically check it's STAF queue to see if there are any
> "commands" on it - if so it executes them and sends back the result to
> whomever placed the command on its queue. See attached proof of
> concept.
>
> -Jesse
>
>
> On Fri, Jan 23, 2009 at 1:31 AM,  <dudeja.ra...@gmail.com> wrote:
> > Dear Jesse,
> >
> > I saw one of your post on STAF User mailing list where you cracked a very
> > interesting problem "Connect  to a remote interpreter".
> >
> > I'm facing the same problem so thought of writing to you. I'ld appreciate
> if
> > you can share the solution.
> >
> > I've this requirement that at the start of my XML job I want to start a
> > Python interpreter and keep it for the course of this test case and
> during
> > this  time I want to run several python scripts on this interpreter. I've
> > the requirement to run this both locally and remotely.
> >
> > Appreciate your help in this matter.
> >
> >
> > Cheers,
> > Rajat
>



-- 
Regrads,
Rajat
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to