(Dec-26-2021, 08:56 PM)Jeff900 Wrote: maybe there is a way to further implement such functionality?
how i would design such a thing is have a way to register a new command for the internal command table with a reference to the function to be called when that command is to be run. this could also be done as a special dictionary indexed by command name strings with values being the function to call. the command line would be passed to that function some way (yet to be defined).
def boom(): exit('**** BOOM ****') __command_table__['die'] = boom diethat's just an overly simplistic example.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.