All posts tagged: Python

Install Python 2.7.2 from source on Ubuntu 10.04 LTS

Leave a comment
Linux / Python

The first thing I did was to create a wwwuser that I plan to run pyramid under. As a result, I am intentionally installing Python 2.7.2 under only 1 user account, and am leaving the system wide python installation unchanged. useradd wwwuser passwd wwwuser cd /home mkdir wwwuser chown wwwuser:wwwuser wwwuser Copy all of the hidden files into the /home/wwwuser folder. I did this from my desktop files. vi /etc/passwd Update the shell to be: […]

Install Tornado on Windows 7

comments 9
Python / Tornado

Please see my prior post on how to Setup virtualenv on Windows. Open PowerShell, then enter the following commands: cd C:\Python27 .\env_tornado\Scripts\activate.bat .\Scripts\easy_install.exe pip pip.exe install tornado -E .\env_tornado   If you want to install in the global site packages, then skip pip above and use: .\Scripts\easy_install.exe tornado That’s it. Time to start writing code.

Setup virtualenv on Windows

comment 1
Python / Tornado

I’m going to assume you have Python 2.7 correctly installed on Windows at C:\Python27. These instructions are applicable to Windows XP and Windows 7.   Open Windows PowerShell, then enter: cd C:\Python27 .\Scripts\virtualenv.exe –no-site-packages env_tornado And now to activate the new environment: .\env_tornado\Scripts\activate.bat The new virtual environment is now setup and ready for use

Output XML using Pyramid and Mako

Leave a comment

I recently had to connect a .NET desktop application to a web service that was built using Pyramid. My first thought was to use JSONP. However, JSONP is only useful for small amounts of data‚Ķand I had a lot of data to send/receive. Obviously, communication via an XmlHttpRequest with JSON was not an option due to limitations imposed by the Same Origin Policy (ref: In the end, we chose to use our existing Mako […]

Naming standards and consistency

Leave a comment
Software Development

I’m a big proponent of keeping a consistent naming standard, even when crossing languages. True, capitalization and syntax may change, but the standard should remain. Importantly, I have found that naming should play to the strengths of the operating system. File Names For example, on every operating system you can sort files by name (i.e. in Windows Explorer on Windows, Finder on Mac, and so on for Linux, etc.). With this in mind, naming should […]