| author | ymh <ymh.work@gmail.com> |
| Wed, 20 Jan 2010 00:34:04 +0100 | |
| changeset 0 | 0d40e90630ef |
| permissions | -rw-r--r-- |
| 0 | 1 |
import os |
2 |
import sys |
|
3 |
||
4 |
from django.db.backends import BaseDatabaseClient |
|
5 |
||
6 |
class DatabaseClient(BaseDatabaseClient): |
|
7 |
executable_name = 'sqlplus' |
|
8 |
||
9 |
def runshell(self): |
|
10 |
conn_string = self.connection._connect_string() |
|
11 |
args = [self.executable_name, "-L", conn_string] |
|
12 |
if os.name == 'nt': |
|
13 |
sys.exit(os.system(" ".join(args))) |
|
14 |
else: |
|
15 |
os.execvp(self.executable_name, args) |
|
16 |