Saturday, August 22, 2009

Drupal to Wordpress migration and sitemaps generation

For a website that I'm managing with friends I am planning to migrate from Drupal to Wordpress so I have used the following link that describes a nice way how to do it.

Note: everything done here has been made on a server running Ubuntu.

Then I have installed the Sitemaps generator plugin for wordpress.

After the configuration of the plugin I have encountered several issues.

The first one was that the plugin was not able to generate the sitemaps file for my blog (6000 posts) and was returning the following error :

Fatal error
: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/xxx/public_html/ntfr/wp-includes/plugin.php on line 302

So I first tried to upgrade my Apache configuration by updating the variable memory_limit to 64M in /etc/php5/apache2/php.ini and then restart Apache but I was still facing the same problem.

Then I have tried to add the following code to the wp-config.php file but the problem was still there:
define('WP_MEMORY_LIMIT', '64M');

The next step was to take a look at the plugin code and I have made a change to the sitemap.php file in the LoadPlugin function by upgrading memory_limit to 64M. The code changed is below:


1
2
3 function LoadPlugin() {
4
5 $mem = abs(intval(@ini_get('memory_limit')));
6 if($mem && $mem < 32) {
7 @ini_set('memory_limit', '64M');
8 }
9
10 $time = abs(intval(@ini_get("max_execution_time")));
11 if($time != 0 && $time < 120) {
12 @set_time_limit(120);
13 }
14
15 if(!class_exists("GoogleSitemapGenerator")) {
16
17 $path = trailingslashit(dirname(__FILE__));
18
19 if(!file_exists( $path . 'sitemap-core.php')) return false;
20 require_once($path. 'sitemap-core.php');
21 }
22
23 GoogleSitemapGenerator::Enable();
24 return true;
25 }
26



Thanks to all the changes described above I was able to generate a Google Sitemaps for my wordpress blog but the content of the file was not ok for me due to the fact that last modification of the posts was not correct. The migration from drupal to wordpress is not filling the following fields of the wp_posts table :
  • post_modified
  • post_date_gmt
  • post_modified_gmt
So here is the sql code to that (in my case my server is in Paris but you will have to replace it to your timezone):
UPDATE wp_posts SET post_modified = post_date;
UPDATE wp_posts SET post_date_gmt = convert_tz(post_date, 'Europe/Paris', 'GMT');
UPDATE wp_posts SET post_modified_gmt = convert_tz(post_modified, 'Europe/Paris', 'GMT');

Note: before using convert_tz you will have to setup mysql timezones by typing the following command:

mysql_tzinfo_to_sql /usr/share/zoneinfo/ | mysql -u root mysql -p

Sunday, July 12, 2009

Ubuntu 9.04 and Intel Corporation PRO/Wireless 4965 AG or AGN

Since my update to Ubuntu 9.04 I was experiencing lots of wifi connections problems.

Into the logs I was getting messages such as:
  • Kill switch must be turned off for wireless networking to work.
  • ADDRCONF(NETDEV_UP): wlan0: link is not ready
  • ...
It was really boring but a solution to all wifi connections problems with the "Intel Corporation PRO/Wireless 4965 AG or AGN" controller is available by installing the package linux-backports-modules-jaunty (you will have to add the jaunty-backports repository to your software sources). Then reboot and voila.

Monday, January 28, 2008

My Vim ressource file to work with Pylons

In order to edit files generated by the Pylons framework it is necessary to configure your text editor with the following rules:
  • insert space characters whenever the tab key is pressed.
  • set the number of spaces to 4 whenever the tab key is pressed.
I am using the Vim editor and here is the content of my .vimrc file:

syntax on
set ts=4
set sw=4
set expandtab
set nu
set hlsearch
set ai
set nocompatible
set showmatch

Tuesday, November 06, 2007

Setting-up of Mercurial to track a Pylons project

In order to track the changes in a Pylons project, I will describe here how to do that with the Mercurial Source Control Management system.

First of all, install the Mercurial program on your Ubuntu 7.10:

sudo apt-get install mercurial


Then create a directory for your Pylons projects: for example $HOME/dev/pylons-projects.

