Python Forum
now i wish Python had a way to add commands
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
now i wish Python had a way to add commands
#11
(Dec-27-2021, 01:33 AM)BashBedlam Wrote: I think this comes pretty close to what you're asking.
it does appear to be close. but what about command arguments. can you replicate the old print command like c.print mystring?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#12
i'm almost unsure how to have "little" or minimal configuration without setting up a new user. maybe xonsh is overkill for me.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#13
(Dec-29-2021, 01:48 AM)Skaperen Wrote: it does appear to be close. but what about command arguments. can you replicate the old print command like c.print mystring?
Sorry, I can't seem to figure that one out. The interactive interpreter doesn't apear to be using stdin so I don't know how to read the rest of the line afterc.print. Any takers on that one?
Reply
#14
Skaperen Wrote:i'm almost unsure how to have "little" or minimal configuration without setting up a new user. maybe xonsh is overkill for me.
Difficult to answer as we know nothing about your configuration and we don't know why xonsh crashed in your terminal. Does it have anything to do with a fancy linux prompt or 'powerline' ? You could perhaps disable this and try again. Don't give up too early, Xonsh is a very nice tool!
Reply
#15
what i think i need to do is create a user using traditional user management tools and not run the scripts that set up users. that way they won't have the user owned parts of the config starting with the 762 line .bashrc file.

so what if it works on that user. most of my config are essential to what i do so i can't just start from nothing to migrate to xonsh. i'll need to figure this out, which might need a lot of understanding of xonsh. a lot of my config, much written in C, some of which is over 20 years old, even i no longer understand it, or even how to remove it (new things often depend on old things). the boot setup logs in most of the users and take over 7 minutes to run for about 12 users. fortunately that's only when i boot up.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#16
You could use xonsh from another shell than bash. In my terminal, sh is softlinked to dash. I could run xonsh from dash
Output:
λ sh \[\e[36m\]λ\[\e[0m\] xonsh ~/P/S/2021-01 echo "hello" hello ~/P/S/2021-01 3 - 7 -4 ~/P/S/2021-01
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020