What can pyjs do for me

157 views
Skip to first unread message

Richard Eng

unread,
Feb 29, 2016, 9:39:20 PM2/29/16
to Pyjs.org Users
What's a great example of a production pyjs web application that showcases pyjs? A URL would be nice. Thanks.

Adrien

unread,
Mar 1, 2016, 5:20:54 AM3/1/16
to pyjs-...@googlegroups.com
Hi,

On 01/03/2016 03:39, Richard Eng wrote:
> What's a great example of a production pyjs web application that
> showcases pyjs? A URL would be nice. Thanks.

We are developing Libervia with Pyjamas (the initial project from which
pyjs forked): https://libervia.org

This is an example... great or not? This is left to your judgement :)

BTW Pyjamas is dead and pyjs is slowly dying. I would not advice to
start a new project with it. People here would probably recommend you to
have a look at Brython: http://brython.info

Regards,
Adrien

Richard Eng

unread,
Mar 1, 2016, 7:55:21 AM3/1/16
to Pyjs.org Users, soul...@mailoo.org
Okay, what's a good example of a Brython web app? ;-)

Richard Eng

unread,
Mar 1, 2016, 10:56:19 AM3/1/16
to Pyjs.org Users, soul...@mailoo.org
Is Brython really the only good Python-to-JS solution? I'm having difficulty identifying the good ones from this list.


On Tuesday, 1 March 2016 05:20:54 UTC-5, Adrien wrote:

Steve Waterbury

unread,
Mar 1, 2016, 11:23:23 AM3/1/16
to pyjs-...@googlegroups.com
I think it's the only solution for now -- the problem is that it
has severe performance problems that make it impossible to use
for real js applications. Hard to tell if that will be fixed.
Pyjamas was the best until it was essentially murdered.

On 03/01/2016 10:56 AM, Richard Eng wrote:
> Is Brython really the *only* good Python-to-JS solution? I'm having
> difficulty identifying the good ones from this list
> <https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js>.
>
>
> On Tuesday, 1 March 2016 05:20:54 UTC-5, Adrien wrote:
>
> Hi,
>
> On 01/03/2016 03:39, Richard Eng wrote:
> > What's a great example of a production pyjs web application that
> > showcases pyjs? A URL would be nice. Thanks.
>
> We are developing Libervia with Pyjamas (the initial project from which
> pyjs forked): https://libervia.org
>
> This is an example... great or not? This is left to your judgement :)
>
> BTW Pyjamas is dead and pyjs is slowly dying. I would not advice to
> start a new project with it. People here would probably recommend
> you to
> have a look at Brython: http://brython.info
>
> Regards,
> Adrien
>
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Pyjs.org Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pyjs-users+...@googlegroups.com
> <mailto:pyjs-users+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

wb

unread,
May 24, 2016, 1:34:53 PM5/24/16
to Pyjs.org Users, soul...@mailoo.org
I tried to port my Pyjs project to Brython recently, and it failed because Brython was terribly slow.  Just loading library took more than 10 minutes and my web browser died due to memory problem in Brython.  Beside speed, Brython seems to have a big problem in memory management. So, I had no choice but to coming back to Pyjs. I think that Brython may be good for a small-sized project, but not for a big project.

Pyjs has advantages compared to Brython as follows:

1. Pyjs compiles Python to Javascript offline. So, loading and execution speed is fast especially when source size is big. 

Brython converts Python source to Javascript during runtime. Theoretically, loading and compiling Python code is faster than loading compiled javascript code in the low speed Internet. But in reality, this conversion is very slow consuming a lot of memory when source size is big. 

2. Python source code is not exposed to public

The compiled Javascript by Pyjs is complicated enough to hide Python source. It is not perfect protection compared to compiled byte-code. But it is a lot better than most obfuscation software available for Python. If you use Brython, your source code is literally exposed to public.

3. Pyjs is designed to support MVC(Model-View-Controller)

Thanks to MVC, You don't have to write HTML code and you can reuse existing module and class easily. Brython is designed mainly to replace Javascript, and you have to write html code undermining reusability and unreadability.

4. Pyjs has desktop solution