mkdir $HOME/dev/pylons-projects


Now you can create a new Pylons project into this directory (for example a project called test_proj):

cd $HOME/dev/pylons-projects
paster create -t pylons test_proj


Here is the print of the last command:

Selected and implied templates:
Pylons#pylons Pylons application template

Variables:
egg: test_proj
package: test_proj
project: test_proj
Creating template pylons
Creating directory ./test_proj
Recursing into +egg+.egg-info
Creating ./test_proj/test_proj.egg-info/
Copying paste_deploy_config.ini_tmpl_tmpl to ./test_proj/test_proj.egg-info/paste_deploy_config.ini_tmpl
Recursing into +package+
Creating ./test_proj/test_proj/
Copying __init__.py_tmpl to ./test_proj/test_proj/__init__.py
Recursing into config
Creating ./test_proj/test_proj/config/
Copying __init__.py_tmpl to ./test_proj/test_proj/config/__init__.py
Copying environment.py_tmpl to ./test_proj/test_proj/config/environment.py
Copying middleware.py_tmpl to ./test_proj/test_proj/config/middleware.py
Copying routing.py_tmpl to ./test_proj/test_proj/config/routing.py
Recursing into controllers
Creating ./test_proj/test_proj/controllers/
Copying __init__.py_tmpl to ./test_proj/test_proj/controllers/__init__.py
Copying error.py_tmpl to ./test_proj/test_proj/controllers/error.py
Copying template.py_tmpl to ./test_proj/test_proj/controllers/template.py
Recursing into lib
Creating ./test_proj/test_proj/lib/
Copying __init__.py_tmpl to ./test_proj/test_proj/lib/__init__.py
Copying app_globals.py_tmpl to ./test_proj/test_proj/lib/app_globals.py
Copying base.py_tmpl to ./test_proj/test_proj/lib/base.py
Copying helpers.py_tmpl to ./test_proj/test_proj/lib/helpers.py
Recursing into model
Creating ./test_proj/test_proj/model/
Copying __init__.py_tmpl to ./test_proj/test_proj/model/__init__.py
Recursing into public
Creating ./test_proj/test_proj/public/
Copying index.html_tmpl to ./test_proj/test_proj/public/index.html
Recursing into templates
Creating ./test_proj/test_proj/templates/
Recursing into tests
Creating ./test_proj/test_proj/tests/
Copying __init__.py_tmpl to ./test_proj/test_proj/tests/__init__.py
Recursing into functional
Creating ./test_proj/test_proj/tests/functional/
Copying __init__.py_tmpl to ./test_proj/test_proj/tests/functional/__init__.py
Copying test_models.py_tmpl to ./test_proj/test_proj/tests/test_models.py
Copying websetup.py_tmpl to ./test_proj/test_proj/websetup.py
Copying MANIFEST.in_tmpl to ./test_proj/MANIFEST.in
Copying README.txt_tmpl to ./test_proj/README.txt
Copying development.ini_tmpl to ./test_proj/development.ini
Recursing into docs
Creating ./test_proj/docs/
Copying index.txt_tmpl to ./test_proj/docs/index.txt
Copying setup.cfg_tmpl to ./test_proj/setup.cfg
Copying setup.py_tmpl to ./test_proj/setup.py
Copying test.ini_tmpl to ./test_proj/test.ini
Running /usr/bin/python setup.py egg_info
Adding Pylons to paster_plugins.txt
Adding WebHelpers to paster_plugins.txt


Let's setup Mercurial configuration file called .hgrc (this step must be done once). This file must be located in your home directory (replace firstname, lastname and example.com by values suitable for you):

echo '[ui]' >> $HOME/.hgrc
echo 'username = Firstname Lastname <firstname.lastname@example.com>' >> $HOME/.hgrc
echo '' >> $HOME/.hgrc
echo '[diff]' >> $HOME/.hgrc
echo 'git = True' >> $HOME/.hgrc
echo 'ignorews = True' >> $HOME/.hgrc
echo 'ignorewsamount = True' >> $HOME/.hgrc
echo 'ignoreblanklines = True' >> $HOME/.hgrc


