Progress so far

I've been pretty busy so far doing laying the groundwork for my audiovisual project. I've got the architecture worked out, so ones this stage 0 is complete I can start coding it. Uploaded, 2 videos using shoebot... 4 others waiting to be uploaded. Soft Released: vext https://github.com/stuaxo/vext This makes it easy to use things like wx, gtk, pyqt4 and other, mostly Gui and older Audio libraries in virtualenv. Have been using this successfully with Shoebot for a while. Python 3 support is still TODO, at which point can do a proper release. Working on: Finishing off a tool to make videos with 🙂 Learning About: Bezier Curves (have a Gtk demo app waiting to be uploaded) [Blocking on app to create videos] Cairo OpenGL PPA: Built a Docker Image that can build debian packages, this needs completing so they can be signed and uploaded to the PPA.

Wifi + Moving Country

If you are on linux and having trouble with WIFI in a new country it might be worth letting it know what country you are in - on debian/ubuntu edit the file /etc/default/crda and update the country code.

Daily graphic 2

Todays daily graphic I'm getting familiar with grids (in shoebot), Vector maths from the planar library .. this started from the grid example from shoebot / nodebox.

Shoebot Code Below the fold
(more…)

Everyday graphic

Not sure how practical it is, but will try and upload a new graphic everyday .. to start with will probably be quite basic 🙂 Here is the first, some moving granular thingies..

 

Shoebot code:

import random
from math import sin, cos

size(800, 800)
colours=ximport("colors")


def draw():
    background(colors.aliceblue())
    scale(1, 1)
    nostroke()
    fill(0.1, 0.2, 0.3)

    random.seed(0)
    for y in xrange(0, HEIGHT, 80):
        wiggle = sin(FRAME * 0.1)
        xs = 2.0 + (cos(y * 0.1) + sin(y) * 8.1)

        distance = 1.0 / HEIGHT * y
        fill(1.0, 1.0-distance, 0, distance)
        for x in xrange(0, 60):
            xpos = ((xs * FRAME-x * 40) % (WIDTH + 40)) - 20
            circle(xpos, y + (wiggle * random.random() * 20.0), 20 + (wiggle * 2.0) * distance * 8.0)

        #xs = -sin(y) * 4.0
        #for x in xrange(0, 60):
        #    circle(WIDTH-xs * WIDTH - FRAME + x * 40, y+40, 20)

To run this, install shoebot and type: sbot -w granuals.sbot

Workflow for debugging issues on python on windows with a VM

Recently I had to look at an issue where the behaviour on windows was subtly different to that on linux... unfortunately most potential users are on Windows so it's not good enough to just write them off 🙂

This workflow was quite good for checking python internals on different versions of python and being able to revert things easily.

To get things going quickly I use the IE11 VM from microsoft, and download from xdissent

https://github.com/xdissent/ievms

That way you just need to enter a command to download it

curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="11" bash

Next I install all the tools I need before python (we will save the state of the VM before then).

chocolatey.org makes installing tools easy*

https://chocolatey.org/

Open a command Window as Administrator then install chocolatey:

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Once thats done you can install tools you need - I install everything *except* python:

choco install git conemu

While these are installing start the downloads for python and it's C compiler (remember not to install them yet):

Grab python from here:
https://www.python.org/downloads/

For python 2.7.x you will probably need the VC compiler
http://www.microsoft.com/en-gb/download/details.aspx?id=44266

My app was for PyGtk so I also downloaded that - download anything else you need at this stage.

Download your project...
Using git or whatever, grab your own project to a directory.

Save the VM state.
In virtualbox save the machine state, I called mine 'Tools Installed'.

From here you can install python + know that you can poke around in the internals, any time you want to check against a different version, just revert the VM to the previous state.

 

TL;DR - Install all tools except python, grab projects, SNAPSHOT, install python - find bugs.

*when it works.