question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Embedding rapydscript to the webpage

See original GitHub issue

Hi, @atsepkov i have an idea to embed rapydscript to the webpage. So that we could program and write JS in RapydScript code on the fly like Brython does. What do you think ?

Check this out ! https://github.com/mardon86/RapydScript_onwebpage

So far,

  • i’m loading rapydscript code as string via “xxxx” variable in file mycode.pyj
  • I dont know how to load Rapydscript file automatically via <script type="text/rapydscript" src="mycode.pyj"></script> and treat the code inside as rapydscript code
  • it returns into error when i’m using option “omit_baselib”: false

I’m sure you can do better and i hope you could post official guide to embed rapydscript to the webpage

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
adousencommented, Nov 16, 2015

@mardon86 You can take a look at my solution pyjTransformer, compiles .pyj files or rapydscript code to javascript: https://github.com/adousen/RapydScript-pyjTransformer

0reactions
atsepkovcommented, Oct 13, 2016

If you’re compressing the files individually, you’re either using an outdated version or not doing something right, https://github.com/atsepkov/RapydScript/blob/master/lib/rapydscript.js is the only file you should be minifying and it’s also the only file you need (baselib, utils, ast, output, tokenizer are all intermediate files now). RapydScript itself is both a compiler and a minifer, so the easiest way to minify it is to open src/self.pyj, remove the line that says beautify: True and recompile twice (first time for the compiler to recompile its self-compilation logic and second time to actually apply it). I’ll also modify the code in a bit to accept -p option for --self.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Embedding Rapydscript - Google Groups
Hi! Coding Python with switching to coding JS - really painful. So, I tried Rapydscript (RS) and I like it very much! Unfortunately,...
Read more >
Using RapydScript-ng in the browser · Issue #12 - GitHub
I'm the developer of glowscript.org, which uses Tsepkov RapydScript to permit users to write Python programs that generate real-time ...
Read more >
Embedding Python Code into Webpage | PyScript - YouTube
In this Video , we will be embedding Python Code into a Webpage via PyScript Framework #pyscript #python #code #developer # webpage #anaconda ......
Read more >
How To Embed A Vpython On An Html Page? - ADocLib
Go to the Anaconda web site and using the Products. ... Library on Programs can be written in JavaScript or RapydScript or they...
Read more >
New website for RapydScript, the pythonic javascript. - Reddit
141 votes, 36 comments. 1.1M subscribers in the Python community. News about the programming language Python. If you have something to teach others…...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found