Thank you Ville. René On Apr 12, 10:35 am, "Ville M. Vainio" <[email protected]> wrote: > Sure it can run in separate environment, it just needs a new plugin > and a new command/shortcut. Part of the attraction of ctrl+b scripts > is that they can access the guts of leo, current document and the ui. > > You could envision a persistent python process that executes all > scripts you send to it, relaying stdout back to leo log. Perhaps they > could even ask some data from host leo with "leoremote" mechanism? > > Anyway, this is an interesting research project for someone (or me, if > I get time & inspiration). > > On Tue, Apr 12, 2011 at 11:11 AM, RAH <[email protected]> wrote: > > Ah ! Indeed it makes sense. > > However, would it be possible for LEO to run Python scripts/programs > > in an environment separate from its own ? > > When I look at Idle or Wingware, they always start a new "Python > > shell" for running the code. Can (could) LEO do the same ? This would > > probably solve any interference problem between LEO environment and a > > script environment. > > I'm sure I haven't yet come to that aha! moment where I properly > > understand the LEO concepts. > > Thank you Ville. > > > On Apr 12, 7:55 am, "Ville M. Vainio" <[email protected]> wrote: > >> You are using wxPython from inside Qt program (Leo). It's likely to > >> screw up things. > > >> On Tue, Apr 12, 2011 at 6:42 AM, RAH <[email protected]> wrote: > >> > Thanks Terry. > >> > No, it isn't. When in the Min-buffer, the arrow keys have no effect. > >> > The ALT-Arrow do and also bring you out so that the Arrow keys work > >> > again. > >> > Here I find myself in such a situation after running a Python script > >> > (via CTRL-B) and the script fails but there is no indication in the > >> > Log pane. > >> > If I type CTRL-B again, it fails and I read: > > >> > exception executing script > >> > PyAssertionError: C++ assertion "wxAssertFailure" failed at ..\..\src > >> > \msw\toplevel.cpp(420) in wxTopLevelWindowMSW::CreateDialog(): Failed > >> > to create dialog. Incorrect DLGTEMPLATE? > >> > -------------------- > >> > line 650: """ > >> > * line 651: > >> > _windows_.Dialog_swiginit(self,_windows_.new_Dialog(*args, **kwargs)) > >> > line 652: self._setOORInfo(self) > >> > line 653: > > >> > and I get an Error message that reads: > > >> > Can't create dialog using memory template (error 1400: invalid window > >> > handle) > > >> > I'm certain there is an error in my Python program that I must find > >> > out and solve using Idle. > > >> > I suppose this is linked to the fact that CTRL-B executes the script > >> > within the same instance of Python used by LEO (same namespace ?) and > >> > that the faulty script corrupts LEO. Another manifestation of this > >> > intimacy seems to be the matter of directories and paths shared > >> > between LEO and a Python program within an @file node as discussed a > >> > couple of days ago. > > >> > Regards, Rene > > >> > On Apr 11, 9:07 pm, Terry Brown <[email protected]> wrote: > >> >> On Mon, 11 Apr 2011 11:53:09 -0700 (PDT) > > >> >> RAH <[email protected]> wrote: > >> >> > Dear All, > > >> >> > Has anyone experienced the arrow and return keys not responding ? > >> >> > I'm running LEO 4.8 final with Qt. > >> >> > It happened more than once, after running a Python program (typing > >> >> > CTRL-B) that fails, that these keys are not responding anymore !? > >> >> > The enter key doesn't work. > >> >> > The arrow keys dont but ALT-Arrows still work similar to Arrows. > >> >> > Other keys still work. I can also point and click, chose a menu item > >> >> > and save. > > >> >> Is it possible you've entered mini-buffer mode (Alt-X)? You can hit > >> >> escape to exit that. > > >> >> Cheers -Terry > > >> >> > There is no way I can get this back to work except by closing LEO and > >> >> > starting again. > > >> >> > Regards, Rene > >> >> > PS: I search the group with "keys not responding" but didn't find > >> >> > relevant information. > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "leo-editor" group. > >> > To post to this group, send email to [email protected]. > >> > To unsubscribe from this group, send email to > >> > [email protected]. > >> > For more options, visit this group > >> > athttp://groups.google.com/group/leo-editor?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "leo-editor" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/leo-editor?hl=en.
-- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
