Gentoo Archives: gentoo-dev

From: George Shapovalov <george@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] initscripts in python
Date: Thu, 17 Apr 2003 06:27:59
Message-Id: 200304162327.39690.george@gentoo.org
In Reply to: Re: [gentoo-dev] initscripts in python by Joseph Carter
1 Though I still fail to see grand benefits, I must admit this is a neat little
2 idea :) (perheaps more of an excersise kind though).
3 A glimpse into possible implementation immediately makes me think about using
4 "appropriate" shell for the task, the one "designed to blend a traditional
5 shell with the power of Python". A short search on google turns up two such
6 projects:
7 http://pysh.sourceforge.net/ and
8 http://sourceforge.net/projects/pyshell/
9
10 Though looks like both weren't active for quite some time lately...
11 So, if anybody is motivated anough, I guess that person can try to pick-up
12 wherever those teams left it ;). Then its a matter of selecting appropriate
13 shell as your "basic" one and picking the corresponding baselayout (and
14 creating both + the appropriate profile specification of curse :)).
15
16 While still not answering why we would want init scripts in python, this can
17 at least create on its way something to stay :).
18
19 Anyway, just my 0.02$ ;).
20
21 George
22
23
24 On Wednesday 16 April 2003 22:49, Joseph Carter wrote:
25 > On Wed, Apr 16, 2003 at 10:19:31AM +0200, Paul de Vrieze wrote:
26 > > > I for one would enjoy the clean-feel of Python in initscrit
27 > > > composition. That said, I would miss the very "Unix atmospherics" of
28 > > > awk and sed and the run-time interactivity of the shell scripting (I
29 > > > mean, it's potential for shorthand notation).
30 > >
31 > > As most init scripts are essentially nobrainer oneliners, I believe using
32 > > anything but sh is overkill. In the cases where something special is
33 > > required it is very well possible to use python/any other language either
34 > > embedded or instead of the standard interpreter. (You could even make
35 > > init scripts in c)
36 >
37 > I don't know.. Python has this great feature that sh does not: it byte
38 > compiles its scripts and will execute the pre-compiled one if it doesn't
39 > have to do anything else. If everything required to boot a Gentoo system
40 > were done in Python thusly, it'd boot pretty fast. (This I consider a
41 > very worthwhile goal!)
42
43
44 --
45 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] initscripts in python merv <merv@×××××××××××××.cy>