Re: Difference in Python and Ruby interactive shells

2006-04-10 Thread Nick Craig-Wood
Lou Pecora [EMAIL PROTECTED] wrote: Impressive, but YIKES, there ought to be a simpler way to do this. I think during the development phase editing and reloading would be very common and you'd want everything updated. Sorry I missed this thread... This is what I use which is easy and

Re: Difference in Python and Ruby interactive shells

2006-04-07 Thread Peter Otten
Alex Martelli wrote: Michele Simionato [EMAIL PROTECTED] wrote: You want this recipe from Michael Hudson: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 automatically upgrade class instances on reload() Note that the version in the printed Cookbook (2nd edition)

Re: Difference in Python and Ruby interactive shells

2006-04-07 Thread Alex Martelli
Peter Otten [EMAIL PROTECTED] wrote: Alex Martelli wrote: Michele Simionato [EMAIL PROTECTED] wrote: You want this recipe from Michael Hudson: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 automatically upgrade class instances on reload() Note that

Re: Difference in Python and Ruby interactive shells

2006-04-06 Thread dmh2000
Thanks all for the responses. Extra kudos to Steve J and Michele S. that cleared it up for me. the context of my question comes from reading up on Lisp in Loving Lisp - the Savy Programmer's Secret Weapon, http://www.markwatson.com/opencontent/lisp_lic.htm, where the author described building up

Re: Difference in Python and Ruby interactive shells

2006-04-05 Thread Sybren Stuvel
Lou Pecora enlightened us with: Impressive, but YIKES, there ought to be a simpler way to do this. I think during the development phase editing and reloading would be very common and you'd want everything updated. I hardly ever reload stuff manually during development. I write a script, and

Difference in Python and Ruby interactive shells

2006-04-04 Thread dmh2000
I am experimenting with the interactive interpreter environments of Python and Ruby and I ran into what seems to be a fundamental difference. However I may be doing something wrong in Python. Please comment and correct me if I am wrong In both languages, you can start up the interactive

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Claudio Grondi
dmh2000 wrote: I am experimenting with the interactive interpreter environments of Python and Ruby and I ran into what seems to be a fundamental difference. However I may be doing something wrong in Python. Please comment and correct me if I am wrong In both languages, you can start up the

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Sybren Stuvel
dmh2000 enlightened us with: When you want to change something, you can edit those same source files outside the environment and reload them from within the interactive environment. But, here is the difference: with Python, when you reload the source file (module in Python terms), it seems

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Steve Juranich
dmh2000 wrote: I am experimenting with the interactive interpreter environments of Python and Ruby and I ran into what seems to be a fundamental difference. However I may be doing something wrong in Python. Please comment and correct me if I am wrong In both languages, you can start up the

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Diez B. Roggisch
In both languages, you can start up the interactive interpreter ('python' and 'irb'), load source files and do stuff, like create objects and call their methods. When you want to change something, you can edit those same source files outside the environment and reload them from within the

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Michele Simionato
You want this recipe from Michael Hudson: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 automatically upgrade class instances on reload() -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread malv
I think reload should be preceded by import. Example: Online code modification: upon modifying and saving mytest.py issue on the interactive shell: import mytest reload(mytest) The shell should respond with module 'mytest' from '/root/mytest.py' (NOT:mytest.pyc) Note that

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Alex Martelli
Michele Simionato [EMAIL PROTECTED] wrote: You want this recipe from Michael Hudson: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 automatically upgrade class instances on reload() Note that the version in the printed Cookbook (2nd edition) was substantially

Re: Difference in Python and Ruby interactive shells

2006-04-04 Thread Lou Pecora
In article [EMAIL PROTECTED], Michele Simionato [EMAIL PROTECTED] wrote: You want this recipe from Michael Hudson: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 automatically upgrade class instances on reload() Impressive, but YIKES, there ought to be a simpler