Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7892405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:51:41+00:00 2026-06-03T06:51:41+00:00

I am trying to execute simple JavaScript code in a pure Python environment (Google

  • 0

I am trying to execute simple JavaScript code in a pure Python environment (Google AppEngine).

I’ve tried PYJON, but it does not seem mature enough for real use(it does not handle eg forward referenced functions or do-while and it hangs on array usage).

One idea would be to use pynarcissus to convert JavaScript into a syntax tree and than convert this tree jnto a Python AST which could be compiled into Python bytecode.

Has anybody done this before?
Any problems with this idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:51:42+00:00Added an answer on June 3, 2026 at 6:51 am

    I did something similar using ply, for VBScript and for a new language I’ve been working on for a while, but instead of building the AST and then convert to a Python AST, I’d build the Python AST straight on, using its node classes and occasionally subclassing and overriding some that wouldn’t fit particularly well.

    Since you can rely on pynarcissus to build an AST for Javascript, converting the AST is probably easier, but I think it’s worth checking if using its parser to build a Python AST isn’t a better approach.

    There are no inherent problems with this approach, as far as I know, as long as the languages can be syntactically reduced to a common dialect. It’s hard work, but it can be done. I did this because I didn’t have a parser available and writing one to just build an AST would make no sense. For VBScript I was dealing only with recorded macros, so code was very stable, mostly one-liners.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I`m trying to execute linux commant 'cat' from java code, but it does not
I am trying to execute simple system command via my servlet on google app
I am trying to execute a simple bit of jQuery or JavaScript once logged
I'm trying to execute a simple example of Multicast sockets on Java. MulticastSocket s
Hi guys i am trying to create one simple make file and execute in
I'm trying to execute this code (this is a minimal sample in order to
I'm trying to execute a SQL command, but I just can't find out why
I'm trying to execute my controller from javascript using jquery... here is my jquery
I am trying to do a simple application using Ajax and servlet. But when
I've been programming for a few years but I'm new to JavaScript. I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.