The MagPi issue 7 is out

The MagPi issue 7 has been released. What’s more I have two articles published in this issue: an interview with Mike Thompson who created Raspbian, and my first ever published computer program! I took over The Python Pit this month to demonstrate how one can implement command line arguments to make configuring an application that is about to be run easier than having to manually edit the program code.

I am especially pleased with the program I wrote as it generates graphical output (see image below) that I used to draw by hand when I was a child. Back then I don’t even think it occurred to me to write a program to do this!

lineimage

The program supports a number of command line arguments to change the output. Run:
line_generator.py -h
to see all of the options.

For your viewing pleasure, here’s the output of the above:

usage: line_generator_edit.py [-h] [-s SCALE] [-t STEP] [-r {y,n}]

Render shape

optional arguments:
-h, --help show this help message and exit
-s SCALE Render size, default=2, 200x200px)
-t STEP Step value (default=5): lower the value for denser lines
-r {y,n} Render line by line (slower) (y) or only display finished object
(faster) (n)? (default=y)


Comments