Gentoo Archives: gentoo-dev

From: merv <merv@×××××××××××××.cy>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] initscripts in python
Date: Thu, 17 Apr 2003 18:14:13
Message-Id: 3E9F1BC6.3027.F23C1B0@localhost
In Reply to: Re: [gentoo-dev] initscripts in python by George Shapovalov
1 I agree, it would be more of an exercise, first off.
2
3 IMHO, i feel that the concept of being able to select shell runtime
4 variables such as script language or syntax would absolutely open up
5 new possibilities. I agree with those who argue that any so-called
6 "gain" would be debateable, but surely three important gains would be
7 these:
8
9 1) gives more choice to fellow gentooers
10 2) is an exercise in rethinking things that are almost Unix "lore"
11 3) depending on the degree of success, we'll know it can be done!
12
13 Thanks for the links too.
14
15 On 16 Apr 2003 at 23:27, George Shapovalov wrote:
16
17 > Though I still fail to see grand benefits, I must admit this is a neat little
18 > idea :) (perheaps more of an excersise kind though).
19 > A glimpse into possible implementation immediately makes me think about using
20 > "appropriate" shell for the task, the one "designed to blend a traditional
21 > shell with the power of Python". A short search on google turns up two such
22 > projects:
23 > http://pysh.sourceforge.net/ and
24 > http://sourceforge.net/projects/pyshell/
25 >
26 > Though looks like both weren't active for quite some time lately...
27 > So, if anybody is motivated anough, I guess that person can try to pick-up
28 > wherever those teams left it ;). Then its a matter of selecting appropriate
29 > shell as your "basic" one and picking the corresponding baselayout (and
30 > creating both + the appropriate profile specification of curse :)).
31 >
32 > While still not answering why we would want init scripts in python, this can
33 > at least create on its way something to stay :).
34 >
35 > Anyway, just my 0.02$ ;).
36 >
37 > George
38 >
39 >
40 > On Wednesday 16 April 2003 22:49, Joseph Carter wrote:
41 > > On Wed, Apr 16, 2003 at 10:19:31AM +0200, Paul de Vrieze wrote:
42 > > > > I for one would enjoy the clean-feel of Python in initscrit
43 > > > > composition. That said, I would miss the very "Unix atmospherics" of
44 > > > > awk and sed and the run-time interactivity of the shell scripting (I
45 > > > > mean, it's potential for shorthand notation).
46 > > >
47 > > > As most init scripts are essentially nobrainer oneliners, I believe using
48 > > > anything but sh is overkill. In the cases where something special is
49 > > > required it is very well possible to use python/any other language either
50 > > > embedded or instead of the standard interpreter. (You could even make
51 > > > init scripts in c)
52 > >
53 > > I don't know.. Python has this great feature that sh does not: it byte
54 > > compiles its scripts and will execute the pre-compiled one if it doesn't
55 > > have to do anything else. If everything required to boot a Gentoo system
56 > > were done in Python thusly, it'd boot pretty fast. (This I consider a
57 > > very worthwhile goal!)
58 >
59 >
60 > --
61 > gentoo-dev@g.o mailing list
62 >
63
64
65 --
66 Merv Hammer
67 mailto: merv@×××××××××××××.cy
68
69 --
70 gentoo-dev@g.o mailing list