You are now ready to track your Pylons project thanks to Mercurial.

But as you will discover some files don't need to be tracked. For example Python compiled files that will appear at the first launch of your Pylons project and will be regenerated at each change of your source code.

In order to prevent Mercurial from tracking such files we will setup a .hgignore file in the Pylons project:

cd $HOME/dev/pylons-projects/test_proj
echo 'syntax: glob' >> .hgignore
echo '*.pyc' >> .hgignore


Then we will have to initialize the repository for the Pylons project:

cd $HOME/dev/pylons-projects/test_proj
hg init


You can now check the status of the files tracked by Mercurial for this Pylons project:

cd $HOME/dev/pylons-projects/test_proj
hg status


The result of the last command shows that no file is tracked:

? .hgignore
? MANIFEST.in
? README.txt
? development.ini
? docs/index.txt
? setup.cfg
? setup.py
? test.ini
? test_proj.egg-info/PKG-INFO
? test_proj.egg-info/SOURCES.txt
? test_proj.egg-info/dependency_links.txt
? test_proj.egg-info/entry_points.txt
? test_proj.egg-info/paste_deploy_config.ini_tmpl
? test_proj.egg-info/paster_plugins.txt
? test_proj.egg-info/requires.txt
? test_proj.egg-info/top_level.txt
? test_proj/__init__.py
? test_proj/config/__init__.py
? test_proj/config/environment.py
? test_proj/config/middleware.py
? test_proj/config/routing.py
? test_proj/controllers/__init__.py
? test_proj/controllers/error.py
? test_proj/controllers/template.py
? test_proj/lib/__init__.py
? test_proj/lib/app_globals.py
? test_proj/lib/base.py
? test_proj/lib/helpers.py
? test_proj/model/__init__.py
? test_proj/public/index.html
? test_proj/tests/__init__.py
? test_proj/tests/functional/__init__.py
? test_proj/tests/test_models.py
? test_proj/websetup.py


So we must add these files to the list of files that must be tracked:

cd $HOME/dev/pylons-projects/test_proj
hg add


The result of the last command shows that the files have been added and are waiting to be commited:

A .hgignore
A MANIFEST.in
A README.txt
A development.ini
A docs/index.txt
A setup.cfg
A setup.py
A test.ini
A test_proj.egg-info/PKG-INFO
A test_proj.egg-info/SOURCES.txt
A test_proj.egg-info/dependency_links.txt
A test_proj.egg-info/entry_points.txt
A test_proj.egg-info/paste_deploy_config.ini_tmpl
A test_proj.egg-info/paster_plugins.txt
A test_proj.egg-info/requires.txt
A test_proj.egg-info/top_level.txt
A test_proj/__init__.py
A test_proj/config/__init__.py
A test_proj/config/environment.py
A test_proj/config/middleware.py
A test_proj/config/routing.py
A test_proj/controllers/__init__.py
A test_proj/controllers/error.py
A test_proj/controllers/template.py
A test_proj/lib/__init__.py
A test_proj/lib/app_globals.py
A test_proj/lib/base.py
A test_proj/lib/helpers.py
A test_proj/model/__init__.py
A test_proj/public/index.html
A test_proj/tests/__init__.py
A test_proj/tests/functional/__init__.py
A test_proj/tests/test_models.py
A test_proj/websetup.py


So the last thing that must be done is to commit the files to the repository:

cd $HOME/dev/pylons-projects/test_proj
hg commit -m 'Initial commit'


