Changeset: cb4fa2be3901 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cb4fa2be3901 Added Files: clients/examples/python/basics.py Removed Files: clients/python2/examples/basics.py clients/python3/examples/basics.py Branch: Oct2012 Log Message:
basics: move example to generic example dir python2 and python3 versions of this example are identical diffs (51 lines): diff --git a/clients/python2/examples/basics.py b/clients/examples/python/basics.py rename from clients/python2/examples/basics.py rename to clients/examples/python/basics.py diff --git a/clients/python3/examples/basics.py b/clients/python3/examples/basics.py deleted file mode 100644 --- a/clients/python3/examples/basics.py +++ /dev/null @@ -1,43 +0,0 @@ -# The contents of this file are subject to the MonetDB Public License -# Version 1.1 (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.monetdb.org/Legal/MonetDBLicense -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -# License for the specific language governing rights and limitations -# under the License. -# -# The Original Code is the MonetDB Database System. -# -# The Initial Developer of the Original Code is CWI. -# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. -# Copyright August 2008-2012 MonetDB B.V. -# All Rights Reserved. - -import logging - -#configure the logger, so we can see what is happening -logging.basicConfig(level=logging.DEBUG) -logger = logging.getLogger('monetdb') - -try: - import monetdb.sql -except ImportError: - # running examples from development tree - import sys - import os - parent = os.path.join(sys.path[0], os.pardir) - sys.path.append(parent) - import monetdb.sql - - -x = monetdb.sql.connect(username="monetdb", password="monetdb", hostname="localhost", database="demo") -c = x.cursor() - -# some basic query -c.arraysize=100 -c.execute('select * from tables') -results = c.fetchall() -x.commit() -print(results) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list