From: tvali <qtvali@gmail.com>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: portage from C (was Re: [gentoo-portage-dev] Hello! && portage UI)
Date: Thu, 16 Mar 2006 00:14:59 +0200 [thread overview]
Message-ID: <cea53e3c0603151414s665b1e89h@mail.gmail.com> (raw)
In-Reply-To: <cea53e3c0603151412x4dd0f1bbr@mail.gmail.com>
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 <qtvali@gmail.com>:
> 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 <solar@gentoo.org>:
> > On Wed, 2006-03-15 at 21:42 +0100, Kevin F. Quinn (Gentoo) wrote:
> > > On Wed, 15 Mar 2006 09:52:13 -0500
> > > solar <solar@gentoo.org> 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 <solar@gentoo.org>
> > Gentoo Linux
> >
> > --
> > gentoo-portage-dev@gentoo.org mailing list
> >
> >
>
>
> --
> tvali
> (e-mail: "qtvali@gmail.com"; msn: "qtvali@gmail.com";
> 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: "qtvali@gmail.com"; msn: "qtvali@gmail.com";
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
prev parent reply other threads:[~2006-03-15 22:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-13 22:39 [gentoo-portage-dev] Hello! && portage UI tvali
2006-03-14 0:54 ` Brian
2006-03-14 11:14 ` tvali
2006-03-14 14:39 ` Brian
2006-03-14 14:55 ` tvali
2006-03-14 15:07 ` Brian
2006-03-14 15:18 ` Marius Mauch
2006-03-14 16:48 ` tvali
2006-03-14 16:55 ` tvali
2006-03-15 9:51 ` Paul de Vrieze
2006-03-15 14:52 ` solar
2006-03-15 15:12 ` tvali
2006-03-15 16:36 ` solar
2006-03-15 17:36 ` tvali
2006-03-15 20:42 ` portage from C (was Re: [gentoo-portage-dev] Hello! && portage UI) Kevin F. Quinn (Gentoo)
2006-03-15 21:37 ` solar
2006-03-15 22:12 ` tvali
2006-03-15 22:14 ` tvali [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cea53e3c0603151414s665b1e89h@mail.gmail.com \
--to=qtvali@gmail.com \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox