RE: [PyCrust] Significant refactoring
Brought to you by:
pobrien
From: Patrick K. O'B. <po...@or...> - 2001-08-21 06:40:36
|
Attached is the latest version of the code, including some things that aren't even in cvs yet. As you can see, a few things are being rearranged. Let me know what you think. And thanks for sharing your program as well. --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: pyc...@li... [mailto:pyc...@li...]On Behalf Of Chin H. Wu Sent: Tuesday, August 21, 2001 12:41 AM To: pyc...@li... Subject: Re: [PyCrust] Significant refactoring Please e-mail me the modifications. I don't have CVS installed in my machine yet. Here is the program I mentioned. As you can see, the modification is quite simple. If you have a window machine, you can double click on CmdConsole.py to get started. You can try CmdCrust if you have PyCrust-0.5.1. I can update it after I get your new version of PyCrustAlaCarte.py. ----- Original Message ----- From: "Patrick K. O'Brien" <po...@or...> To: <pyc...@li...> Sent: Monday, August 20, 2001 1:44 PM Subject: RE: [PyCrust] Significant refactoring > I have changed the Shell class to allow you to pass an > Interpreter-compatible class (or subclass of Interpreter) and any number of > additional parameters required by your class. PyCrustAlaCarte.py was also > fixed and now uses a subclass of PyCrust.interpreter.Interpreter called > InterpreterAlaCarte. I think this should give you the flexibility you are > looking for. If not, holler. > > The changes have been checked into CVS and are available there now. A zip > file release should be available later this week. Let me know if you can't > do CVS and need the files sooner. > > P.S. Is there any chance you'd like to share your program? It sounds like > you might have some interesting enhancements. > > --- > Patrick K. O'Brien > Orbtech > "I am, therefore I think." > > -----Original Message----- > From: pyc...@li... > [mailto:pyc...@li...]On Behalf Of Chin H. Wu > Sent: Sunday, August 19, 2001 11:24 PM > To: pyc...@li... > Subject: Re: [PyCrust] Significant refactoring > > I have a program that runs from the command line. This program is a hybrid > of cmd.py and code.py that I can take an arbitrary program and turns that > into something like a builtin keyword. For example, I have a command called > foo, which will prints out the input contents: > def foo(in): > print in > > And I can call this command like: > Python > foo 1 > or > Python > foo a > where "a" is a defined variable. > But it goes beyond calling the commands in a simple statement like above, I > can also do this: > for i in range(3): > foo i > > For all practical purpose, the command behaves like a builtin keyword like > 'print'. It is very similar to PyCrust.pseudo.PseudoKeyword if you know what > I means. > > I wrote the program by modifying the code.py and by subclassing the > InteractiveInterpreter. The idea is very similar to Interpreter class in > PyCrust. In PyCrust-0.5.1, I can make minimum modification to my program and > make it work with PyCrust and wxPython. This doesn't work with PyCrust-0.5.3 > because I don't see an easy way to subclass the Interpreter class. I like > some of the features PyCrust provides and wish to make my program work with > PyCrust. Hence I would petition to keep the Interpreter class subclassable. > That opens a lot of possiblity. > > > > _______________________________________________ > PyCrust-users mailing list > PyC...@li... > http://lists.sourceforge.net/lists/listinfo/pycrust-users |