I am playing with your leoserver stuff 
<https://github.com/leo-editor/leo-editor/issues/684#issuecomment-363992724>.  
I want to understand this code thoroughly.

Lots of questions and comments.

1. Reminder: to get the link to a comment, you click on the link (x days 
ago) at the start of the comment.

2. The original code must be run from the leo-editor folder itself.  To run 
the leoserver stuff from another folder, say c:/Test/Terry, I changed 
leoserver.py as follows:

STATIC_FILES = {
    '/favicon.ico': 'leo/Icons/LeoApp.ico',
    '/index.html': 'leoserver.html',
    # '/leoserver.js': 'leoserver.js',
    '/leoserver.js': 'c:/test/Terry/leoserver.js',
    # '/leoserver.css': 'leoserver.css',
    '/leoserver.css': 'c:/test/Terry/leoserver.css',
}

And I copied and pasted the entire leo folder from leo-editor to 
c:\test\Terry.

3. I added a <p> item in leoserver.html to remind me to precede statements 
by ":".  And I changed 

<button id='go'>Go</button>

to:

<button id='go'>Eval</button>

4. Typing, say, 2+2 shows 4, as expected.  But typing g, which surely is in 
the namespace shows 

FAILED

in the web page and traceback ending with:

File "c:\Anaconda3\lib\json\encoder.py", line 180, in default
 o.__class__.__name__)
TypeError: Object of type 'module' is not JSON serializable

Terry, how would you go about fixing this?

*Summary*

I'm thinking this is a great start, and I'd like to continue exploring.

For the first time, I have a way of playing with client/server code.

Edward

-- 
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to