def do_debug(self, arg):Today I tried getting ipython working as described in the plone docs. I also tried vanrees notes
cmdline = self.get_startup_cmd(self.options.python + ' -i',
"import Zope2; app=Zope2.app(); import user;")
and a couple others. I could not get it going though. So I decided to return to the hack above and extend it to load ipython.
def do_debug(self, arg):Poof, now debug comes up with ipython. Yay... What does that mean you may ask?
cmdline = self.get_startup_cmd(self.options.python + ' -i',
"import Zope2; app=Zope2.app(); import user;
ns={'__name__':'msrd','app':app}; import IPython;
IPython.Shell.IPShell(user_ns=ns).mainloop(sys_exit=1);")
In [2]: ??app.msrd
Type: ImplicitAcquirerWrapper
Base Class:
String Form:
Namespace: Interactive
Length: 1
Docstring [source file open failed]:
Make PloneSite subclass CMFSite and add some methods.
This will be useful for adding more things later on.
I know this is probably the wrong way to do this, but nyah nyah. It is working now. I do welcome feedback...
As a note: I also have import user in my args. This picks up stuff from your file defined in PYTHONSTARTUP. But then if you already use PYTHONSTARTUP you probably already know that.