Brython is a brwoser-only solution.  On the other hand, Pyjs' desktop solution makes debugging easier though not perfect.

I hope to see further improvement of Pyjs.  Brython will not be able to replace Pyjs in the near future due to the fundamental differences listed above.  Pyjs is the only solution for my project so far.


2016년 3월 1일 화요일 오후 7시 20분 54초 UTC+9, Adrien 님의 말:

Adrien

unread,
Jun 9, 2016, 3:11:58 PM6/9/16
to wb, Pyjs.org Users
Hi,

On 24/05/2016 19:34, wb wrote:
> I tried to port my Pyjs project to Brython recently, and it failed
> because Brython was terribly slow.

I though that they had recently improved the performance, but apparently
not enough :-(

> 2. Python source code is not exposed to public

This is no good argument to me. You are free to pre-obfuscate and minify
the code if you want.

> 3. Pyjs is designed to support MVC(Model-View-Controller)

This is an advantage and an inconvenient at the same time. Although the
graphical library is nice to have, I think that it is sometimes better
to dive in your HTML and CSS. One main problem of Pyjamas is IMHO that
it does everything with tables and this is not flexible at all. To
rewrite the library for producing div using flexbox instead of tables
would probably be a nice step.

Anyway we can talk about this and that but the main issue is that nobody
is taking care of pyjs anymore, and especially in web dev it is
difficult to maintain and improve your stuff without using new
techniques. For example, the output that is produced for each target
browser is probably full of hacks but how useful are they if they have
been made for a browser version that nobody uses anymore (not the case
yet, but it will eventually be)?

Here are a list of issues that we encountered with Pyjamas, some are
specific to the project but you can see some incorrect behaviors with
decorators, inheritances and other stuff that are annoying us:
http://wiki.goffi.org/wiki/Issues_with_Pyjamas/en
Who will fix these issues? I unfortunately can't. We have been hoping
for long to see a pyjs/pyjamas relaunch but it's not going to happen,
that's why I prefer to find a more or less similar project with a larger
and more dynamic community.

Regards,
Adrien

Lex Berezhny

unread,
Jun 9, 2016, 3:43:21 PM6/9/16
to pyjs-...@googlegroups.com
On Thu, Jun 9, 2016 at 3:11 PM, Adrien <soul...@mailoo.org> wrote:
We have been hoping for long to see a pyjs/pyjamas relaunch but it's not going to happen, that's why I prefer to find a more or less similar project with a larger and more dynamic community.

As a purely volunteer project the scope of pyjs is too great. Someone would have to get hired by a company that will pay them to work on pyjs at least part time for serious progress to be made.

Hoping won't accomplish anything.

Adrien

unread,
Jun 9, 2016, 3:53:08 PM6/9/16
to pyjs-...@googlegroups.com
On 09/06/2016 21:43, Lex Berezhny wrote:
> As a purely volunteer project the scope of pyjs is too great. Someone
> would have to get hired by a company that will pay them to work on pyjs
> at least part time for serious progress to be made.
>
> Hoping won't accomplish anything.

I do agree with you and I hope (*) that you didn't feel offended. I was
expressing what I believe is a realistic point of view, but not to say
"this should be done" - it is self understood that whatever people do as
volunteers is more than what we have to expect from them :)


(*) again... I may hope too much!

Mark Lockett

unread,
Jun 10, 2016, 10:38:07 AM6/10/16
to Pyjs.org Users, soul...@mailoo.org
I've been using PYJS quite a bit for projects over the last two years. I find it's great until you hit a problem of something that is available in normal Python but not in PYJS. I have had this happen with defaultdict and SHA256.

I'm not so sure that PYJS needs full time work, even small contributions would be useful.

Mark

Lex Berezhny

unread,
Jun 10, 2016, 10:42:52 AM6/10/16
to pyjs-...@googlegroups.com, soul...@mailoo.org

In order to get people to consider it for new projects pyjs needs to support Python 3.

At this time even Python 2 is not fully supported.

To get pyjs to fully support Python 3 would be a big effort.

--

---
You received this message because you are subscribed to the Google Groups "Pyjs.org Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyjs-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages