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: […]
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.
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
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: http://en.wikipedia.org/wiki/Same_origin_policy). In the end, we chose to use our existing Mako […]
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 […]