Giter Club home page Giter Club logo

py2js's People

Contributors

certik avatar jonathanfine avatar mattpap avatar neppord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

py2js's Issues

setup.py

Making py2js setup.py installable would make it easier to try out deploy etc.

strings with """ have to convert all " into ' or prefix it in js

E.g. this fails:

"""
Returns True if "e1" intersects any edge from "edges".
"""

because it produces this:

a.js:159: SyntaxError: missing ; before statement:
a.js:159: "\n" + " Returns True if "e1" intersects any edge from "edges".\n" + " ";
a.js:159: .................................^

list.index() fails for tuples in tuples

js> t = list([tuple([0, 1]), tuple([1, 2])])
[(0, 1), (1, 2)]
js> t
[(0, 1), (1, 2)]
js> t1 = tuple([1, 2])
(1, 2)
js> t1
(1, 2)
js> t.index(t1)
uncaught exception: ValueError: list.index(x): x not in list

and the problem is that:

js> t1 == t1
true
js> t1 == tuple([1, 2])
false

the last statement should return true

integrate the extjs branch

call extjs js files over the web, make it a nice example with a menu bar, some call backs and drawing canvas, all in python.

problem with str.replace

Hi, I have a problem with generated code failing with TypeErrors.
The problem while processing a string, when I try to do the following operations:

s = "Test String"
s = s.replace("Test", "New Test")
s.find("Test") # TypeError: s.find is not a function

I don't know much about javascript, but it looks to me that this is because _str.prototype.replace in py-builtins.js doesn't wrap it's result in str before returning it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.