printf in python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gianluca

    printf in python

    Hy, I've a problem with may python library generated with swig from C
    code. I works and I can access all function but a simèple function
    that print a string don't work's.
    The function is like this:
    int PrintTEST()
    {
    printf("TEST ");
    return 1;
    }

    If I call the function (myDLL.PrintTES T() ) the function print only
    the returned value, not the string "TEST". Could anybody help me?

    Thanks

    Gianluca
  • Hrvoje Niksic

    #2
    Re: printf in python

    gianluca <geonomica@gmai l.comwrites:
    Hy, I've a problem with may python library generated with swig from C
    code. I works and I can access all function but a simèple function
    that print a string don't work's.
    The function is like this:
    int PrintTEST()
    {
    printf("TEST ");
    return 1;
    }
    Finish the printed string with a newline, or call fflush(stdout). By
    default stdout is line-buffered when connected to interactive displays.

    Comment

    Working...