Thank you so much for the response Pierre - I appreciate it tremendously.How would I do something like this doable though? :<script type="text/python">
import jquery
$("#test").text("I can use jQuery here !")
</script>
<div id="test"></div>
</body>
Thank you again Pierre. Ok I understand, what about the part of doing just "import jquery" ? (no from)
import jquery
jquery.jq("#test").text("I can use jQuery here !")
Awesome ! Thanks again.
My pleasure. Would it make sense for Brython to automatically do what you described ? For instance, if you type import jquery, brython creates a module like the following without you having to do it manually:from browser import window, load
load("/path/to/jquery.min.js")
jq = window.jQuery
On Wednesday, December 13, 2017 at 10:10:03 PM UTC+2, Pierre Quentel wrote:
Le mercredi 13 décembre 2017 19:21:18 UTC+1, Andreas a écrit :Awesome ! Thanks again.Thank you Andreas, you raised an interesting point. I will add it in the documentation.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+unsubscribe@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/e065830d-6da6-4e71-a995-44debb5f61b4%40googlegroups.com.
2017-12-14 11:44 GMT+01:00 Andreas <booko...@gmail.com>:My pleasure. Would it make sense for Brython to automatically do what you described ? For instance, if you type import jquery, brython creates a module like the following without you having to do it manually:from browser import window, load
load("/path/to/jquery.min.js")
jq = window.jQueryIt is not so easy, Some cases could work out of the box but it is far to be the general pattern.Where is supposed the js library is located?, on a cdn?, locally?Which version of the library?, the latest? one specific version that works with your code?Which global names should be loaded? Do we know these global names? Should be named similarly in Brython?
...
On Wednesday, December 13, 2017 at 10:10:03 PM UTC+2, Pierre Quentel wrote:
Le mercredi 13 décembre 2017 19:21:18 UTC+1, Andreas a écrit :Awesome ! Thanks again.Thank you Andreas, you raised an interesting point. I will add it in the documentation.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
What about creating something like pypi, a directory for JS library wrappers ? I fully respect what Pierre said that the goal is to work without JS but if the programmer is not exposed to any JS syntax, it should be ok as those JS shortcuts will be very useful.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/300861c9-18f8-4cc2-aa15-ace97d6e4a39%40googlegroups.com.