[pypy-svn] r10279 - pypy/dist/goal
sanxiyn at codespeak.net
sanxiyn at codespeak.net
Mon Apr 4 11:57:02 CEST 2005
Author: sanxiyn
Date: Mon Apr 4 11:57:02 2005
New Revision: 10279
Added:
pypy/dist/goal/gadfly-demo.py
Log:
Gadfly (version 1.0.0) works with PyPy!
Caution 1: Run it with --oldstyle. Otherwise it fails, because of
pre-new-style check in gadfly.serialize.serialize().
Caution 2: It takes an hour to finish.
Added: pypy/dist/goal/gadfly-demo.py
==============================================================================
--- (empty file)
+++ pypy/dist/goal/gadfly-demo.py Mon Apr 4 11:57:02 2005
@@ -0,0 +1,23 @@
+import os
+os.mkdir('db')
+
+import gadfly
+connection = gadfly.gadfly()
+connection.startup('test', 'db')
+cursor = connection.cursor()
+
+def print_and_execute(cursor, operation):
+ print operation
+ cursor.execute(operation)
+
+print_and_execute(cursor, "CREATE TABLE pypy(py varchar)")
+print_and_execute(cursor, "INSERT INTO pypy(py) VALUES ('py')")
+print_and_execute(cursor, "SELECT * FROM pypy")
+for row in cursor.fetchall():
+ print row
+
+connection.commit()
+connection.close()
+
+import shutil
+shutil.rmtree('db')
More information about the Pypy-commit
mailing list