On Wed, Aug 20, 2008 at 03:19:19PM -0400, joey boggs wrote:
What is the problem you are trying to solve? Are you asking how to
write a shell in Python?
<pet peeve>
You wouldn't... "setup" is a noun. You might "set up" an interpreter
though.
</pet peeve>
How so? What could be easier than "rm -rf directory"?
I'd be happy to, but I can't imagine what sort of documentation would
help you. It sounds like what you want to do, basically, is write a
program to read commands from stdin, parse them to make sure the
syntax is right, and then execute the equivalent code in Python.
--
Derek D. Martin
GPG Key ID: 0x81CFE75D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFIrJ7Sdjd lQoHP510RAuqYAK Cknb97T0qTuWINm Y2iRqIMdHSASgCd G0rW
f+N+2yzxsQI+K6N 1hBCO4QQ=
=wLvp
-----END PGP SIGNATURE-----
In the end I'd like to be able to run a custom interpreter and just feed it
one command and a directory. The end result in the kickstart something like
this:
>
%post --interpreter #!/usr/bin/myinterpreter
DROP /tmp/directory
DROP /tmp/directory2
one command and a directory. The end result in the kickstart something like
this:
>
%post --interpreter #!/usr/bin/myinterpreter
DROP /tmp/directory
DROP /tmp/directory2
write a shell in Python?
<pet peeve>
How would I setup the interpreter to take the DROP command?
though.
</pet peeve>
I've been reading and searching all day but I haven't found anything
close to what I'm doing. I realize that using custom commands in
this case is overkill but in the end is used to make the users life
easier.
close to what I'm doing. I realize that using custom commands in
this case is overkill but in the end is used to make the users life
easier.
If anyone can point me to some documentation I would be more than
grateful.
grateful.
help you. It sounds like what you want to do, basically, is write a
program to read commands from stdin, parse them to make sure the
syntax is right, and then execute the equivalent code in Python.
--
Derek D. Martin
GPG Key ID: 0x81CFE75D
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFIrJ7Sdjd lQoHP510RAuqYAK Cknb97T0qTuWINm Y2iRqIMdHSASgCd G0rW
f+N+2yzxsQI+K6N 1hBCO4QQ=
=wLvp
-----END PGP SIGNATURE-----
Comment