Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@minefield goal]# ./pypy-c
- Python 2.7.1 (a97d08283ea7+, May 31 2011, 09:50:10)
- [PyPy 1.5.0-alpha0 with GCC 4.5.1] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- And now for something completely different: ``rpython: syntax and semantics of
- python, speed of c, restrictions of java and compiler error messages as
- penetrable as MUMPS''
- >>>> import cx_Oracle as dbdriver
- >>>> dbuser = '***'
- >>>> dbpassword = '***'
- >>>> db_host_port = '192.168.211.118:1521'
- >>>> db_database = '***db'
- >>>> dbconn = dbdriver.connect('%s/%s@%s/%s' % (dbuser, dbpassword, db_host_port, db_database))
- >>>> dbconn
- <Connection object at 0x0b099488>
- >>>> cur = dbconn.cursor()
- >>>> cur.execute('select :value from dual', "it works!")
- Traceback (most recent call last):
- File "<console>", line 1, in <module>
- DatabaseError: ORA-01036: illegal variable name/number
- >>>> cur.execute('select :value from dual', value="it works!")
- <Cursor object at 0x0b042b00>
- >>>> cur.fetchone()
- ('it works!',)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement