Somehow we got off the mailing list, so I'm redirecting back to it.

You can change a kernel to Javascript, but then your python kernel is gone.

The Beaker project explores sharing values between javascript and python,
and having both running at the same time.

There is a C++ kernel as well.

Jason


On Wed, Sep 25, 2019 at 8:36 AM CrestChristopher <[email protected]>
wrote:

> I hope one can switch between the native python kernel and javascript,
> that is something I'll have to find out; I guess there is a kernel for C as
> well ?
>
> Christopher
> On 9/25/2019 11:21 AM, Jason Grout wrote:
>
> Javascript doesn't have a print() function. You can't mix javascript and
> python syntax or variables.
>
> To show something from Javascript you can do a console.log() to log to the
> browser console.
>
> You could also just install a javascript kernel if you really just want to
> work in javascript always. I haven't tried it, but for example IJavascript
> is listed in our kernels page at
> https://github.com/jupyter/jupyter/wiki/Jupyter-kernels.
>
> Jason
>
>
> On Wed, Sep 25, 2019 at 8:09 AM CrestChristopher <
> [email protected]> wrote:
>
>> For example;
>> var one = "apple";print(one);I don't want a Jupyter cell to print the
>> code as it was typed; I want it to show the result of the variableonewhich
>> in this case would beapple` ?
>> ​
>>
>> Sorry my client screwed up the styling of the comment.
>> On 9/25/2019 11:06 AM, Jason Grout wrote:
>>
>> Can you post a code snippet of what you have tried, and what is not
>> working about it?
>>
>> I'm not sure what you are trying to do with `import javascript`.
>>
>> Jason
>>
>>
>> On Wed, Sep 25, 2019 at 8:02 AM CrestChristopher <
>> [email protected]> wrote:
>>
>>> I have some Javascript which I want to run as executed. I know about
>>> %%js or %%javascript but I must also do
>>>
>>> import javascript in the cell, which is the correct syntax ?
>>>
>>> Christopher
>>>
>>> On 9/25/2019 10:56 AM, Jason Grout wrote:
>>>
>>> What do you mean by "compile Javascript"? Do you mean you have some
>>> Javascript that you want to run? You can use the Javascript display type in
>>> IPython, for example:
>>>
>>> I think you can use either %%javascript at the top of the cell, or
>>> something like: from IPython.display import Javascript; Javascript(...)
>>>
>>> Thanks,
>>>
>>> Jason
>>>
>>>
>>> On Wed, Sep 25, 2019 at 7:24 AM CrestChristopher <
>>> [email protected]> wrote:
>>>
>>>> Is it possible to compile Javascript in a cell in Jupyter ?
>>>>
>>>> Christopher
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Project Jupyter" 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/jupyter/8caf2bbd-db67-9bfb-7852-ec4961d40fdc%40gmail.com
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Project Jupyter" 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/jupyter/CAPDWZHzJQ89G_bKMqkpK_bF1%3DT7yNemotB%3DF%2BHuRzMvKMk%2Bw_g%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/jupyter/CAPDWZHzJQ89G_bKMqkpK_bF1%3DT7yNemotB%3DF%2BHuRzMvKMk%2Bw_g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> ​
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" 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/jupyter/CAPDWZHx2suGs%3DLEBFkjBygkwLu3AeFkYRu99_n1L9pqdibHubw%40mail.gmail.com.

Reply via email to