There is a typo in pyjs.py file:
builtins = open(os.path.join(os.path.dirname(__file__)), "py-builtins.js").read()
builtins = open(os.path.join(os.path.dirname(__file__), "py-builtins.js")).read()
Thank you very much for reporting this! As it happens, I am no longer associated with qsnake/py2js since we had a difference of opinion in which way to take the project. Therefore I maintain a fresh branch over at https://github.com/chrivers/pyjaco, where many new features are implemented and this bug is fixed.
However, I would like to point out that I am NOT the primary author of qsnake/py2js, but I am one of the lead devs on pyjaco. I wish py2js all the best. I merely want you to know that alternatives exist :-)
Could you give some examples of the problems you have had? I'd like to make sure they are fixed :)
Also, keep in mind that by now, py2js and pyjaco are totally different projects. Things might work better in one or the other, as they have different goals.
Fix a typo (closes #20)
Hi @fdev31, thanks a lot for reporting the bug! I've just fixed it. Let us know if you find more bugs, feel free to also send us pull requests.
@chrivers, good luck with your new project. I would suggest you to delete and repush your repository, so that github doesn't show that it is forked from py2js, so that people are not confused which project is which.
Thanks for the reactivity!
If I want to understand the main differences between py2js & pyjaco, where should I look ?
Thank you for your interest. Broadly speaking, the projects are very different by now, but I know that pyjaco is more centered on providing a real Python experience with pythonic types, classes and libraries.
You can learn more at our homepage: http://www.pyjaco.org/
And you are very welcome to join our google group (info on the homepage), and/or email me if you have questions.
The main github source repository is:
I think we should keep further discussion of pyjaco away from py2js. It wouldn't be fair to Ondrej if I just invaded his repository comments with mentions of my own project :-)
Thanks for your words about pyjaco. Let my clarify the goals of py2js (you were not exactly precise above).
I don't want to interpret the goals of pyjaco, but from what you wrote I think your goals are the same as ours. So I would say that the main difference is that pyjaco is developed mainly by @chrivers, while py2js by @certik. We were not able to work together on one project, so that's why there are two projects with almost the same goals.
Ondrej, apologies if I misunderstood the goals of py2js. I did not intend to misrepresent it.
I would love to work with you on py2js/pyjaco, if you are interested? In that case I think we should set up a pyjaco group on github to host the repository, so it can be shared by all involved.
I say "pyjaco" only because pyjaco is hundreds of commits ahead of py2js. It would be a common project, of course. What do you think?
I can tell it was about "str" type, passed as argument to some jQuery functions required a String() cast :(
Some syntax is now allowed like the "$" sugar, but I suppose it's not an important issue.
try/except not being support sounded rude to me also :P
For lambdas & co, I think that was acceptable, but with some possible improvements I can't remember anyway.
About the fight of egos, that's so "classic" , I just can tell trying to work together is always more difficult.
At the end, people trying to conciliate may achieve a wonderful project, but those fighting alone rarely survive to the lack of energy and just do toys.
It's quite known that having divergent opinions it pretty god for the target : the final quality raises automatically
Sorry if I sound direct since we don't known each-other but try once more to work on a "merged" project if you think that is possible. If it's just marketing or implementation issues, then it's easy to make things better instead of different.
And be positive: you have a chance to get a real contributor to your project ! ;P
fdev31, thankk you for your comment.
In fact, I'm using pyjaco for a jQuery project right now, so it is possible :)
So instead of using
I can just use
This works, I use it myself. Oh, and try-except is most definitely supported, in both projects I believe :)
I think we would both love the idea of having you contribute to "a / the / our" project, and I certainly would never exclude anyone. Because github as a standard course of action asks people to fork projects, it just sort of happened. I started contributing to py2js, but we wanted our forks to go in different directions.
Ondrej, what do you think?
Heh, I was talking as both of you as "contributors" of each-other ;)
I understood about the "$" limitation, that sounded "obvious" but still a theoretic bug since it can mask some js behavior.
Btw, from what I remember, I didn't try the js() function, that may explain some of my difficulties ;)
Forking of course is an option, with regular merge, but since, the differences only sounded "technical" but I suppose big part of the code base could be at least shared.
Having a library ? A tool set ? But definitely, having something in common sounds "simple".
If you both have strong vision on a project, trying to collaborate can give birth to something even stronger, don't you think ?
About the current goals, sorry If I understand badly, can I summarize to: