sorry
lines
    char tt;
    for (tt=0; tt<40; tt++)
      fputc(tt, inputf);

/.../

    fputc(EOF, inputf);

are not needed at all and do nothing -- i was just testing a thought
before i catched how those pipes and forks work in linux :) i have
mostly done things in windows and c++ and WinApi so i dont catch
everything immedietly yet :)

2006/3/16, tvali <[EMAIL PROTECTED]>:
> So I was the last one :)
>
> My example is using python interpreter -- it's maybe simpler to use in
> many cases, but theoretically slower.
>
> It is, anyway, not so advanced to import portage, but you can add that line ;)
>
> 2006/3/15, solar <[EMAIL PROTECTED]>:
> > On Wed, 2006-03-15 at 21:42 +0100, Kevin F. Quinn (Gentoo) wrote:
> > > On Wed, 15 Mar 2006 09:52:13 -0500
> > > solar <[EMAIL PROTECTED]> wrote:
> > >
> > > > On Wed, 2006-03-15 at 10:51 +0100, Paul de Vrieze wrote:
> > > >
> > > > [snip]
> > > >
> > > > > Actually, C++ being strongly related to C, can just use the C
> > > > > python api's. As such it could directly interface with python, and
> > > > > use the python portage api.
> > > >
> > > > If you could demonstrate an 'import portage' and a simple
> > > > printf("PORTDIR=%s\n", PORTDIR); in C I'd be highly interested.
> > >
> > > Try attached :)  Had a go 'coz I was curious.  Compile with:
> > >
> > > gcc -o getportdir getportdir.c -lpython2.4
> > >
> > > Does the equivalent of:
> > >
> > > #!/usr/bin/portage
> > > import portage;
> > > print portage.settings["PORTDIR"];
> > >
> > > (more or less).  Docs on the API itself (which comes with Python) are at
> > > http://docs.python.org/api/api.html
> >
> > thanks Kevin,
> >  marienz also put 3 examples together to demonstrate it.
> >
> > /me feels like a kid in a candy store.
> >
> > thanks guys.
> >
> >
> > --
> > solar <[EMAIL PROTECTED]>
> > Gentoo Linux
> >
> > --
> > gentoo-portage-dev@gentoo.org mailing list
> >
> >
>
>
> --
> tvali
> (e-mail: "[EMAIL PROTECTED]"; msn: "[EMAIL PROTECTED]";
> icq: "317-492-912")
>
> Ühe eesti internetifirma lehel kohtasin tsitaati:
> If you don't do it excellently, dont do it at all. Because if it's not
> excellent, it won't be profitable or fun, and if you're not in
> business for fun or profit, what the hell are you doing here?
> Robert Townsend
>
>
>


--
tvali
(e-mail: "[EMAIL PROTECTED]"; msn: "[EMAIL PROTECTED]";
icq: "317-492-912")

Ühe eesti internetifirma lehel kohtasin tsitaati:
If you don't do it excellently, dont do it at all. Because if it's not
excellent, it won't be profitable or fun, and if you're not in
business for fun or profit, what the hell are you doing here?
Robert Townsend

-- 
gentoo-portage-dev@gentoo.org mailing list

Reply via email to