web/lib/django/db/backends/oracle/client.py
changeset 38 77b6da96e6f1
parent 0 0d40e90630ef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/lib/django/db/backends/oracle/client.py	Wed Jun 02 18:57:35 2010 +0200
@@ -0,0 +1,16 @@
+import os
+import sys
+
+from django.db.backends import BaseDatabaseClient
+
+class DatabaseClient(BaseDatabaseClient):
+    executable_name = 'sqlplus'
+
+    def runshell(self):
+        conn_string = self.connection._connect_string()
+        args = [self.executable_name, "-L", conn_string]
+        if os.name == 'nt':
+            sys.exit(os.system(" ".join(args)))
+        else:
+            os.execvp(self.executable_name, args)
+