Hi all I am brand new to python so if anyone could help that would be great. The trouble I have is that I am trying to call two other programs from within a parent program, and pass arguements to these children programs. Here is my code so far, but it seems incorrect so maybe you will spot a mistake. Many thanks for your time.

def init(p1):
    loc.p1 = str(p1)

def lab01(p1):
    call("2404")

def lab02(p1):
    call("test2")

Hi all I have found the answer. For those of you greener than myself with python the answer is below:

def init(p1):
    loc.p1 = str(p1)

def lab01():
   call("2404",loc.p1)

def lab02():
    call("test2",loc.p1)

The arguments are passed to each program.

hmm.. what module is this 'call' function from?

because it's not a builtin / keyword function

Usually it's from a class that has an overloaded __call_() in it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.