After having a few un-expected power outages this year, it got me thinking about how I could easily (and cheaply) be alerted (preferably via SMS) should one occur. With a laptop running Linux, a little bit of Python and some easily obtainable hardware and software, I come up with a simple method of doing just that. Read on for the code and set-up instructions. Continue reading
bpython is a Python interpreter interface on steroids! It’s main features are:
- Syntax Highlighting
- A save function (to save code you’ve entered to a file)
- Auto-intending (we all know how important correct indenting is when you’re writing python scripts!)
- Auto-Completion which displays suggestions for any built-in functions, helping you to get the syntax for a statement spot-on without having to dig through reference manuals. The auto-completion feature also helps with import declarations, showing you a list of available modules as you type.
Installation in Ubuntu is as painless as typing sudo apt-get install bpython Other packages are available for Debian, Fedora and OpenSUSE as well. You can also obtain the source code from here and compile it yourself if need be.
If you need any help with using bpython, then check out the project’s webpage. Hope this is useful to someone.
Happy new year!
Need an accessible guide to learning Python that won’t send you to sleep? “Invent with Python” is just what you need!
Invent Your Own Computer Games with Python, 2nd Edition (to give it its full title) is a book written by Al Sweigart. It is available for free on-line in both HTML and PDF format. You can download the PDF format from here.
The book is released under a Creative Commons licence and is aimed at people who are completely new to programming.
Comprised of 19 Chapters (at the time this post was written), it guides the reader through the basic concepts (Installation of Python, use of the Python interactive shell, Variables, functions, etc) and some of the more advanced stuff as well.
The coding examples in the book are all games (so you can actually have some fun with what you create as you go through the book!), which increase in complexity as the chapters progress.
There is also a Blog related to the book, so you can keep up with any future additions that are made to it.
Found this very comprehensive guide (Link is a PDF document), during my travels on Google, showing how to perform bit-level operations in AVR C. Hope it’s useful to someone.
If you’ve not got a PDF reader to hand, then you can use Google’s Quick View link to this guide to view it in your browser
Want a great way to learn a programming language and have some fun? Why not take the Python Challenge. Just found out about this little gem on hackaday and thought I’d post it here to help spread the word.
The Python Challenge site consists of a series of levels ( 33 levels at present) in which you have to solve puzzles of increasing complexity using code you write yourself. Each puzzle solution then gives you access to the next level.
The site also has a great community behind it, with forums if you get really stuck and need a hint.