sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get remove nodejs nodejs-dev npm
sudo apt-get install nodejs
Installing Python on Windows is a bit more laborious than on Mac or Linux, because there’s a bit of manual configuring to do. Here’s an installation checklist to go through to get it done so that you have IPython ready, and you can install packages from PyPI. These instructions are for Python 2.7. Continue reading Python 2.7 Windows Installation Checklist
In this article I will show you how to use the Sonera CStream Messaging Web Service API to send an SMS using Python, and a library called SUDS. The CStream API is two-way service for both sending and receiving messages. You obviously need to pay for the service to get access. After you have your credentials, you can start using the service.
The SUDS is a lightweight SOAP Python client for exploring and using web services. A recent version can be installed on Debian based distros with “sudo apt-get install python-suds”, or on almost anything with “pip install suds”. Continue reading Sonera CStream Messaging Web Service API with Python and SUDS
In process shell for introspecting a running Python process:
The reverse is also possible. You can push messages from web browsers directly into the RabbitMQ routing system. This article, though, will discuss the former case, from server to client. The infrastructure required for the latter case is the same, with nothing extra needed. Continue reading Web Messaging with RabbitMQ-Web-Stomp and SockJS
In part I, we learned how to configure Apache to server any .py file as a web application using mod_wsgi. I promised to tell you more about WebOb and multiprocessing and multithreading, and exception handling. I’ll save those topics for later articles. Instead, in this part I will talk about using mod_rewrite – if, why and how to get rid of the .py extension. You will need the test apps from part I to try these out. Continue reading Serving Python scripts with Apache mod_wsgi, part II – mod_rewrite
I admit it, I’m a long-time PHP programmer. I got stuck with it for a long time with all my web-based stuff, simply because it is so easy to set up. Well, there is no set-up, it just works. You just add pages to your web server root and give a .php extension to them, and they get requests and give back responses. Nice and simple.
I still use PHP for quick and dirty things (like running shell commands through web interfaces – yes, really, really naughty…) For doing more complex work, I prefer Python. But I miss the PHP-like way of just adding pages or “web applications” with zero-setup. I will examine the possibilities in Python for this kind of behaviour in this article.
Please remember, there are many, some say even too many, Python web frameworks available already that handle all this stuff for you “automagically”. You are almost certainly better off with using one of them, if you want to get work done. But they all require some kind of setup work.
Then there’s the thing with all kinds of frameworks, that instead of you calling some library, the behaviour of which you understand, to do your work, a framework calls your code. That is all right when things work as expected. But whenever there are glitches, you need to start digging around the framework code to see exactly what’s wrong. And if it is a big framework, that could mean a lot of digging around. For that reason, if you’re a reasonably seasoned programmer, I think it might not be half bad an idea to create your own minimalistic framework, using existing, good quality libraries the behaviour of which you understand, and which you can easily poke in the Python shell if you think something’s not working like it should. Or just to see what’s available, and try out the available code.
Also, knowing how stuff works never hurts. This article is also about learning how the Apache http requests are dispatched to Python code through mod_wsgi. I insist on knowing how things work, so I’m doing it the hard way. Continue reading Serving Python scripts with Apache mod_wsgi, part I
As a first excercise in creating WordPress plugins, I decided to write an extremely simple widget which can be used to lure spammers’ address harvester bots to honeypots, for example ones set up using the Project Honey Pot web site. If you want to help fight spam, just sign up for free at their page and follow the instructions. You can add your honeypot to your WordPress site using the Hunajapurkki widget. Continue reading Hunajapurkki: A honeypot link widget for WordPress
In Eclipse 3.8, installing the Android Development tools may fail with the following error:
Cannot complete the install because one or more required items could not be found. Software being installed: Android Development Tools 0.9.9.v201009221407-60953 (com.android.ide.eclipse.adt.feature.group 0.9.9.v201009221407-60953) Missing requirement: Android Development Tools 0.9.9.v201009221407-60953 (com.android.ide.eclipse.adt.feature.group 0.9.9.v201009221407-60953) requires ‘org.eclipse.wst.sse.core 0.0.0’ but it could not be found
I was not able to compile PHP 5.2.6 with IBM HTTP Server 6.1 as a module, so I compiled it as a CGI binary instead. Here’s how to do it. Continue reading Installing PHP 5 on AIX using IBM HTTP Server