a wrapper to invoke functions using argument

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • les_ander@yahoo.com

    #1

    a wrapper to invoke functions using argument

    Hi,
    support I have a library of function, called mylib.py, in which
    there are 2 functions 'f1' and 'f2' (1 arguments in either one);

    Now I want to write a wrapper that will invoke f1 or f2 using the
    command line argument. So for example, I want to write a function
    "call.py" and invoke it as

    python call.py f1 arg1

    So this is straight forward, but I don't know how to evaluate a
    function.
    any help would be much appreciate it.
    les

  • Joe Francia

    #2
    Re: a wrapper to invoke functions using argument

    les_ander@yahoo .com wrote:[color=blue]
    > Hi,
    > support I have a library of function, called mylib.py, in which
    > there are 2 functions 'f1' and 'f2' (1 arguments in either one);
    >
    > Now I want to write a wrapper that will invoke f1 or f2 using the
    > command line argument. So for example, I want to write a function
    > "call.py" and invoke it as
    >
    > python call.py f1 arg1
    >
    > So this is straight forward, but I don't know how to evaluate a
    > function.
    > any help would be much appreciate it.
    > les
    >[/color]
    There is a FAQ about this:


    --
    Soraia: http://www.soraia.com

    Comment

    Working...