printf in python
gianluca
geonomica at gmail.com
Tue Jun 3 09:28:57 EDT 2008
On 3 Giu, 12:48, gianluca <geonom... at gmail.com> wrote:
> On 2 Giu, 20:51, gianluca <geonom... at gmail.com> wrote:
>
>
>
> > On 2 Giu, 17:54, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
>
> > > On Mon, 2 Jun 2008 00:32:33 -0700 (PDT), gianluca <geonom... at gmail.com>
> > > declaimed the following in comp.lang.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.PrintTEST() ) the function print only
> > > > the returned value, not the string "TEST". Could anybody help me?
>
> > > Are you running from a command shell?
>
> > > If you are testing from inside something like IDLE (or PythonWin, or
> > > pretty much any other GUI development system) you may not have a stdout
> > > for display by C code...
>
> > > The return value would be printed by the Python interpreter in
> > > interactive mode...
> > > --
> > > Wulfraed Dennis Lee Bieber KD6MOG
> > > wlfr... at ix.netcom.com wulfr... at bestiaria.com
> > > HTTP://wlfraed.home.netcom.com/
> > > (Bestiaria Support Staff: web-a... at bestiaria.com)
> > > HTTP://www.bestiaria.com/
>
> > Hy,
> > the problem exists both in command shell and in IDLE. The value is
> > correct returned in both envirnment.
>
> > gianluca
>
> Anybody help me?
I know!! I'm bore!! But I need help indeed!!
I'm looking inside lib_wrap.c generated by swig. In the wrap function
there is no printf function. If is this the problem how can I do to
resolve it?
thanks
Gianluca
More information about the Python-list
mailing list