Re: totally replacing bash with IPython on my Linux system
Nathan Goldbaum <[email protected]> Thu, 10 Dec 2015 11:55:59 -0600
| Newsgroups | gmane.comp.python.ipython.user |
|---|---|
| Message-ID | <CAJXewOkhHK3e1swQjbtnok83swcg+N7bmGRL0hNsQO6dBwU78A@mail.gmail.com> |
--===============1911843951301008103== Content-Type: multipart/alternative; boundary=089e0122aaee7e68bb05268eec9a --089e0122aaee7e68bb05268eec9a Content-Type: text/plain; charset=UTF-8 Hi Brian, This doesn't really answer any of your questions, but you might be interested in learning about the xonsh shell, which is a sort of combination of all the best parts of bash and python: http://xonsh.org/ -Nathan On Thu, Dec 10, 2015 at 11:45 AM, Brian Merchant <[email protected]> wrote: > I'd like to replace bash with IPython on my system, so that even files > like .profile are in Python rather than shell script. > > I have some confusion on the topic, even though asking a few questions on > the matter. Here are the questions I have asked previously: > > 1) *How can I replace bash with Python? * > http://unix.stackexchange.com/questions/176091/how-can-i-replace-bash-with-python > > From the answer to that question, I learned how to automatically replace > bash with IPython after log in. > > 2) *.profile is written in shell script -- can I get my system to > understand that I want it to execute a Python script instead?* > http://unix.stackexchange.com/questions/248477/profile-is-written-in-shell-script-can-i-instead-make-my-system-understand-th > > From the answer to that question, I learned that .profile file is > "sourced" rather than "executed" -- that is, the lines in .profile are run > one by one, as if one were typing them into the shell. > > So, my question now is: *how do I get my base system shell to be IPython, > so that it can source ".profile" scripts that have IPython magics/Python > written inside them? *For example, I'd like to write my .profile file > using IPython magics/Python. > > Kind regards, > Brian > > > > > > > > _______________________________________________ > IPython-User mailing list > [email protected] > https://mail.scipy.org/mailman/listinfo/ipython-user > > --089e0122aaee7e68bb05268eec9a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Brian,<div><br></div><div>This doesn't really answe= r any of your questions, but you might be interested in learning about the = xonsh shell, which is a sort of combination of all the best parts of bash a= nd python:</div><div><br></div><div><a href=3D"http://xonsh.org/">http://xo= nsh.org/</a><br></div><div><br></div><div>-Nathan</div><div><br></div></div= ><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, Dec 10, = 2015 at 11:45 AM, Brian Merchant <span dir=3D"ltr"><<a href=3D"mailto:bh= [email protected]" target=3D"_blank">[email protected]</a>></span> w= rote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde= r-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div><div>I&#= 39;d like to replace bash with IPython on my system, so that even files lik= e .profile are in Python rather than shell script.<br><br></div>I have some= confusion on the topic, even though asking a few questions on the matter. = Here are the questions I have asked previously:<br><br></div>1) <b>How can = I replace bash with Python? </b><a href=3D"http://unix.stackexchange.com/qu= estions/176091/how-can-i-replace-bash-with-python" target=3D"_blank">http:/= /unix.stackexchange.com/questions/176091/how-can-i-replace-bash-with-python= </a><br><br></div><div>From the answer to that question, I learned how to a= utomatically replace bash with IPython after log in.<br><br>2) <b>.profile = is written in shell script -- can I get my system to understand that I want= it to execute a Python script instead?</b> <a href=3D"http://unix.stackexc= hange.com/questions/248477/profile-is-written-in-shell-script-can-i-instead= -make-my-system-understand-th" target=3D"_blank">http://unix.stackexchange.= com/questions/248477/profile-is-written-in-shell-script-can-i-instead-make-= my-system-understand-th</a><br><br></div><div>From the answer to that quest= ion, I learned that .profile file is "sourced" rather than "= executed" -- that is, the lines in .profile are run one by one, as if = one were typing them into the shell. <br><br></div><div>So, my question now= is: <b>how do I get my base system shell to be IPython, so that it can sou= rce ".profile" scripts that have IPython magics/Python written in= side them? </b>For example, I'd like to write my .profile file using IP= ython magics/Python.<br><br></div><div>Kind regards,<br></div><div>Brian<br= ></div><div><br><br></div><div><br><br></div><div><div><div><br><br></div><= /div></div></div> <br>_______________________________________________<br> IPython-User mailing list<br> <a href=3D"mailto:[email protected]">[email protected]</a><br> <a href=3D"https://mail.scipy.org/mailman/listinfo/ipython-user" rel=3D"nor= eferrer" target=3D"_blank">https://mail.scipy.org/mailman/listinfo/ipython-= user</a><br> <br></blockquote></div><br></div> --089e0122aaee7e68bb05268eec9a-- --===============1911843951301008103== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ IPython-User mailing list [email protected] https://mail.scipy.org/mailman/listinfo/ipython-user --===============1911843951301008103==--