You are not logged in.
Pages: 1
check this out:
dusty:~ $ python
Python 2.4.2 (#1, Nov 12 2005, 10:57:47)
[GCC 4.0.3 20051006 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system('bash')
dusty:~ $ python
Python 2.4.2 (#1, Nov 12 2005, 10:57:47)
[GCC 4.0.3 20051006 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
dusty:~ $ exit
0
>>>
Now, the question is, can I make python my normal shell instead of bash? Gonna work on that..... Imagine, you could just call 'import magnum' and there's your editor.... and stuff..... woot.
Dusty
Offline
I think there was a project recently to make a python enabled shell - bourne shell compatible with python builtins... I know there's a perl shell like that
Offline
cool
Dusty
Offline
Does this help? I don't know if it's a full-on shell or just an interactive python interp:
http://geophile.com/osh/index.html
Offline
Offline
Does this help? I don't know if it's a full-on shell or just an interactive python interp:
http://geophile.com/osh/index.html
Hmm, it looks like this is actually a shell tool... allowing you to make lambda expressions awk style:
$ find . | osh ^ f 's: path(s)' $
It looks rather interesting though... not sure if I like the enforced '^blah$' delims though...
Offline
Hey, these are really cool..... would be so cool if one of my good friends with time on their hands would make a couple packages for me to experiemnet with sometime... when I have free time away from this utter bullshit that is driving me to homocidal thoughts....
Dusty
Offline
I thought IPython was just a replacement for the "$ python" interpreter, when mucking around command line style?
Offline
I think so but I'm thinking of using the regular interpreter as a shell replacement, so an enhanced one mich be cooler to play with
as if I had time for cool stuff like this
Dusty
Offline
I think so but I'm thinking of using the regular interpreter as a shell replacement, so an enhanced one mich be cooler to play with
as if I had time for cool stuff like this
Dusty
make a package that has functions like 'ls' and whatnot - "from shellutils import *"
Offline
yeah, like that. I have some neat ideas... python functions for common apps, python string processing instead of grep.... python python python..... ooooooh.....
Dusty
Offline
A shell with close integration with Python would be awesome. I'd been thinking about this a while back, after hearing all about Monad.
In terms of use as a replacement shell, I don't think simply having a bunch of packages would be enough. What if you want to do redirection? I know 'print' can redirect to files, but it's not nearly as nice as simply writing "> filename". But then, if you have a custom syntax, you're likely to murder some of Python's features.
One of the cool things you could do (as with Monad), is returning objects from a program, rather than just a return code.
If anyone has any bright ideas, I'd be interested to work on something like this.
Offline
Pages: 1