Capture return data

View: New views
11 Messages — Rating Filter:   Alert me  

Capture return data

by jh-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Is there a method with maxq by which I can parse the html that comes back other than just the return value?
 
Thanks,
 
jh

Adding python libs

by jh-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I wanted to add some python url routines so I added the statement. I edited environment varialbes and have added C:\Python25\Lib to PYTHONPATH but get the no module message when the statement
 
import urllib
 
is executed.
 
Even tried copying the urllib file to my working directory, which is c:\maxq\bin\testScripts.
 
Any ideas?
 

Re: Adding python libs

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You need to use python.path in maxq.properties

On 08/05/2007, at 08:05, jh wrote:

I wanted to add some python url routines so I added the statement. I edited environment varialbes and have added C:\Python25\Lib to PYTHONPATH but get the no module message when the statement
 
import urllib
 
is executed.
 
Even tried copying the urllib file to my working directory, which is c:\maxq\bin\testScripts.
 
Any ideas?
 



Re: Capture return data

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You might be able to get by with Jython's string class and regular expressions, but they're not well suited to HTML.  You could use one of the many HTML parsing libraries written in Java, and you could probably also use the XML/HTML parsing from the Python standard libraries if it's in pure Python (which it probably is).


  Oliver

--
On 08/05/2007, at 06:58, jh wrote:

Is there a method with maxq by which I can parse the html that comes back other than just the return value?
 
Thanks,
 
jh



Re: Capture return data

by jh-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Turns out all I needed to do was:
data = self.getResponse()
----- Original Message -----
From: oliver@...
Sent: Friday, May 11, 2007 4:31 PM
Subject: Re: [maxq-users] Capture return data

You might be able to get by with Jython's string class and regular expressions, but they're not well suited to HTML.  You could use one of the many HTML parsing libraries written in Java, and you could probably also use the XML/HTML parsing from the Python standard libraries if it's in pure Python (which it probably is).


  Oliver

--
On 08/05/2007, at 06:58, jh wrote:

Is there a method with maxq by which I can parse the html that comes back other than just the return value?
 
Thanks,
 
jh



I/O

by jh-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Is there a way to allow user input when running maxq scripts?
 
It seems my prompts show up in the maxq window but responses have to be in the 'cmd' window.
 
Thanx,
 
jh

Re: I/O

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, this is a bug.  It should detect when it's running in the MaxQ GUI
and show a text input in that case.

It works fine if you run your scripts via the command line.


  Oliver

--
jh wrote:
> Is there a way to allow user input when running maxq scripts?
>  
> It seems my prompts show up in the maxq window but responses have to
> be in the 'cmd' window.
>  
> Thanx,
>  
> jh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


python.path

by jh-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
python.path was commented in in maxq\conf\maxq.properties.
The notes in the file say to separate multiple directories. I assume that since directories can have a : in the name such as c:\python22 the directories must be quoted. So I tried quoting them and separating them with semicolons with and without qoutes.
 
The paths I added were:
 
.
c:\python22
c:\maxq
 
After doing so I get the error message:
ImportError: no module named PyHttpTestCase
 
So tried adding c:\maxq\jython to no avail.
 
Suggestions please.
 
 
Thanks,
 
john

 

Re: python.path

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

python.path was commented in in maxq\conf\maxq.properties.
The notes in the file say to separate multiple directories. I assume that since directories can have a : in the name such as c:\python22 the directories must be quoted. So I tried quoting them and separating them with semicolons with and without qoutes.
 
The paths I added were:
 
.
c:\python22
c:\maxq
 
After doing so I get the error message:
ImportError: no module named PyHttpTestCase
 
So tried adding c:\maxq\jython to no avail.

I think there's a bug in the handling of paths: a colon is hardcoded as the path separator instead of using a semicolon when running on Windows.  I've committed a fix, but I cannot test it at the moment since I don't have Windows where I am.  If you can use the CVS version, can you please tell me if it helps?


   Oliver


P.S. You should be using semicolons to separate paths and not using quotes.


Re: python.path

by jh-14 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I have tortoiseSVN is it compatible with CVS? Not sure  how to go about downloading and running the CVS version, do I download everything?
 
 
----- Original Message -----
From: oliver@...
Sent: Friday, May 18, 2007 4:39 AM
Subject: Re: [maxq-users] python.path

python.path was commented in in maxq\conf\maxq.properties.
The notes in the file say to separate multiple directories. I assume that since directories can have a : in the name such as c:\python22 the directories must be quoted. So I tried quoting them and separating them with semicolons with and without qoutes.
 
The paths I added were:
 
.
c:\python22
c:\maxq
 
After doing so I get the error message:
ImportError: no module named PyHttpTestCase
 
So tried adding c:\maxq\jython to no avail.

I think there's a bug in the handling of paths: a colon is hardcoded as the path separator instead of using a semicolon when running on Windows.  I've committed a fix, but I cannot test it at the moment since I don't have Windows where I am.  If you can use the CVS version, can you please tell me if it helps?


   Oliver


P.S. You should be using semicolons to separate paths and not using quotes.


Re: python.path

by Oliver Bock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You will need to get a CVS client (e.g. Tortoise CVS or the command-line client).  There are instructions on getting the repository under "CVS" in the left-side navigation bar at maxq.tigris.org.


  Oliver

--
There are instructions on 
On 22/05/2007, at 23:55, jh wrote:

I have tortoiseSVN is it compatible with CVS? Not sure  how to go about downloading and running the CVS version, do I download everything?
 
 
----- Original Message -----
Sent: Friday, May 18, 2007 4:39 AM
Subject: Re: [maxq-users] python.path

python.path was commented in in maxq\conf\maxq.properties.
The notes in the file say to separate multiple directories. I assume that since directories can have a : in the name such as c:\python22 the directories must be quoted. So I tried quoting them and separating them with semicolons with and without qoutes.
 
The paths I added were:
 
.
c:\python22
c:\maxq
 
After doing so I get the error message:
ImportError: no module named PyHttpTestCase
 
So tried adding c:\maxq\jython to no avail.

I think there's a bug in the handling of paths: a colon is hardcoded as the path separator instead of using a semicolon when running on Windows.  I've committed a fix, but I cannot test it at the moment since I don't have Windows where I am.  If you can use the CVS version, can you please tell me if it helps?


   Oliver


P.S. You should be using semicolons to separate paths and not using quotes.