The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
fill in keywords - and reset article title

Things look quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

python - needed for fetchmail * 10 August 1998
Share
Need more help on this topic? Click here
This article has no comments
Show me similar articles

Python is a programming language which has come a long way in a relatively short time. My main interest is the interface to the PostgreSQL database. I use Perl as part of several websites (including this one, FreshPorts and FreshSource). I am now investigating Python to see how I can use it in similar areas.

Installing Python

As always, I am using the ports tree to install.

cd /usr/ports/lang/python
make install
Hello world!

In keeping with tradition, here my first simple python program:

#! /usr/bin/env python

print "Hello world!"
Running that first program is pretty simple:
$ python pg-python
Hello world!
$

What could be easier?!

Connecting to PostgreSQL

As always, I am using the ports tree to install.

cd /usr/ports/lang/python
make install
Share
Need more help on this topic? Click here
This article has no comments
Show me similar articles