October 8th, 2003, 09:03 AM
functions with functions
I am new at this....
I have this plagarised/hacked script for the grinder:
from net.grinder.script import Test
from net.grinder.plugin.http import HTTPRequest
from HTTPClient import NVPair
log = grinder.logger.output
number = random.randrange(1, 2000, 1)
# We declare a default URL for the HTTPRequest.
request = HTTPRequest(url = "http://host")
page1Test = Test(1, "First page").wrap(page1)
how do I get the output of the function foo() to form part of the definition of the function page1()
October 8th, 2003, 09:39 AM
you should place your code within [ CODE ] and [/ CODE ] tags (without the spaces) because it's good practice; if you had more complicated code it'd be a lot harder to tell where a function definition ends, the way you have it posted (tabs and spaces are stripped)
plagarism isn't a good thing... and it's got nothing to do with hacking
if you call foo() from page1()... that should give you the return value, you might want to store that into a variable and call it a day.
October 8th, 2003, 07:50 PM
I agree with CV, plagarism definalty into somthing.. you should be admitting to .
page1Test isnt a valid function, loose the parentasis at the end or this jut isn't gonna work