Hi Terry,

I am relatively new to Leo.  And your post is most relevant to what I am 
trying to do.

I am trying to use leoBridge within a python cgi script.  I am using 
apache2.  The leoBridge code was excerpted from the Leo5.0 documentation.

For some reason, leoBridge.controller remains closed when I invoke the 
script from the browser.  In other words, controller.isOpen() always 
returns False.  (Consequently, I get attributeError due to NoneType when 
the script tries to access functions in controller.)

I run the same script via cmd-prompt and everything seems to work (e.g., 
traversing various nodes).

Am I missing something obvious?  

Your approach with leoweb.py seems to suggest that leoBridge cannot be 
embedded within a cgi script.

Thanks!
stl


On Wednesday, June 19, 2013 at 1:35:59 PM UTC-4, Terry Brown wrote:
>
> For the next 2.25 weeks I'm going to be traveling, Reykavik and St. 
> Petersburg (Russia, not Florida :-).  So there may not be much more to 
> report for a while, but I've started what looks like a promising 
> attempt at a web interface to Leo.  Very much based on a path of least 
> resistance for my skill set. 
>
> So far you can drag nodes around the tree, cut and paste and insert 
> them, and edit the headline text.  And tell the server to save the 
> outline. The architecture is: 
>
> Python's BaseHTTPServer running the 'server'. 
> New code ('leoweb.py') communicating with the browser. 
> jQuery and jQuery-UI handling the interface (authored in coffeescript). 
> And the critical link - leoBridge as the backend for leoweb.py. 
>
> So in an odd way this is a database driven Leo, using Leo as the 
> backend database :-)  I'm trying to minimize the dependencies, 
> currently they're essentially zero, seeing jQuery and jQuery-UI are 
> publicly hosted. 
>
> Still some work on the core to do, i.e. handling expansion / 
> contraction properly.  Then body text editing, which should be 
> reasonably straight forward.  Then... and this is where this can become 
> so much more than just another on line outliner, minibuffer commands. 
> Which of course is a huge security issue, but never mind that for now. 
>
> Because of the path of least resistance requirement I'm not trying to 
> implement a Leo UI, i.e. another version of Leo's UI code of which 
> there is currently the nullGui and Qt versions, and used to be the Tk 
> version.  This might evolve in that direction, or not, I'm not sure. 
> The event loop is in the user's browser in javascript and not on 
> the server in python.  But it would be a shame not to be able to do 
> some of the things that require knowledge of body editor cursor position 
> and selected text, for example, so we'll see what happens. 
>
> So currently it's essentially a new, coffee/javascript based editor of 
> Leo outlines with the power of leoBridge to call on. 
>
> Cheers -Terry 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to