Multiple returns from a python function

Discussion in 'Python' started by Preetip, Aug 10, 2012.

  1. Preetip

    Preetip

    Joined:
    Aug 10, 2012
    Messages:
    1
    Likes Received:
    0
    How do I handle a Python function that returns multiple lists

    Python script:
    display():
    a = [ 'a','b','abc']
    b = [ 1 , 2 , 3]
    return (a,b)


    In the c function calling the above python function:

    pValue,pValue1 = PyObject_CallObject(pFunc, pArgs);


    But then I cannot use the objects to extract the list values.
    What am I doing wrong ?
     
    Preetip, Aug 10, 2012
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. vizlab
    Replies:
    3
    Views:
    4,703
    Michael Bar-Sinai
    Oct 17, 2007
  2. Boris Sargos
    Replies:
    3
    Views:
    596
    John Harrison
    Apr 23, 2004
  3. Sathyaish
    Replies:
    11
    Views:
    729
    Chris Dollin
    Jun 14, 2004
  4. Bart Nessux
    Replies:
    5
    Views:
    517
    Kirk Strauser
    Feb 8, 2004
  5. ++imanshu
    Replies:
    7
    Views:
    850
    ++imanshu
    Aug 23, 2008
  6. Graham Nicholls
    Replies:
    3
    Views:
    196
    Robert Klemme
    Jul 5, 2004
  7. Trans
    Replies:
    2
    Views:
    491
    Trans
    Nov 6, 2005
  8. Srijayanth Sridhar
    Replies:
    19
    Views:
    1,129
    David A. Black
    Jul 2, 2008
Loading...