I invite you to spend some time to learn how to use Mercurial (it's a great tool): you will find lot's of informations on its wiki and and by reading the book Distributed revision control with Mercurial.

Sunday, October 28, 2007

SQLAlchemy installation for Pylons

Most web sites are interacting with a database and the purpose of database handling in Pylons is to deal with the "Models" part of the framework.

Pylons is supporting several ways of handling a database: SQLAlchemy, SQLObject, Python DB-API.

In our case, we will use the SQLAlchemy (Python SQL toolkit and Object Relational Mapper) software.

So I will describe here the way to install SQLAlchemy software into the Pylons installation described previously.

First of all you will have to install Python database modules for the databases you want to use.

Here are the databases that I will use (may be not all) in my next posts:
  • MySQL (needs the installation of python-mysqldb for Ubuntu 7.10).
  • PostgreSQL (needs the installation of python-psycopg2 for Ubuntu 7.10)
  • SQLite (integrated in Python 2.5 supplied with Ubuntu 7.10).

So let's install MySQL and PostgreSQL Python databases modules:

sudo apt-get install python-mysqldb
sudo apt-get install python-psycopg2


Then we can install SQLAlchemy:

easy_install --install-dir=$HOME/dev/python SQLAlchemy


The previous command will print in your terminal some logs like the following ones:

Searching for SQLAlchemy
Reading http://cheeseshop.python.org/pypi/SQLAlchemy/
Reading http://www.sqlalchemy.org
Reading http://cheeseshop.python.org/pypi/SQLAlchemy/0.4.0
Best match: SQLAlchemy 0.4.0
Downloading http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.4.0.tar.gz#md5=c8476f6417a630f36d6046c1faf721e1
Processing SQLAlchemy-0.4.0.tar.gz
Running SQLAlchemy-0.4.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Quoosq/SQLAlchemy-0.4.0/egg-dist-tmp-JjywTd
zip_safe flag not set; analyzing archive contents...
sqlalchemy.databases.mysql: module MAY be using inspect.stack
Adding SQLAlchemy 0.4.0 to easy-install.pth file

Installed /home/dma/dev/python/SQLAlchemy-0.4.0-py2.5.egg
Processing dependencies for SQLAlchemy
Finished processing dependencies for SQLAlchemy


And the last thing that we have to do is to test that SQLAlchemy is successfully installed by launching the Python interpreter and by importing SQLAlchemy:

Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
>>> dir(sqlalchemy)
['BLOB', 'BOOLEAN', 'Binary', 'Boolean', 'CHAR', 'CLOB', 'CheckConstraint', 'Column', 'ColumnDefault', 'Constraint', 'DATE', 'DATETIME', 'DECIMAL', 'Date', 'DateTime', 'FLOAT', 'Float', 'ForeignKey', 'ForeignKeyConstraint', 'INT', 'Index', 'Integer', 'Interval', 'MetaData', 'NCHAR', 'Numeric', 'PassiveDefault', 'PickleType', 'PrimaryKeyConstraint', 'SMALLINT', 'Sequence', 'SmallInteger', 'String', 'TEXT', 'TIME', 'TIMESTAMP', 'Table', 'ThreadLocalMetaData', 'Time', 'Unicode', 'UniqueConstraint', 'VARCHAR', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__path__', '__version__', 'alias', 'and_', 'asc', 'between', 'bindparam', 'case', 'cast', 'create_engine', 'databases', 'delete', 'desc', 'distinct', 'engine', 'engine_from_config', 'except_', 'except_all', 'exceptions', 'exists', 'extract', 'func', 'insert', 'inspect', 'intersect', 'intersect_all', 'join', 'literal', 'literal_column', 'logging', 'modifier', 'name', 'not_', 'null', 'obj', 'or_', 'outerjoin', 'outparam', 'pool', 'queue', 'schema', 'select', 'sql', 'subquery', 'text', 'types', 'union', 'union_all', 'update', 'util']
>>>

To be continued...

Adding of the AddThis widget to my posts

I was looking for a simple way of allowing my readers to bookmark and to share my posts on social bookmarking services and after a quick search on google I have found AddThis.

AddThis offers a widget that handles most of social bookmarking services (Del.icio.us, Digg, Reddit, Facebook, Furl, Ask, StumbleUpon... and more). The service is completely free.

In order to get your widget you will have to register on AddThis website.

After answering a few questions about the type of widget you need, AddThis gives some html and javascript code that you will have to add to your blog or website.

For my blog, I have chosen the drop-down widget that you can see at the end of the posts of this blog.

This is a really cool service that removes all the hassle of adding manualy links to multiple social bookmarking services to your bog posts.

Saturday, October 27, 2007

Installing Pylons as a non privileged user on Ubuntu 7.10

This is my first post about a web framework called Pylons.

I will describe in this post a quick and maybe dirty way of installing Pylons as a non privileged user on Ubuntu 7.10.

The first thing that must be done is to install the following dependencies:
  • python-dev
  • python-setuptools
So launch your favorite terminal an type the command lines below (you will have to supply your password and to answer yes/no questions).

sudo apt-get install python-dev
sudo apt-get install python-setuptools


Then let's setup a development directory for python in your home directory thanks to the following command:

mkdir -p $HOME/dev/python


The next step consists in adding a PYTHONPATH variable and a PATH variable to your .bashrc file:

echo 'export PYTHONPATH=$HOME/dev/python/:$PYTHONPATH' >> ~/.bashrc
echo 'export PATH=$HOME/dev/python:$PATH' >> ~/.bashrc


Now you are ready to install Pylons:

easy_install --install-dir=$HOME/dev/python Pylons


The previous command will print in your terminal some logs like the following ones:

Creating /home/dma/dev/python/site.py
Searching for Pylons
Reading http://cheeseshop.python.org/pypi/Pylons/
Reading http://cheeseshop.python.org/pypi/Pylons/0.9.6.1
Reading http://www.pylonshq.com/
Reading http://cheeseshop.python.org/pypi/Pylons/0.9.4.1
Reading http://cheeseshop.python.org/pypi/Pylons/0.9.6
Reading http://cheeseshop.python.org/pypi/Pylons/0.9.5
Best match: Pylons 0.9.6.1
Downloading http://pypi.python.org/packages/source/P/Pylons/Pylons-0.9.6.1.tar.gz#md5=1341f0ab5680742ff1caa80da10751b4
Processing Pylons-0.9.6.1.tar.gz
Running Pylons-0.9.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-8nbOHD/Pylons-0.9.6.1/egg-dist-tmp-q0L0NN
Adding Pylons 0.9.6.1 to easy-install.pth file

Installed /home/dma/dev/python/Pylons-0.9.6.1-py2.5.egg
Reading http://www.pylonshq.com/download/
Processing dependencies for Pylons
Searching for Mako>=0.1.8
Best match: Mako 0.1.8
Downloading http://pylonshq.com/download/0.9.6.1/Mako-0.1.8.tar.gz
Processing Mako-0.1.8.tar.gz
Running Mako-0.1.8/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6n_ZMr/Mako-0.1.8/egg-dist-tmp-12h9pt
Adding Mako 0.1.8 to easy-install.pth file

Installed /home/dma/dev/python/Mako-0.1.8-py2.5.egg
Searching for nose>=0.9.3
Reading http://cheeseshop.python.org/pypi/nose/
Reading http://somethingaboutorange.com/mrl/projects/nose/
Reading http://cheeseshop.python.org/pypi/nose/0.10.0
Best match: nose 0.10.0
Downloading http://somethingaboutorange.com/mrl/projects/nose/nose-0.10.0.tar.gz
Processing nose-0.10.0.tar.gz
Running nose-0.10.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-29HQ-U/nose-0.10.0/egg-dist-tmp-5xM5c8
zip_safe flag not set; analyzing archive contents...
nose.suite: module references __path__
nose.loader: module references __path__
nose.util: module references __file__
nose.importer: module references __file__
nose.importer: module references __path__
nose.inspector: module MAY be using inspect.findsource
nose.plugins.doctests: module references __file__
nose.plugins.cover: module references __file__
nose.ext.dtcompat: module references __file__
nose.ext.dtcompat: module MAY be using inspect.getsourcefile
Adding nose 0.10.0 to easy-install.pth file
Installing nosetests script to /home/dma/dev/python

Installed /home/dma/dev/python/nose-0.10.0-py2.5.egg
Searching for decorator>=2.1.0
Reading http://cheeseshop.python.org/pypi/decorator/
Reading http://www.phyast.pitt.edu/~micheles/python/documentation.html
Reading http://cheeseshop.python.org/pypi/decorator/2.2.0
Best match: decorator 2.2.0
Downloading http://www.phyast.pitt.edu/~micheles/python/decorator-2.2.0.zip
Processing decorator-2.2.0.zip
Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-1TIz60/egg-dist-tmp-bmLIds
zip_safe flag not set; analyzing archive contents...
Adding decorator 2.2.0 to easy-install.pth file

Installed /home/dma/dev/python/decorator-2.2.0-py2.5.egg
Searching for simplejson>=1.7.1
Best match: simplejson 1.7.1
Downloading http://pylonshq.com/download/0.9.6.1/simplejson-1.7.1-py2.5.egg
Processing simplejson-1.7.1-py2.5.egg
Moving simplejson-1.7.1-py2.5.egg to /home/dma/dev/python
Adding simplejson 1.7.1 to easy-install.pth file

Installed /home/dma/dev/python/simplejson-1.7.1-py2.5.egg
Searching for FormEncode>=0.7
Best match: FormEncode 0.7.1
Downloading http://pylonshq.com/download/0.9.6.1/FormEncode-0.7.1.tar.gz
Processing FormEncode-0.7.1.tar.gz
Running FormEncode-0.7.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-SA4wNQ/FormEncode-0.7.1/egg-dist-tmp-0R9DTo
warning: no files found matching '*.py' under directory '.'
warning: no files found matching '*.html' under directory 'docs'
no previously-included directories found matching '**/.svn'
zip_safe flag not set; analyzing archive contents...
formencode.fields: module references __file__
formencode.util.doctest24: module references __file__
formencode.util.doctest24: module MAY be using inspect.getsourcefile
Adding FormEncode 0.7.1 to easy-install.pth file

Installed /home/dma/dev/python/FormEncode-0.7.1-py2.5.egg
Searching for PasteScript>=1.3.6
Best match: PasteScript 1.3.6
Downloading http://pylonshq.com/download/0.9.6.1/PasteScript-1.3.6.tar.gz
Processing PasteScript-1.3.6.tar.gz
Running PasteScript-1.3.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mCroaR/PasteScript-1.3.6/egg-dist-tmp-mK_7Km
Adding PasteScript 1.3.6 to easy-install.pth file
Installing paster script to /home/dma/dev/python
Installing paster script to /home/dma/dev/python

Installed /home/dma/dev/python/PasteScript-1.3.6-py2.5.egg
Searching for PasteDeploy>=1.3.1
Best match: PasteDeploy 1.3.1
Downloading http://pylonshq.com/download/0.9.6.1/PasteDeploy-1.3.1.tar.gz
Processing PasteDeploy-1.3.1.tar.gz
Running PasteDeploy-1.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-MdDVys/PasteDeploy-1.3.1/egg-dist-tmp-EaFU3J
warning: no files found matching 'docs/*.html'
warning: no previously-included files found matching 'docs/rebuild'
Adding PasteDeploy 1.3.1 to easy-install.pth file

Installed /home/dma/dev/python/PasteDeploy-1.3.1-py2.5.egg
Searching for Paste>=1.4
Best match: Paste 1.4.2
Downloading http://pylonshq.com/download/0.9.6.1/Paste-1.4.2.tar.gz
Processing Paste-1.4.2.tar.gz
Running Paste-1.4.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Xk89_1/Paste-1.4.2/egg-dist-tmp-fXyqxa
Adding Paste 1.4.2 to easy-install.pth file

Installed /home/dma/dev/python/Paste-1.4.2-py2.5.egg
Searching for Beaker>=0.7.5
Best match: Beaker 0.7.5
Downloading http://pylonshq.com/download/0.9.6.1/Beaker-0.7.5.tar.gz
Processing Beaker-0.7.5.tar.gz
Running Beaker-0.7.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-FnvTLX/Beaker-0.7.5/egg-dist-tmp-8ZVadL
Adding Beaker 0.7.5 to easy-install.pth file

Installed /home/dma/dev/python/Beaker-0.7.5-py2.5.egg
Searching for WebHelpers>=0.3.2
Best match: WebHelpers 0.3.2
Downloading http://pylonshq.com/download/0.9.6.1/WebHelpers-0.3.2.tar.gz
Processing WebHelpers-0.3.2.tar.gz
Running WebHelpers-0.3.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Dx13aE/WebHelpers-0.3.2/egg-dist-tmp-DCr1Al
Adding WebHelpers 0.3.2 to easy-install.pth file

Installed /home/dma/dev/python/WebHelpers-0.3.2-py2.5.egg
Searching for Routes>=1.7
Best match: Routes 1.7
Downloading http://pylonshq.com/download/0.9.6.1/Routes-1.7.tar.gz
Processing Routes-1.7.tar.gz
Running Routes-1.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-shjJ8m/Routes-1.7/egg-dist-tmp-cP0rM6
Adding Routes 1.7 to easy-install.pth file

Installed /home/dma/dev/python/Routes-1.7-py2.5.egg
Finished processing dependencies for Pylons


Now you can build a test application in order to check that Pylons installation has been successfull:

cd $HOME/dev/python
paster create --template=pylons test_app


The previous command will print in your terminal some logs like the following ones:

Selected and implied templates:
Pylons#pylons Pylons application template

Variables:
egg: test_app
package: test_app
project: test_app
Creating template pylons
Creating directory ./test_app
Recursing into +egg+.egg-info
Creating ./test_app/test_app.egg-info/
Copying paste_deploy_config.ini_tmpl_tmpl to ./test_app/test_app.egg-info/paste_deploy_config.ini_tmpl
Recursing into +package+
Creating ./test_app/test_app/
Copying __init__.py_tmpl to ./test_app/test_app/__init__.py
Recursing into config
Creating ./test_app/test_app/config/
Copying __init__.py_tmpl to ./test_app/test_app/config/__init__.py
Copying environment.py_tmpl to ./test_app/test_app/config/environment.py
Copying middleware.py_tmpl to ./test_app/test_app/config/middleware.py
Copying routing.py_tmpl to ./test_app/test_app/config/routing.py
Recursing into controllers
Creating ./test_app/test_app/controllers/
Copying __init__.py_tmpl to ./test_app/test_app/controllers/__init__.py
Copying error.py_tmpl to ./test_app/test_app/controllers/error.py
Copying template.py_tmpl to ./test_app/test_app/controllers/template.py
Recursing into lib
Creating ./test_app/test_app/lib/
Copying __init__.py_tmpl to ./test_app/test_app/lib/__init__.py
Copying app_globals.py_tmpl to ./test_app/test_app/lib/app_globals.py
Copying base.py_tmpl to ./test_app/test_app/lib/base.py
Copying helpers.py_tmpl to ./test_app/test_app/lib/helpers.py
Recursing into model
Creating ./test_app/test_app/model/
Copying __init__.py_tmpl to ./test_app/test_app/model/__init__.py
Recursing into public
Creating ./test_app/test_app/public/
Copying index.html_tmpl to ./test_app/test_app/public/index.html
Recursing into templates
Creating ./test_app/test_app/templates/
Recursing into tests
Creating ./test_app/test_app/tests/
Copying __init__.py_tmpl to ./test_app/test_app/tests/__init__.py
Recursing into functional
Creating ./test_app/test_app/tests/functional/
Copying __init__.py_tmpl to ./test_app/test_app/tests/functional/__init__.py
Copying test_models.py_tmpl to ./test_app/test_app/tests/test_models.py
Copying websetup.py_tmpl to ./test_app/test_app/websetup.py
Copying MANIFEST.in_tmpl to ./test_app/MANIFEST.in
Copying README.txt_tmpl to ./test_app/README.txt
Copying development.ini_tmpl to ./test_app/development.ini
Recursing into docs
Creating ./test_app/docs/
Copying index.txt_tmpl to ./test_app/docs/index.txt
Copying setup.cfg_tmpl to ./test_app/setup.cfg
Copying setup.py_tmpl to ./test_app/setup.py
Copying test.ini_tmpl to ./test_app/test.ini
Running /usr/bin/python setup.py egg_info
Adding Pylons to paster_plugins.txt
Adding WebHelpers to paster_plugins.txt


Launch paster web server in order to test the test_app application:

cd $HOME/dev/python/test_app
paster serve --reload development.ini


And last you can connect to your test_app application at the address http://127.0.0.1:5000/. Normally you will see a web page like the following one.

Welcome

Welcome to my blog.