Problem in installing PyGreSQL

2009-08-03 Thread Thangappan.M
Dear all,

I want to access the database related stuffs in python.So I found the
PyGreSQL module in net.
Then I tried to download the module.But I am not able to download it.

I am not a super user.
I am using Linux debian machine
Python version is 2.4.4

-- 
Regards,
Thangappan.M
-- 
http://mail.python.org/mailman/listinfo/python-list


Problem in Installing PyGreSQL

2009-08-04 Thread Thangappan.M
Dear all,

While installing PyGreSQl module in my machine I got the error as pg_config
command not found.
I am not a super user.
 how can I install this pg_config tool.


-- 
Regards,
Thangappan.M
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Problem in installing PyGreSQL

2009-08-06 Thread Thangappan.M
I have downloaded the  psycopg2 tar file from the following link.
http://initd.org/tracker/psycopg

I have done the following things.
 * Extracting the files from the tar file
 * tried to execute python ./setup.py build

It gives the following error.

#python ./setup.py build

running build
running build_py
running build_ext
Traceback (most recent call last):
  File "./setup.py", line 410, in ?
ext_modules=ext)
  File "distutils/core.py", line 149, in setup
  File "distutils/dist.py", line 946, in run_commands
  File "distutils/dist.py", line 966, in run_command
  File "distutils/command/build.py", line 112, in run
  File "/usr/lib/python2.4/cmd.py", line 333, in run_command
del help[cmd]
  File "distutils/dist.py", line 965, in run_command
  File "/usr/lib/python2.4/cmd.py", line 117, in ensure_finalized
pass
  File "./setup.py", line 219, in finalize_options
except (Warning, w):
NameError: global name 'w' is not defined

What would be the solution?
Otherwise can you tell how to install DB-API in debian machine.

On Wed, Aug 5, 2009 at 10:43 AM, Dennis Lee Bieber wrote:

> On Tue, 4 Aug 2009 09:55:47 -0400, "D'Arcy J.M. Cain" 
> declaimed the following in gmane.comp.python.general:
>
> >
> > By the way, you don't have to be super user to install PyGreSQL.  You
> > just need SU if you want to install it system wide.  PyGreSQL doesn't
> > require any special privileges to run.
> >
> Potentially silly question:
>
>While the DB-API module may be installable in a user mode... Do we
> know if the original querant even has PostgreSQL running and accessible?
>
> The statement
>
> OP> I want to access the database related stuffs in python.So I found
> the
> OP> PyGreSQL module in net.
>
> doesn't leave me with any confidence that they realize this is just an
> access module for one specific server -- and that they still need a
> server to which they can connect.
>
>If they don't have a PostgreSQL server, it may be better just to
> direct them to SQLite3...
> --
>WulfraedDennis Lee Bieber   KD6MOG
>[email protected]   [email protected]
>HTTP://wlfraed.home.netcom.com/
>(Bestiaria Support Staff:   [email protected])
>HTTP://www.bestiaria.com/
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Regards,
Thangappan.M
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Problem in installing PyGreSQL

2009-08-10 Thread Thangappan.M
Here I attached the setup.py and setup.cfg file.This is for your reference.
I have changed the exception line.
Even though I got the following error while running the python setup.py
build
running build
running build_py
running build_ext
error: No such file or directory

===

On Fri, Aug 7, 2009 at 7:38 PM, Scott David Daniels
wrote:

