Tag Archives: javascript

Inside Look – pyjs

Although not directly affiliated with my own personal project, I still want to try making some posts about interesting Python things I run across and use. Today’s Inside Look is about pyjs! I mentioned it in my last post, but I wanted to give a little more insight into it and why I have been using it.

Now that I’ve been working on some web development, I was thinking my only options would be Javascript and some CSS. I started doing some self-learning to review what Javascript I knew, but for what our team wanted to do, it felt so cumbersome and difficult to will the code to my expectations. This spurred me on to look for some alternative, maybe a way that I could stay with Python, but have all power and control that Javascript has. I nearly immediately ran into pyjs, the Python web app developer’s best friend. It quite literally converts your written Python code into Javascript. There is a large support for most of Python’s built-ins and most imported modules seem to work just fine. I’ve had some issues with using time.sleep(), but I may just be doing something wrong. Pyjs also includes its own module which contains a large amount of UI classes to use and expand upon.

I’ve been designing the prototype for the game using Panels. These are simply cells in a table. Eventually, I would like to progress to using the Canvas. This will probably require more art assets (just basics available right now) and some re-organizing of existing code to be more Canvas, less table. I’m having a meeting tonight with the three other team members to go over weekly progress and what we’d like to focus work on. Hopefully we can get a place to host our app (we’re looking at Chrome Web Store) so we can get testing on multiple platforms and make it easily available for people to play!

If pyjs just isn’t flexible enough or proves to much of a hurdle just to use Python, we may eventually switch over to Javascript. At least transferring Python over to Javascript will be easy!

Tagged , ,
%d bloggers like this: