Wednesday, October 22, 2014

Monday, August 4, 2014

Python for CSharp devs, Winston-Salem

From twitter



@f_dion

Friday, July 18, 2014

Tiny & Teensy: Some new stuff!


Objects in mirror are smaller than they appear

Shrink-ray

The Raspberry Pi is pretty small, even in a case. The new model B+ (pictured on the left) allows for a slightly smaller case size. Gone is the composite, but there are way more GPIO pins available through a 40 pin connector, and 4 USB ports are included. It does mean that you will need a redesigned case for the new model B+. Oh, and gone is the SD card sticking out, waiting to be bent out of function. The B+ has a micro SD slot.

I'll post more details as I explore the changes, and what it means for python modules and the GPIOs.

Smaller than tiny

At the last Project night, I worked on getting micro python compiled to install on the Teensy v.3.1 (pictured on the right). This is much smaller than I was expecting.

BTW, this only has 64KB of RAM, which is what an Apple ][e had way back when... And 256KB of ROM. But did I say Python??? Yep. I'll post a step by step pretty soon.


Thursday, June 19, 2014

South East Linux Fest, Python Represent

Friday


I'll be presenting at South East Linux Fest (SELF) 2014. According to the final schedule, it is tomorrow, Friday the 20th at 4PM. Right after that will be a BOF in that same room. Come by and talk *nix and Python.

Last year Python was pretty much absent from the conference. Yet it is quite focused on security, and Python is just the right tool for that kind of stuff.

Brousse


That's one project among many I'll be talking about, bringing computing education to people who are usually left without.

Keep an eye on my twitter account and this blog for details. The core of the talk is about Brython.

Video


Apparently, videos of talks will be available after the conference.

@f_dion

Tuesday, June 17, 2014

Slowing down time

Is there a machine?


Quite frankly, that's the only way I'll be able to get back into my old posting habits, if I can slow down time...

So, just briefly, tomorrow is project night in Winston Salem: http://www.pyptug.org/2014/06/june-project-night.html

James is bringing a Parallela. Markus will probably have a Beaglebone black. And I'll have a Raspberry Pi. Perhaps some of that + duct tape and I can build a time lapse machine! (Nothing nefarious, in reality, just a security cam to keep an eye on the entrance, so visitors to the project night dont have to wait to long for somebody to come and open the door...)

Micro Python


While on the subject of embedded devices, what do you all think of micro python?


@f_dion

Tuesday, March 25, 2014

Upcoming Python talk

Brython: Not Celtic, Pythonic!


Over the past few years, I've had a few A-Ha! moments, as I host project nights, mentor individuals and conduct workshops.

The latest was in front of a large classroom. That's when I realized I didn't have to explain what a shell or a command line was. So what is the Python punchline? It is one of the many anecdotes I'll cover in my talk @ TriPython this week in the Raleigh / Durham area of NC.

What

TriPython March meeting

Where

Bull City Coworking location detail

When

Thursday, March 27th
7PM


Fran├žois
@f_dion

Sunday, February 9, 2014

Python everywhere: #Brython 2.0

 It's alive


Wow, 15 months later and we are at Brython 2.0!

Changes in Brython version 2.0-20140209-164925



Backwards-incompatible change

=============================
For the sake of namespace isolation, by default, the name of functions and classes defined in Brython are no more available in Javascript global namespace. As a consequence, functions can't be called as event callbacks from HTML tags. For instance, if a function echo() is defined in a Brython script, the following inline code :

    <button onclick="echo()">

will result in a Javascript error such as "name echo is not defined" when the button is clicked

The solution is to define the event callback inside Brython code. The button must have an id :

    <button id="echo">

and the Brython code must include the line

    doc["echo"].bind("click",echo)

Alternatively, to force the name "echo" into the global Javascript namespace, add it as an attribute of the window object :

    from browser import window
    window.echo = echo


Features

========
  • - namespace isolation : in previous versions, the names defined in Brython core scripts were included in the global Javascript namespace, raising risks of conflict with names defined in Javascript programs or libraries. In this version, the only names included in the global Javascript namespace are __BRYTHON__ (used internally) and brython(), the function called on page load
  • - implement sys.implementation with values adapted for Brython
  • - allow syntax del (x, y, z)
  • - use Dan McDougall's pyminifier to reduce size of py_VFS.js
  • - make_dist generates a script brython_dist.js that can be used as a standalone distribution on a centralised server.

Demos

=====
  • - add drop files demo (by Glenn Linderman) and French Python course (using module slideshow) to the gallery

Imports

=======
  • - improved version of py_VFS.js by Billy Earney. py_VFS compiles the standard library to make imports faster. Now packs Python source with JSON instead of base64

Built-in modules

================
  • - browser : add attributes "window" and "document" as alias of respectively "win" and "doc"
  • - add a module browser/slideshow for PowerPoint-like slideshows in Brython, using a custom file format

Bug fixes

=========
  • - issue #174 : string format character % has wrong precedence
  • - issue #175 : Functions should return None by default
  • - issue #183 : re.findall() broken
  • - issue #198 : operator precedence not defined for << and >>
  • - issue #206 : add <noscript> in case Javascript is disabled
  • - issue #208 : bug with try / else
  • - issue #209 : bug in ternary operator
  • - function definions must be evaluated only once, upon function definition
  • - bug with del a[:]
  • - bug with dir() called without arguments
  • - bug in map()
  • - bug with "func(x=1,)" ; "return +x" ; "func(10*-x)"
  • - bug in divmod and round
  • - bug in local_storage method keys()
  • - add attribute __doc__ to class and instance methods

Documentation

=============
  • - updated with the changes introduced in this version
  • - add documentation for the built-in module javascript
  • - translation in Spanish updated by Kiko Correoso