> Dennis Lee Bieber wrote:
>
>> On Thu, 6 Aug 2009 16:00:15 +0530, "Thangappan.M"
>>  declaimed the following in
>> gmane.comp.python.general:
>>
>>>  File "./setup.py", line 219, in finalize_options
>>>except (Warning, w):
>>> NameError: global name 'w' is not defined
>>>
>>> What would be the solution?
>>> Otherwise can you tell how to install DB-API in debian machine.
>>>
>>Sorry... 1) I run on WinXP; 2) I don't build packages, relying on
>> pre-built binaries; 3) I run MySQL.
>>
>>However, based upon the examples in the Tutorial, that line should
>> not have the (, ). A parenthesised (tuple) is suppose to contain a list
>> of exceptions, and the parameter to catch the exception specifics has to
>> be outside the list.
>>
>>Best I can suggest is editing that particular line and removing the
>> (, ) -- then try rebuilding.
>>
>>I'll also re-ask: All you are installing is the Python adapter to
>> the database. DO YOU HAVE A RUNNING PostgreSQL server that you can
>> connect to?
>>
>
> Just to be a bit more explict:
> Change file setup.py's line 219 from:
> >> except (Warning, w):
> to either (OK in Python 2.6 and greater):
>   except Warning as w:
> or (works for Python 2.X):
>   except Warning, w:
>
>
> --Scott David Daniels
> [email protected]
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Regards,
Thangappan.M


setup.cfg
Description: Binary data
# setup.py - distutils packaging
#
# Copyright (C) 2003-2004 Federico Di Gregorio  
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.

"""Python-PostgreSQL Database Adapter

psycopg is a PostgreSQL database adapter for the Python programming
language. This is version 2, a complete rewrite of the original code to
provide new-style classes for connection and cursor objects and other sweet
candies. Like the original, psycopg 2 was written with the aim of being
very small and fast, and stable as a rock.

psycopg is different from the other database adapter because it was
designed for heavily multi-threaded applications that create and destroy
lots of cursors and make a conspicuous number of concurrent INSERTs or
UPDATEs. psycopg 2 also provide full asycronous operations for the really
brave programmer.
"""

classifiers = """\
Development Status :: 4 - Beta
Intended Audience :: Developers
License :: OSI Approved :: GNU General Public License (GPL)
License :: OSI Approved :: Zope Public License
Programming Language :: Python
Programming Language :: C
Programming Language :: SQL
Topic :: Database
Topic :: Database :: Front-Ends
Topic :: Software Development
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: Microsoft :: Windows
Operating System :: Unix
"""

import os
import os.path
import sys
import subprocess
import ConfigParser
from distutils.core import setup, Extension
from distutils.errors import DistutilsFileError
from distutils.command.build_ext import build_ext
from distutils.sysconfig import get_python_inc
from distutils.ccompiler import get_default_compiler

PSYCOPG_VERSION = '2.0.10'
version_flags   = ['dt', 'dec']

PLATFORM_IS_WINDOWS = sys.platform.lower().startswith('win')

def get_pg_config(kind, pg_config="pg_config"):
p = subprocess.Popen([pg_config, "--" + kind],
 stdin=subprocess.PIPE,
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE)
p.stdin.close()
r = p.stdout.readline().strip()
if not r:
raise Warning(p.stderr.readline())
return r

class psycopg_build_ext(build_ext):
"""Conditionally complement the setup.cfg options file.

This class configures the include_dirs, libray_dirs, libraries
options as required by the system. Most of

IDE for Python

2009-08-29 Thread Thangappan.M
Dear all,


   Please suggest some good IDE for python.I am working in linux
platform.


-- 
Regards,
Thangappan.M
-- 
http://mail.python.org/mailman/listinfo/python-list


Suggestion

2009-08-30 Thread Thangappan.M
Dear all,

 I am in the process of learning Python programming language. I know
Perl,PHP. Compare to both the language Python impressed me because here
there is no lexical variables and all.Now I need suggestion saying that ,
What online book can I follow?

 I have not yet learnt any advanced programming stuffs in Python.
Please suggest some book? or tutorial. net net my goal is that I will be
able to do the project in any languages(Python,Perl,PHP).So I need to learn
more depth knowledge of Python.

So Please help me?



-- 
Regards,
Thangappan.M
-- 
http://mail.python.org/mailman/listinfo/python-list