Have you tried these? I am quite sure that bytecode will not work since 
both JS and Python side of SageMathCell operate with clear text code. 
Loading files into script tags perhaps may work. What I know some people 
have done in the past was loading long code via some short code snippet 
that uses standard Python means of loading files/code, but that relies on 
having your code hosted somewhere with a stable IP or DNS name.


On Tuesday, 3 October 2017 18:58:59 UTC-6, Jorge Manrique wrote:
>
> Hello everyone,
> I have an interactive program in Python. The program does some 
> calculations with SageMath and graphs the results. The code is a bit long.
> I want to embed the program on a webpage using SageCell and I wonder if I 
> can leave the Python program on the web server and use an external script:
>
> <head>
> . . . . . . .
>   <script>
>      sagecell.makeSagecell ({
>           inputLocation: '#plot'
>      })
>   </ script>
> </ head>
> . . . . . . .
> <div id = "plot">
>   <script type = "text / x-sage" src = "/ src / somegraph.py"> </ script>
> </ div>
>
> or compile the program, for example, with CPython, and then include the 
> bytecode in the second script above:
>
> <div id = "plot">
>   <script type = "application / octet-stream">
>       bytecode
>   </ script>
> </ div>
>
> Any suggestions will be appreciated,
> Jorge
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-cell" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-cell/86cf77af-f097-4dbe-be0d-4451205028b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to