cx-oracle-users Mailing List for cx_Oracle (Page 40)
Brought to you by:
atuining
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(9) |
Sep
(8) |
Oct
(12) |
Nov
(4) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(15) |
Feb
(12) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(12) |
Aug
(2) |
Sep
(14) |
Oct
(17) |
Nov
(20) |
Dec
(3) |
2005 |
Jan
(16) |
Feb
(9) |
Mar
(22) |
Apr
(21) |
May
(73) |
Jun
(16) |
Jul
(15) |
Aug
(10) |
Sep
(32) |
Oct
(35) |
Nov
(22) |
Dec
(13) |
2006 |
Jan
(42) |
Feb
(36) |
Mar
(13) |
Apr
(18) |
May
(8) |
Jun
(17) |
Jul
(24) |
Aug
(30) |
Sep
(35) |
Oct
(33) |
Nov
(33) |
Dec
(11) |
2007 |
Jan
(35) |
Feb
(31) |
Mar
(35) |
Apr
(64) |
May
(38) |
Jun
(12) |
Jul
(18) |
Aug
(34) |
Sep
(75) |
Oct
(29) |
Nov
(51) |
Dec
(11) |
2008 |
Jan
(27) |
Feb
(46) |
Mar
(48) |
Apr
(36) |
May
(59) |
Jun
(42) |
Jul
(25) |
Aug
(34) |
Sep
(57) |
Oct
(97) |
Nov
(59) |
Dec
(57) |
2009 |
Jan
(48) |
Feb
(48) |
Mar
(45) |
Apr
(24) |
May
(46) |
Jun
(52) |
Jul
(52) |
Aug
(37) |
Sep
(27) |
Oct
(40) |
Nov
(37) |
Dec
(13) |
2010 |
Jan
(16) |
Feb
(9) |
Mar
(24) |
Apr
(6) |
May
(27) |
Jun
(28) |
Jul
(60) |
Aug
(16) |
Sep
(33) |
Oct
(20) |
Nov
(39) |
Dec
(30) |
2011 |
Jan
(23) |
Feb
(43) |
Mar
(16) |
Apr
(29) |
May
(23) |
Jun
(16) |
Jul
(10) |
Aug
(8) |
Sep
(18) |
Oct
(42) |
Nov
(26) |
Dec
(20) |
2012 |
Jan
(17) |
Feb
(27) |
Mar
|
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(24) |
Aug
(21) |
Sep
(23) |
Oct
(18) |
Nov
(12) |
Dec
(5) |
2013 |
Jan
(14) |
Feb
(10) |
Mar
(20) |
Apr
(65) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(9) |
Mar
(4) |
Apr
(7) |
May
(20) |
Jun
(2) |
Jul
(20) |
Aug
(7) |
Sep
(11) |
Oct
(8) |
Nov
(6) |
Dec
(12) |
2015 |
Jan
(16) |
Feb
(10) |
Mar
(14) |
Apr
(8) |
May
|
Jun
(8) |
Jul
(15) |
Aug
(7) |
Sep
(1) |
Oct
(33) |
Nov
(8) |
Dec
(5) |
2016 |
Jan
(18) |
Feb
(12) |
Mar
(6) |
Apr
(14) |
May
(5) |
Jun
(3) |
Jul
|
Aug
(21) |
Sep
|
Oct
(15) |
Nov
(8) |
Dec
|
2017 |
Jan
|
Feb
(14) |
Mar
(21) |
Apr
(9) |
May
(6) |
Jun
(11) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(16) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ivan <bd...@ma...> - 2011-07-12 10:00:42
|
I have a simple python script: tsn_dsn = cx_Oracle.makedsn('10.100.1.21', 1521, 'SID') import cx_Oracle connection = cx_Oracle.connect(user, password, tsn_dsn ) connection.close() if ip 10.100.1.21 doesn't exists in network script waiting 60 seconds. (DEFAULT CONNECT_TIMEOUT to Oracle.). I want to decrease this time. If I use script: dns_tns = '(DESCRIPTION=(CONNECT_TIMEOUT=5)(RETRY_COUNT=0)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=%s)(PORT=%d)))(CONNECT_DATA(SID=%s)))' % (.... )) connection = cx_Oracle.connect(user, password, tsn_dsn ) it's solve my problem. May be add CONNECT_TIME option to cx_Oracle.makedsn function as optional parametr ? |
From: Walter D. <wa...@li...> - 2011-07-07 09:26:05
|
On 06.07.11 15:49, Anthony Tuininga wrote: > Hi, > > You can simply subtract them. cx_Oracle will return a datetime > instance for the timestamp column and you can simply do > > timestampB - timestampA > > which will return to you a timedelta instance. You can also subtract > them in Oracle and return the result to Python if you prefer that > option. Or you could use the LAG() or LEAD() analytic functions. Servus, Walter |
From: Anthony T. <ant...@gm...> - 2011-07-06 13:49:20
|
Hi, You can simply subtract them. cx_Oracle will return a datetime instance for the timestamp column and you can simply do timestampB - timestampA which will return to you a timedelta instance. You can also subtract them in Oracle and return the result to Python if you prefer that option. Anthony On Wed, Jul 6, 2011 at 6:22 AM, <prz...@po...> wrote: > Hello, > > I have a table with one timestamp column: > ----------------------------------------- -------- ---------------------------- > ID NOT NULL NUMBER(10) > DOC NOT NULL NUMBER(10) > TIME NOT NULL TIMESTAMP(6) > TYPE_OF_OPER NOT NULL VARCHAR2(1) > SIZE NUMBER(10) > DESC VARCHAR2(200) > > When I select from this table (just two columns) > TIME TYPE_OF_OPER > --------------------------------------------------------------------------- - > 11/07/06 13:03:45,826773 D > 11/07/06 13:03:45,848394 E > 11/07/06 13:03:46,978210 F > 11/07/06 13:07:48,053144 A > 11/07/06 13:07:48,072237 B > 11/07/06 13:07:48,444520 C > 11/07/06 13:07:48,504301 D > 11/07/06 13:07:48,532285 E > 11/07/06 13:07:49,504860 F > 11/07/06 13:07:50,554859 A > ... (over 10000 rows) > > Our developer records timestamps in important part of his application: > > code A ... > record timestampt 'A' > code B ... > record timestampt 'B' > code C ... > record timestampt 'C' > code D ... > (there are only 'A'-'F' timestamps). > > What I'd like to achive is to get delta time between 'A' and 'B' (= time of code 'B') > but for all 'A' and 'B' (as an output I get rows of numbers). > How can I calculate this using cx-oracle ? > > > Regards > Przemyslaw Bak (przemol) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------- > Znajdz samochod idealny dla siebie! > Szukaj >> http://linkint.pl/f29e2 > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: <prz...@po...> - 2011-07-06 13:12:07
|
On Wed, Jul 06, 2011 at 08:38:24AM -0400, Gerrat Rickert wrote: > > -----Original Message----- > > From: prz...@po... [mailto:prz...@po...] > > Sent: July 6, 2011 8:22 AM > > To: cx-...@li... > > Subject: [cx-oracle-users] calculate time differences on timestamp > > column > > [snip] > > > What I'd like to achive is to get delta time between 'A' and 'B' (= > > time of code 'B') > > but for all 'A' and 'B' (as an output I get rows of numbers). > > How can I calculate this using cx-oracle ? > > > > > > Regards > > Przemyslaw Bak (przemol) > > Your question is a straight SQL question, and has nothing to do with > cx_Oracle. > There is a great website, www.stackoverflow.com that this question is > perfect > for. You might get better results if you asked it there. > > ...your question might have even been asked & answered there already: > http://stackoverflow.com/questions/4308620/difference-in-time-between-re > cords I thought that to get the result I need to have two cursors going through the data and substract between them. Indeed - my SQL knowledge it very small ... ;-) Regards Przemyslaw Bak (przemol) ---------------------------------------------------------- Kredyt gotowkowy nr 1! Teraz do 150 000zl bez zaswiadczen! http://linkint.pl/f29e1 |
From: Gerrat R. <gri...@co...> - 2011-07-06 12:48:53
|
> -----Original Message----- > From: prz...@po... [mailto:prz...@po...] > Sent: July 6, 2011 8:22 AM > To: cx-...@li... > Subject: [cx-oracle-users] calculate time differences on timestamp > column [snip] > What I'd like to achive is to get delta time between 'A' and 'B' (= > time of code 'B') > but for all 'A' and 'B' (as an output I get rows of numbers). > How can I calculate this using cx-oracle ? > > > Regards > Przemyslaw Bak (przemol) Your question is a straight SQL question, and has nothing to do with cx_Oracle. There is a great website, www.stackoverflow.com that this question is perfect for. You might get better results if you asked it there. ...your question might have even been asked & answered there already: http://stackoverflow.com/questions/4308620/difference-in-time-between-re cords |
From: <prz...@po...> - 2011-07-06 12:22:25
|
Hello, I have a table with one timestamp column: ----------------------------------------- -------- ---------------------------- ID NOT NULL NUMBER(10) DOC NOT NULL NUMBER(10) TIME NOT NULL TIMESTAMP(6) TYPE_OF_OPER NOT NULL VARCHAR2(1) SIZE NUMBER(10) DESC VARCHAR2(200) When I select from this table (just two columns) TIME TYPE_OF_OPER --------------------------------------------------------------------------- - 11/07/06 13:03:45,826773 D 11/07/06 13:03:45,848394 E 11/07/06 13:03:46,978210 F 11/07/06 13:07:48,053144 A 11/07/06 13:07:48,072237 B 11/07/06 13:07:48,444520 C 11/07/06 13:07:48,504301 D 11/07/06 13:07:48,532285 E 11/07/06 13:07:49,504860 F 11/07/06 13:07:50,554859 A ... (over 10000 rows) Our developer records timestamps in important part of his application: code A ... record timestampt 'A' code B ... record timestampt 'B' code C ... record timestampt 'C' code D ... (there are only 'A'-'F' timestamps). What I'd like to achive is to get delta time between 'A' and 'B' (= time of code 'B') but for all 'A' and 'B' (as an output I get rows of numbers). How can I calculate this using cx-oracle ? Regards Przemyslaw Bak (przemol) ---------------------------------------------------------------- Znajdz samochod idealny dla siebie! Szukaj >> http://linkint.pl/f29e2 |
From: Brian B. <Bri...@st...> - 2011-06-25 00:38:20
|
So, for anyone tracking this, I ended up installing cx_Oracle 4.4.1 which worked just fine. Not sure the difference between that and 5.1, but it seems to be working fine for our application. Thanks for your assistance. Brian |
From: Brian B. <Bri...@st...> - 2011-06-23 23:56:26
|
Amaury Forgeot d'Arc [mailto:ama...@gm...] wrote: > Is it a custom build of Python? No, I'm using official binary builds of both Python 2.6.6 and cx_Oracle 5.1 (the MSI packages). Brian |
From: Amaury F. d'A. <ama...@gm...> - 2011-06-23 22:20:32
|
Hi, 2011/6/23 Brian Baker <Bri...@st...>: > Python loads msvcr80.dll Is it a custom build of Python? "official" python distributions use vs9.0; older ones used vs7.0. but python.org has never distributed binaries built with vs8.0. In any case, cx_Oracle should be compiled with the same version. -- Amaury Forgeot d'Arc |
From: Brian B. <Bri...@st...> - 2011-06-23 21:27:52
|
I have tried installing both the Visual C++ 2005 (version 8) and 2008 (version 9) redistributables, but that didn't seem to make a difference, unfortunately. Brian -----Original Message----- From: Anthony Tuininga [mailto:ant...@gm...] Sent: Thursday, June 23, 2011 11:40 AM To: cx-...@li... Subject: Re: [cx-oracle-users] cx_Oracle cannot be loaded by PyISAPIe on IIS Hi, Only a guess but perhaps you can install the Microsoft Visual Studio 2008 redistributable package for your platform. The Python executable has that as a private assembly I believe but you will need to make it available generally if it isn't already. And the error message suggests that it is not. Or you could just make life a lot easier for yourself (maybe) by using Apache. :-) It installs and runs very easily indeed on Windows. I had one machine that worked perfectly with IIS and another one where it simply did not work at all -- and no error messages or other helpful information available. Just crash. So I decided to use Apache and everything worked in short order thanks to a decent logging system that showed me my errors when I made them. YMMV of course. :-) Anthony On Thu, Jun 23, 2011 at 11:33 AM, Brian Baker <Bri...@st...> wrote: > Hi, > > I have a coworker that has developed a Django application, and I am > trying to get it to run under IIS on Windows Server 2008 R2. I'm > generally following the Django walkthrough [1] although not with SQL > Server. > > If I run python from the command prompt and import cx_Oracle, it works > just fine. However, when the Django application is loaded by IIS and > PyISAPIe, it says it cannot load cx_Oracle and displays the following > error: > > Error loading cx_Oracle module: DLL load failed: The specified module > could not be found. > > I've used Process Monitor to watch what happens, and it seems to be > some oddity with loading the VC runtime. Python loads msvcr80.dll > successfully. PyISAPIe attempts to load msvcr90.dll but is unable to > find it -- it doesn't try using msvcr80.dll at all. > > I'm using the 32-bit versions of the following: > > Python 2.6.6 > PyISAPIe 1.1.0 rc4 > Django 1.3 > Oracle Client 11.2 (I've tried both the instant client and the regular > client) > cx_Oracle 5.1 (for Oracle 11g, Python 2.6) > > Any thoughts on why this might be happening? > > [1] > https://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer > > Brian Baker |
From: Anthony T. <ant...@gm...> - 2011-06-23 18:39:52
|
Hi, Only a guess but perhaps you can install the Microsoft Visual Studio 2008 redistributable package for your platform. The Python executable has that as a private assembly I believe but you will need to make it available generally if it isn't already. And the error message suggests that it is not. Or you could just make life a lot easier for yourself (maybe) by using Apache. :-) It installs and runs very easily indeed on Windows. I had one machine that worked perfectly with IIS and another one where it simply did not work at all -- and no error messages or other helpful information available. Just crash. So I decided to use Apache and everything worked in short order thanks to a decent logging system that showed me my errors when I made them. YMMV of course. :-) Anthony On Thu, Jun 23, 2011 at 11:33 AM, Brian Baker <Bri...@st...> wrote: > Hi, > > I have a coworker that has developed a Django application, and I am > trying to get it to run under IIS on Windows Server 2008 R2. I'm > generally following the Django walkthrough [1] although not with SQL > Server. > > If I run python from the command prompt and import cx_Oracle, it works > just fine. However, when the Django application is loaded by IIS and > PyISAPIe, it says it cannot load cx_Oracle and displays the following > error: > > Error loading cx_Oracle module: DLL load failed: The specified module > could not be found. > > I've used Process Monitor to watch what happens, and it seems to be some > oddity with loading the VC runtime. Python loads msvcr80.dll > successfully. PyISAPIe attempts to load msvcr90.dll but is unable to > find it -- it doesn't try using msvcr80.dll at all. > > I'm using the 32-bit versions of the following: > > Python 2.6.6 > PyISAPIe 1.1.0 rc4 > Django 1.3 > Oracle Client 11.2 (I've tried both the instant client and the regular > client) > cx_Oracle 5.1 (for Oracle 11g, Python 2.6) > > Any thoughts on why this might be happening? > > [1] > https://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer > > Brian Baker > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with vRanger. > Installation's a snap, and flexible recovery options mean your data is safe, > secure and there when you need it. Data protection magic? > Nope - It's vRanger. Get your free trial download today. > http://p.sf.net/sfu/quest-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Brian B. <Bri...@st...> - 2011-06-23 17:35:21
|
Hi, I have a coworker that has developed a Django application, and I am trying to get it to run under IIS on Windows Server 2008 R2. I'm generally following the Django walkthrough [1] although not with SQL Server. If I run python from the command prompt and import cx_Oracle, it works just fine. However, when the Django application is loaded by IIS and PyISAPIe, it says it cannot load cx_Oracle and displays the following error: Error loading cx_Oracle module: DLL load failed: The specified module could not be found. I've used Process Monitor to watch what happens, and it seems to be some oddity with loading the VC runtime. Python loads msvcr80.dll successfully. PyISAPIe attempts to load msvcr90.dll but is unable to find it -- it doesn't try using msvcr80.dll at all. I'm using the 32-bit versions of the following: Python 2.6.6 PyISAPIe 1.1.0 rc4 Django 1.3 Oracle Client 11.2 (I've tried both the instant client and the regular client) cx_Oracle 5.1 (for Oracle 11g, Python 2.6) Any thoughts on why this might be happening? [1] https://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer Brian Baker |
From: Rajarshi G. <raj...@gm...> - 2011-06-12 12:07:56
|
Hi, I have successfully install cx_Oracle using pip, Oracle 32 bit libraries on OS X (10.5). While this lets me work on the command line after setting my paths appropriately, I'd like to use it in a mod_wsgi environment which is running in 64 bit mode. The version of Python is a multi-architecture bundle (i386 and x86_64) so I've been trying to get cx_Oracle to use the 64 bit libs. But when I do pip install cx_Oracle with DYLD_LIBRARY_PATH point to the 64 bit version of Oracle, I see the following during installation: gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc build/temp.macosx-10.5-i386-2.5-10g/cx_Oracle.o -L/Users/guhar/oracle/lib -L/Users/guhar/oracle/ -lclntsh -o build/lib.macosx-10.5-i386-2.5-10g/cx_Oracle.so -shared-libgcc ld warning: in /Users/guhar/oracle/lib/libclntsh.dylib, file is not of required architecture ld warning: in /Users/guhar/oracle/lib/libclntsh.dylib, file is not of required architecture It looks like gcc is forcing compilation for i386 but with 64 bit libs. How can I indicate to pip that it should compile for x86_64? Thanks, -- Rajarshi Guha NIH Chemical Genomics Center |
From: Martijn P. <mj...@zo...> - 2011-06-10 13:47:46
|
Hi! What's the status of LOB support in cx_Oracle, regarding the use of the new oraub8-sized read and write API introduced in OCI 10.1? See: http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10779/oci07lob.htm#444308 Currently, on 32-bit systems, you can only handle up to 2GB of data when it comes to LOBs, as the offset parameter on the read and write operations only takes a python int (and not a long), which being signed is limited to half the Oracle limit. It'd be great if at least that API would take a python long up to the limits of the ub4 4-byte unsigned int and let us work with 4GB LOBs, or better still, use the new OCILob*2 operations and let us access the full potential of Oracle LOBs, all the way to the terrabyte range! :-) -- Martijn Pieters |
From: Rizzuto, R. <Ray...@si...> - 2011-06-06 12:39:26
|
I think he means it is Off Topic for this Mailing List. From: Me [mailto:zed...@ya...] Sent: Sunday, June 05, 2011 5:07 PM To: cx-...@li... Subject: Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) Hi I don't understand when you said : Apache and mod_python are OT in a cx_Oracle maling list. Does it mean when I log an issue I should log it under OT subject???? thanks for the URL for mod_python but in that site I can't find mod_python for python 2.6 and 2.7. Is there other link for it? cuz I can't find any Next or other navigation button to see the rest. thanks for your help We are all equal at the end. ________________________________ From: Marco De Paoli <dep...@gm...> To: cx-...@li... Sent: Sun, June 5, 2011 1:53:27 PM Subject: Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) please consider that Apache and mod_python are OT in a cx_Oracle maling list: cx_Oracle is not web-oriented, it is a wrapper for the Oracle Call Interface. Stop. please consider that this list doesn't give help on Oracle website articles please consider you are referring an article which is five year old That said. I gave a look at the article you link: you need mod_python, you can't simply use CGI you can download it from here http://archive.apache.org/dist/httpd/modpython/win/3.3.1/ choose the correct version based on the python and apache you use Marco On Sun, Jun 5, 2011 at 3:12 AM, Me <zed...@ya...<mailto:zed...@ya...>> wrote: Hi thanks for your reply. what I am wondering about is, why my script shown in previous email doesn't generate the expected result which is showing 'X' in browser after execution.? explained in the Oracle page for cx_oracle db api for python. the oracle URL from which I downloaded and followed for installation is: http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html why this simple script doesn't get executed by apache? ----------------------------------------------------- another question I like to ask you is: where can I get a .exe for installing mod_python? (for python 2.7 and apache 2.2) I've read the manual process for installing modpython in this web site: http://www.modpython.org/live/mod_python-2.7.8/doc-html/app-wininst.html but it requires 'mod_python.dll' which I don't know where and how to get it after googling it. it seems hard to find modpython for automation installation. one has advise me to use 'mod_wsgi' and he said it's better then 'modpython' since i need it for web base apps in python. if you know how \ where to get modpython full installation Please give me the URL. thanks We are all equal at the end. ________________________________ From: Marco De Paoli <dep...@gm...<mailto:dep...@gm...>> To: cx-...@li...<mailto:cx-...@li...> Sent: Fri, June 3, 2011 11:47:53 PM Subject: Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) cx_Oracle 5.1 is the current version (I suggest you to use that and not not the 4.X) First of all build a minimal script that works at the command line. Only at that point you can build a web version psp means a mod_perl script (Apache settings are OT in this ML) Marco On Sat, Jun 4, 2011 at 4:33 AM, Me <zed...@ya...<mailto:zed...@ya...>> wrote: Hello All I'm newbie to Python, Oracle and Apache 2.2 I've installed python 2.7 (ActiveState version), apache 2.2 and Oracle 10g XE. All of them running in the same machine with XP as a OS. I yet don't have 'mod_python' installed but I am planing to do so later. (just using CGI script for time being although for web development i've read mod_python is the best.) I just download the 'cx_Oracle-4.1.2-win32-10g-py27.exe' from the Oracle web site which is: (http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html) the installation went smooth with no problem as the above site walks through. then as site instructed::Create a file ora.psp under APACHE_HOME/htdocs to see whether the cx_Oracle module is working properly. -------------------------------------- <% import cx_Oracle db = cx_Oracle.connect('username', 'password', '127.0.0.1/XE<http://127.0.0.1/XE>') c = db.cursor() c.execute('select * from dual') req.write(c.fetchall()[0][0]) db.close() %> I put my username\pass for log in to Oracle as it works with database after login. ------------------------------------ i did save the file in notepad and put it in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ora.psp ( i saved as: "ora.psp" to eliminated the extra extention) when i go to url: ( http://127.0.0.1/ora.psp ) it just shows the content of the file like in notepad.(plain code) as it supposed to show 'x' in browser. (as a result of execuation of file) Apache 2.2 runs in port 80 (default) Oracle : http://127.0.0.1:8080/apex/f?p=4550:11:4261762709150240::NO::: (login page) However at python command prompt when I execute the following: >>> import cx_Oracle >>> print 'The version of cx_oracle is: ', cx_Oracle.version The version of cx_oracle is: 5.1 ------------------------------------ Please help me to fix this test which is for connection to oracle. Is it because of I yet don't have mod_python installed in my machine? Your help much appreciated. Pink Floyd: >>>> We are all equal at the end. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ cx-oracle-users mailing list cx-...@li...<mailto:cx-...@li...> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ cx-oracle-users mailing list cx-...@li...<mailto:cx-...@li...> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users ________________________________ IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses. |
From: Me <zed...@ya...> - 2011-06-05 22:02:29
|
Sorry to bother you again. Do you see the mod_python-3.3.1..... for python 27+ in the site you gave me? I can't locate it in http://archive.apache.org/dist/httpd/modpython/win/3.3.1/ thanks We are all equal at the end. ________________________________ From: Marco De Paoli <dep...@gm...> To: cx-...@li... Sent: Sun, June 5, 2011 1:53:27 PM Subject: Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) please consider that Apache and mod_python are OT in a cx_Oracle maling list: cx_Oracle is not web-oriented, it is a wrapper for the Oracle Call Interface. Stop. please consider that this list doesn't give help on Oracle website articles please consider you are referring an article which is five year old That said. I gave a look at the article you link: you need mod_python, you can't simply use CGI you can download it from here http://archive.apache.org/dist/httpd/modpython/win/3.3.1/ choose the correct version based on the python and apache you use Marco On Sun, Jun 5, 2011 at 3:12 AM, Me <zed...@ya...> wrote: Hi > > >thanks for your reply. >what I am wondering about is, why my script shown in previous email doesn't >generate the expected result which is showing 'X' in browser after execution.? >explained in the Oracle page for cx_oracle db api for python. > > >the oracle URL from which I downloaded and followed for installation is: > > >http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html > > >why this simple script doesn't get executed by apache? >----------------------------------------------------- >another question I like to ask you is: >where can I get a .exe for installing mod_python? (for python 2.7 and apache >2.2) > > >I've read the manual process for installing modpython in this web site: > > >http://www.modpython.org/live/mod_python-2.7.8/doc-html/app-wininst.html > > >but it requires 'mod_python.dll' which I don't know where and how to get it >after googling it. it seems hard to find modpython for automation installation. >one has advise me to use 'mod_wsgi' and he said it's better then 'modpython' >since i need it for web base apps in python. > > >if you know how \ where to get modpython full installation Please give me the >URL. > > >thanks > > > > > > > We are all equal at the end. > > > > > ________________________________ From: Marco De Paoli <dep...@gm...> >To: cx-...@li... >Sent: Fri, June 3, 2011 11:47:53 PM >Subject: Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) > > >cx_Oracle 5.1 is the current version > >(I suggest you to use that and not not the 4.X) > >First of all build a minimal script that works at the command line. Only at that >point you can build a web version > >psp means a mod_perl script >(Apache settings are OT in this ML) > >Marco > > >On Sat, Jun 4, 2011 at 4:33 AM, Me <zed...@ya...> wrote: > >Hello All >> >> >>I'm newbie to Python, Oracle and Apache 2.2 >>I've installed python 2.7 (ActiveState version), apache 2.2 and Oracle 10g XE. >> >> >>All of them running in the same machine with XP as a OS. >> >> >>I yet don't have 'mod_python' installed but I am planing to do so later. >>(just using CGI script for time being although for web development i've read >>mod_python is the best.) >> >> >>I just download the 'cx_Oracle-4.1.2-win32-10g-py27.exe' from the Oracle web >>site which is: >>(http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html) >> >> >>the installation went smooth with no problem as the above site walks through. >>then as site instructed::Create a file ora.psp under APACHE_HOME/htdocs to see >>whether the cx_Oracle module is working properly. >>-------------------------------------- >><% >>import cx_Oracle >>db = cx_Oracle.connect('username', 'password', '127.0.0.1/XE') >>c = db.cursor() >> >>c.execute('select * from dual') >>req.write(c.fetchall()[0][0]) >> >>db.close() >>%> >> >>I put my username\pass for log in to Oracle as it works with database after >>login. >>------------------------------------ >>i did save the file in notepad and put it in C:\Program Files\Apache Software >>Foundation\Apache2.2\htdocs\ora.psp ( i saved as: "ora.psp" to eliminated the >>extra extention) >> >> >> >>when i go to url: ( http://127.0.0.1/ora.psp ) it just shows the content of the >>file like in notepad.(plain code) as it supposed to show 'x' in browser. (as a >>result of execuation of file) >> >> >>Apache 2.2 runs in port 80 (default) >>Oracle : http://127.0.0.1:8080/apex/f?p=4550:11:4261762709150240::NO::: (login >>page) >> >> >>However at python command prompt when I execute the following: >>>>> import cx_Oracle >>>>> print 'The version of cx_oracle is: ', cx_Oracle.version >>The version of cx_oracle is: 5.1 >> >>------------------------------------ >> >> >>Please help me to fix this test which is for connection to oracle. >> Is it because of I yet don't have mod_python installed in my machine? >> >> >>Your help much appreciated. >> >> >> Pink Floyd: >>>> We are all equal at the end. >> >> >>------------------------------------------------------------------------------ >>Simplify data backup and recovery for your virtual environment with vRanger. >>Installation's a snap, and flexible recovery options mean your data is safe, >>secure and there when you need it. Discover what all the cheering's about. >>Get your free trial download today. >>http://p.sf.net/sfu/quest-dev2dev2 >>_______________________________________________ >>cx-oracle-users mailing list >>cx-...@li... >>https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > >------------------------------------------------------------------------------ >Simplify data backup and recovery for your virtual environment with vRanger. >Installation's a snap, and flexible recovery options mean your data is safe, >secure and there when you need it. Discover what all the cheering's about. >Get your free trial download today. >http://p.sf.net/sfu/quest-dev2dev2 >_______________________________________________ >cx-oracle-users mailing list >cx-...@li... >https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Marco De P. <dep...@gm...> - 2011-06-05 21:08:36
|
OT means Off Topic On Sun, Jun 5, 2011 at 11:06 PM, Me <zed...@ya...> wrote: > Hi > > > I don't understand when you said : > > Apache and mod_python are OT in a cx_Oracle maling list. > > Does it mean when I log an issue I should log it under OT subject???? > > > thanks for the URL for mod_python but in that site I can't find mod_python > for python 2.6 and 2.7. Is there other link for it? cuz I can't find any > Next or other navigation button to see the rest. > > > thanks for your help > > > > We are all equal at the end. > > > ------------------------------ > *From:* Marco De Paoli <dep...@gm...> > *To:* cx-...@li... > *Sent:* Sun, June 5, 2011 1:53:27 PM > > *Subject:* Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) > > please consider that Apache and mod_python are OT in a cx_Oracle maling > list: cx_Oracle is not web-oriented, it is a wrapper for the Oracle Call > Interface. Stop. > > please consider that this list doesn't give help on Oracle website articles > please consider you are referring an article which is five year old > > That said. I gave a look at the article you link: you need mod_python, you > can't simply use CGI > > you can download it from here > http://archive.apache.org/dist/httpd/modpython/win/3.3.1/ > > choose the correct version based on the python and apache you use > > Marco > > On Sun, Jun 5, 2011 at 3:12 AM, Me <zed...@ya...> wrote: > >> Hi >> >> >> thanks for your reply. >> >> what I am wondering about is, why my script shown in previous email >> doesn't generate the expected result which is showing 'X' in browser after >> execution.? >> >> explained in the Oracle page for cx_oracle db api for python. >> >> >> the oracle URL from which I downloaded and followed for installation is: >> >> >> >> http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html >> >> >> why this simple script doesn't get executed by apache? >> >> ----------------------------------------------------- >> >> another question I like to ask you is: >> >> where can I get a .exe for installing mod_python? (for python 2.7 and >> apache 2.2) >> >> >> I've read the manual process for installing modpython in this web site: >> >> >> http://www.modpython.org/live/mod_python-2.7.8/doc-html/app-wininst.html >> >> >> but it requires 'mod_python.dll' which I don't know where and how to get >> it after googling it. it seems hard to find modpython for automation >> installation. >> >> one has advise me to use 'mod_wsgi' and he said it's better then >> 'modpython' since i need it for web base apps in python. >> >> >> if you know how \ where to get modpython full installation Please give me >> the URL. >> >> >> thanks >> >> >> >> >> >> We are all equal at the end. >> >> >> ------------------------------ >> *From:* Marco De Paoli <dep...@gm...> >> *To:* cx-...@li... >> *Sent:* Fri, June 3, 2011 11:47:53 PM >> *Subject:* Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) >> >> cx_Oracle 5.1 is the current version >> >> (I suggest you to use that and not not the 4.X) >> >> First of all build a minimal script that works at the command line. Only >> at that point you can build a web version >> >> psp means a mod_perl script >> (Apache settings are OT in this ML) >> >> Marco >> >> On Sat, Jun 4, 2011 at 4:33 AM, Me <zed...@ya...> wrote: >> >>> Hello All >>> >>> >>> I'm newbie to Python, Oracle and Apache 2.2 >>> >>> I've installed python 2.7 (ActiveState version), apache 2.2 and Oracle >>> 10g XE. >>> >>> >>> All of them running in the same machine with XP as a OS. >>> >>> >>> I yet don't have 'mod_python' installed but I am planing to do so later. >>> >>> (just using CGI script for time being although for web development i've >>> read mod_python is the best.) >>> >>> >>> I just download the 'cx_Oracle-4.1.2-win32-10g-py27.exe' from the Oracle >>> web site which is: >>> >>> ( >>> http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html >>> ) >>> >>> >>> the installation went smooth with no problem as the above site walks >>> through. >>> >>> then as site instructed::Create a file ora.psp under APACHE_HOME/htdocs >>> to see whether the cx_Oracle module is working properly. >>> >>> -------------------------------------- >>> >>> <% >>> import cx_Oracle >>> db = cx_Oracle.connect('username', 'password', '127.0.0.1/XE') >>> c = db.cursor() >>> >>> c.execute('select * from dual') >>> req.write(c.fetchall()[0][0]) >>> >>> db.close() >>> %> >>> >>> I put my username\pass for log in to Oracle as it works with database >>> after login. >>> >>> ------------------------------------ >>> >>> i did save the file in notepad and put it in C:\Program Files\Apache >>> Software Foundation\Apache2.2\htdocs\ora.psp ( i saved as: "ora.psp" to >>> eliminated the extra extention) >>> >>> >>> when i go to url: ( http://127.0.0.1/ora.psp ) it just shows the >>> content of the file like in notepad.(plain code) as it supposed *to show >>> 'x' in browser. (as a result of execuation of file)* >>> >>> >>> Apache 2.2 runs in port 80 (default) >>> >>> Oracle : http://127.0.0.1:8080/apex/f?p=4550:11:4261762709150240::NO::: >>> (login page) >>> >>> >>> However at python command prompt when I execute the following: >>> >>> >>> import cx_Oracle >>> >>> print 'The version of cx_oracle is: ', cx_Oracle.version >>> The version of cx_oracle is: 5.1 >>> >>> ------------------------------------ >>> >>> >>> Please help me to fix this test which is for connection to oracle. >>> >>> Is it because of I yet don't have mod_python installed in my machine? >>> >>> >>> Your help much appreciated. >>> >>> >>> >>> Pink Floyd: >>>> We are all equal at the end. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Simplify data backup and recovery for your virtual environment with >>> vRanger. >>> Installation's a snap, and flexible recovery options mean your data is >>> safe, >>> secure and there when you need it. Discover what all the cheering's >>> about. >>> Get your free trial download today. >>> http://p.sf.net/sfu/quest-dev2dev2 >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Simplify data backup and recovery for your virtual environment with >> vRanger. >> Installation's a snap, and flexible recovery options mean your data is >> safe, >> secure and there when you need it. Discover what all the cheering's about. >> Get your free trial download today. >> http://p.sf.net/sfu/quest-dev2dev2 >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with > vRanger. > Installation's a snap, and flexible recovery options mean your data is > safe, > secure and there when you need it. Discover what all the cheering's about. > Get your free trial download today. > http://p.sf.net/sfu/quest-dev2dev2 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Me <zed...@ya...> - 2011-06-05 21:06:55
|
Hi I don't understand when you said : Apache and mod_python are OT in a cx_Oracle maling list. Does it mean when I log an issue I should log it under OT subject???? thanks for the URL for mod_python but in that site I can't find mod_python for python 2.6 and 2.7. Is there other link for it? cuz I can't find any Next or other navigation button to see the rest. thanks for your help We are all equal at the end. ________________________________ From: Marco De Paoli <dep...@gm...> To: cx-...@li... Sent: Sun, June 5, 2011 1:53:27 PM Subject: Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) please consider that Apache and mod_python are OT in a cx_Oracle maling list: cx_Oracle is not web-oriented, it is a wrapper for the Oracle Call Interface. Stop. please consider that this list doesn't give help on Oracle website articles please consider you are referring an article which is five year old That said. I gave a look at the article you link: you need mod_python, you can't simply use CGI you can download it from here http://archive.apache.org/dist/httpd/modpython/win/3.3.1/ choose the correct version based on the python and apache you use Marco On Sun, Jun 5, 2011 at 3:12 AM, Me <zed...@ya...> wrote: Hi > > >thanks for your reply. >what I am wondering about is, why my script shown in previous email doesn't >generate the expected result which is showing 'X' in browser after execution.? >explained in the Oracle page for cx_oracle db api for python. > > >the oracle URL from which I downloaded and followed for installation is: > > >http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html > > >why this simple script doesn't get executed by apache? >----------------------------------------------------- >another question I like to ask you is: >where can I get a .exe for installing mod_python? (for python 2.7 and apache >2.2) > > >I've read the manual process for installing modpython in this web site: > > >http://www.modpython.org/live/mod_python-2.7.8/doc-html/app-wininst.html > > >but it requires 'mod_python.dll' which I don't know where and how to get it >after googling it. it seems hard to find modpython for automation installation. >one has advise me to use 'mod_wsgi' and he said it's better then 'modpython' >since i need it for web base apps in python. > > >if you know how \ where to get modpython full installation Please give me the >URL. > > >thanks > > > > > > > We are all equal at the end. > > > > > ________________________________ From: Marco De Paoli <dep...@gm...> >To: cx-...@li... >Sent: Fri, June 3, 2011 11:47:53 PM >Subject: Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) > > >cx_Oracle 5.1 is the current version > >(I suggest you to use that and not not the 4.X) > >First of all build a minimal script that works at the command line. Only at that >point you can build a web version > >psp means a mod_perl script >(Apache settings are OT in this ML) > >Marco > > >On Sat, Jun 4, 2011 at 4:33 AM, Me <zed...@ya...> wrote: > >Hello All >> >> >>I'm newbie to Python, Oracle and Apache 2.2 >>I've installed python 2.7 (ActiveState version), apache 2.2 and Oracle 10g XE. >> >> >>All of them running in the same machine with XP as a OS. >> >> >>I yet don't have 'mod_python' installed but I am planing to do so later. >>(just using CGI script for time being although for web development i've read >>mod_python is the best.) >> >> >>I just download the 'cx_Oracle-4.1.2-win32-10g-py27.exe' from the Oracle web >>site which is: >>(http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html) >> >> >>the installation went smooth with no problem as the above site walks through. >>then as site instructed::Create a file ora.psp under APACHE_HOME/htdocs to see >>whether the cx_Oracle module is working properly. >>-------------------------------------- >><% >>import cx_Oracle >>db = cx_Oracle.connect('username', 'password', '127.0.0.1/XE') >>c = db.cursor() >> >>c.execute('select * from dual') >>req.write(c.fetchall()[0][0]) >> >>db.close() >>%> >> >>I put my username\pass for log in to Oracle as it works with database after >>login. >>------------------------------------ >>i did save the file in notepad and put it in C:\Program Files\Apache Software >>Foundation\Apache2.2\htdocs\ora.psp ( i saved as: "ora.psp" to eliminated the >>extra extention) >> >> >> >>when i go to url: ( http://127.0.0.1/ora.psp ) it just shows the content of the >>file like in notepad.(plain code) as it supposed to show 'x' in browser. (as a >>result of execuation of file) >> >> >>Apache 2.2 runs in port 80 (default) >>Oracle : http://127.0.0.1:8080/apex/f?p=4550:11:4261762709150240::NO::: (login >>page) >> >> >>However at python command prompt when I execute the following: >>>>> import cx_Oracle >>>>> print 'The version of cx_oracle is: ', cx_Oracle.version >>The version of cx_oracle is: 5.1 >> >>------------------------------------ >> >> >>Please help me to fix this test which is for connection to oracle. >> Is it because of I yet don't have mod_python installed in my machine? >> >> >>Your help much appreciated. >> >> >> Pink Floyd: >>>> We are all equal at the end. >> >> >>------------------------------------------------------------------------------ >>Simplify data backup and recovery for your virtual environment with vRanger. >>Installation's a snap, and flexible recovery options mean your data is safe, >>secure and there when you need it. Discover what all the cheering's about. >>Get your free trial download today. >>http://p.sf.net/sfu/quest-dev2dev2 >>_______________________________________________ >>cx-oracle-users mailing list >>cx-...@li... >>https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > >------------------------------------------------------------------------------ >Simplify data backup and recovery for your virtual environment with vRanger. >Installation's a snap, and flexible recovery options mean your data is safe, >secure and there when you need it. Discover what all the cheering's about. >Get your free trial download today. >http://p.sf.net/sfu/quest-dev2dev2 >_______________________________________________ >cx-oracle-users mailing list >cx-...@li... >https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Marco De P. <dep...@gm...> - 2011-06-05 20:53:35
|
please consider that Apache and mod_python are OT in a cx_Oracle maling list: cx_Oracle is not web-oriented, it is a wrapper for the Oracle Call Interface. Stop. please consider that this list doesn't give help on Oracle website articles please consider you are referring an article which is five year old That said. I gave a look at the article you link: you need mod_python, you can't simply use CGI you can download it from here http://archive.apache.org/dist/httpd/modpython/win/3.3.1/ choose the correct version based on the python and apache you use Marco On Sun, Jun 5, 2011 at 3:12 AM, Me <zed...@ya...> wrote: > Hi > > > thanks for your reply. > > what I am wondering about is, why my script shown in previous email doesn't > generate the expected result which is showing 'X' in browser after > execution.? > > explained in the Oracle page for cx_oracle db api for python. > > > the oracle URL from which I downloaded and followed for installation is: > > > > http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html > > > why this simple script doesn't get executed by apache? > > ----------------------------------------------------- > > another question I like to ask you is: > > where can I get a .exe for installing mod_python? (for python 2.7 and > apache 2.2) > > > I've read the manual process for installing modpython in this web site: > > > http://www.modpython.org/live/mod_python-2.7.8/doc-html/app-wininst.html > > > but it requires 'mod_python.dll' which I don't know where and how to get it > after googling it. it seems hard to find modpython for automation > installation. > > one has advise me to use 'mod_wsgi' and he said it's better then > 'modpython' since i need it for web base apps in python. > > > if you know how \ where to get modpython full installation Please give me > the URL. > > > thanks > > > > > > We are all equal at the end. > > > ------------------------------ > *From:* Marco De Paoli <dep...@gm...> > *To:* cx-...@li... > *Sent:* Fri, June 3, 2011 11:47:53 PM > *Subject:* Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) > > cx_Oracle 5.1 is the current version > > (I suggest you to use that and not not the 4.X) > > First of all build a minimal script that works at the command line. Only at > that point you can build a web version > > psp means a mod_perl script > (Apache settings are OT in this ML) > > Marco > > On Sat, Jun 4, 2011 at 4:33 AM, Me <zed...@ya...> wrote: > >> Hello All >> >> >> I'm newbie to Python, Oracle and Apache 2.2 >> >> I've installed python 2.7 (ActiveState version), apache 2.2 and Oracle 10g >> XE. >> >> >> All of them running in the same machine with XP as a OS. >> >> >> I yet don't have 'mod_python' installed but I am planing to do so later. >> >> (just using CGI script for time being although for web development i've >> read mod_python is the best.) >> >> >> I just download the 'cx_Oracle-4.1.2-win32-10g-py27.exe' from the Oracle >> web site which is: >> >> ( >> http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html >> ) >> >> >> the installation went smooth with no problem as the above site walks >> through. >> >> then as site instructed::Create a file ora.psp under APACHE_HOME/htdocs to >> see whether the cx_Oracle module is working properly. >> >> -------------------------------------- >> >> <% >> import cx_Oracle >> db = cx_Oracle.connect('username', 'password', '127.0.0.1/XE') >> c = db.cursor() >> >> c.execute('select * from dual') >> req.write(c.fetchall()[0][0]) >> >> db.close() >> %> >> >> I put my username\pass for log in to Oracle as it works with database >> after login. >> >> ------------------------------------ >> >> i did save the file in notepad and put it in C:\Program Files\Apache >> Software Foundation\Apache2.2\htdocs\ora.psp ( i saved as: "ora.psp" to >> eliminated the extra extention) >> >> >> when i go to url: ( http://127.0.0.1/ora.psp ) it just shows the content >> of the file like in notepad.(plain code) as it supposed *to show 'x' in >> browser. (as a result of execuation of file)* >> >> >> Apache 2.2 runs in port 80 (default) >> >> Oracle : http://127.0.0.1:8080/apex/f?p=4550:11:4261762709150240::NO::: >> (login page) >> >> >> However at python command prompt when I execute the following: >> >> >>> import cx_Oracle >> >>> print 'The version of cx_oracle is: ', cx_Oracle.version >> The version of cx_oracle is: 5.1 >> >> ------------------------------------ >> >> >> Please help me to fix this test which is for connection to oracle. >> >> Is it because of I yet don't have mod_python installed in my machine? >> >> >> Your help much appreciated. >> >> >> >> Pink Floyd: >>>> We are all equal at the end. >> >> >> >> ------------------------------------------------------------------------------ >> Simplify data backup and recovery for your virtual environment with >> vRanger. >> Installation's a snap, and flexible recovery options mean your data is >> safe, >> secure and there when you need it. Discover what all the cheering's about. >> Get your free trial download today. >> http://p.sf.net/sfu/quest-dev2dev2 >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with > vRanger. > Installation's a snap, and flexible recovery options mean your data is > safe, > secure and there when you need it. Discover what all the cheering's about. > Get your free trial download today. > http://p.sf.net/sfu/quest-dev2dev2 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Me <zed...@ya...> - 2011-06-05 01:13:02
|
Hi thanks for your reply. what I am wondering about is, why my script shown in previous email doesn't generate the expected result which is showing 'X' in browser after execution.? explained in the Oracle page for cx_oracle db api for python. the oracle URL from which I downloaded and followed for installation is: http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html why this simple script doesn't get executed by apache? ----------------------------------------------------- another question I like to ask you is: where can I get a .exe for installing mod_python? (for python 2.7 and apache 2.2) I've read the manual process for installing modpython in this web site: http://www.modpython.org/live/mod_python-2.7.8/doc-html/app-wininst.html but it requires 'mod_python.dll' which I don't know where and how to get it after googling it. it seems hard to find modpython for automation installation. one has advise me to use 'mod_wsgi' and he said it's better then 'modpython' since i need it for web base apps in python. if you know how \ where to get modpython full installation Please give me the URL. thanks We are all equal at the end. ________________________________ From: Marco De Paoli <dep...@gm...> To: cx-...@li... Sent: Fri, June 3, 2011 11:47:53 PM Subject: Re: [cx-oracle-users] Python and Oracle DB API (cx_oracle) cx_Oracle 5.1 is the current version (I suggest you to use that and not not the 4.X) First of all build a minimal script that works at the command line. Only at that point you can build a web version psp means a mod_perl script (Apache settings are OT in this ML) Marco On Sat, Jun 4, 2011 at 4:33 AM, Me <zed...@ya...> wrote: Hello All > > >I'm newbie to Python, Oracle and Apache 2.2 >I've installed python 2.7 (ActiveState version), apache 2.2 and Oracle 10g XE. > > >All of them running in the same machine with XP as a OS. > > >I yet don't have 'mod_python' installed but I am planing to do so later. >(just using CGI script for time being although for web development i've read >mod_python is the best.) > > >I just download the 'cx_Oracle-4.1.2-win32-10g-py27.exe' from the Oracle web >site which is: >(http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html) > > >the installation went smooth with no problem as the above site walks through. >then as site instructed::Create a file ora.psp under APACHE_HOME/htdocs to see >whether the cx_Oracle module is working properly. >-------------------------------------- ><% >import cx_Oracle >db = cx_Oracle.connect('username', 'password', '127.0.0.1/XE') >c = db.cursor() > >c.execute('select * from dual') >req.write(c.fetchall()[0][0]) > >db.close() >%> > >I put my username\pass for log in to Oracle as it works with database after >login. >------------------------------------ >i did save the file in notepad and put it in C:\Program Files\Apache Software >Foundation\Apache2.2\htdocs\ora.psp ( i saved as: "ora.psp" to eliminated the >extra extention) > > > >when i go to url: ( http://127.0.0.1/ora.psp ) it just shows the content of the >file like in notepad.(plain code) as it supposed to show 'x' in browser. (as a >result of execuation of file) > > >Apache 2.2 runs in port 80 (default) >Oracle : http://127.0.0.1:8080/apex/f?p=4550:11:4261762709150240::NO::: (login >page) > > >However at python command prompt when I execute the following: >>>> import cx_Oracle >>>> print 'The version of cx_oracle is: ', cx_Oracle.version >The version of cx_oracle is: 5.1 > >------------------------------------ > > >Please help me to fix this test which is for connection to oracle. > Is it because of I yet don't have mod_python installed in my machine? > > >Your help much appreciated. > > > Pink Floyd: >>>> We are all equal at the end. > > >------------------------------------------------------------------------------ >Simplify data backup and recovery for your virtual environment with vRanger. >Installation's a snap, and flexible recovery options mean your data is safe, >secure and there when you need it. Discover what all the cheering's about. >Get your free trial download today. >http://p.sf.net/sfu/quest-dev2dev2 >_______________________________________________ >cx-oracle-users mailing list >cx-...@li... >https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Marco De P. <dep...@gm...> - 2011-06-04 06:48:00
|
cx_Oracle 5.1 is the current version (I suggest you to use that and not not the 4.X) First of all build a minimal script that works at the command line. Only at that point you can build a web version psp means a mod_perl script (Apache settings are OT in this ML) Marco On Sat, Jun 4, 2011 at 4:33 AM, Me <zed...@ya...> wrote: > Hello All > > > I'm newbie to Python, Oracle and Apache 2.2 > > I've installed python 2.7 (ActiveState version), apache 2.2 and Oracle 10g > XE. > > > All of them running in the same machine with XP as a OS. > > > I yet don't have 'mod_python' installed but I am planing to do so later. > > (just using CGI script for time being although for web development i've > read mod_python is the best.) > > > I just download the 'cx_Oracle-4.1.2-win32-10g-py27.exe' from the Oracle > web site which is: > > ( > http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html > ) > > > the installation went smooth with no problem as the above site walks > through. > > then as site instructed::Create a file ora.psp under APACHE_HOME/htdocs to > see whether the cx_Oracle module is working properly. > > -------------------------------------- > > <% > import cx_Oracle > db = cx_Oracle.connect('username', 'password', '127.0.0.1/XE') > c = db.cursor() > > c.execute('select * from dual') > req.write(c.fetchall()[0][0]) > > db.close() > %> > > I put my username\pass for log in to Oracle as it works with database > after login. > > ------------------------------------ > > i did save the file in notepad and put it in C:\Program Files\Apache > Software Foundation\Apache2.2\htdocs\ora.psp ( i saved as: "ora.psp" to > eliminated the extra extention) > > > when i go to url: ( http://127.0.0.1/ora.psp ) it just shows the content > of the file like in notepad.(plain code) as it supposed *to show 'x' in > browser. (as a result of execuation of file)* > > > Apache 2.2 runs in port 80 (default) > > Oracle : http://127.0.0.1:8080/apex/f?p=4550:11:4261762709150240::NO::: > (login page) > > > However at python command prompt when I execute the following: > > >>> import cx_Oracle > >>> print 'The version of cx_oracle is: ', cx_Oracle.version > The version of cx_oracle is: 5.1 > > ------------------------------------ > > > Please help me to fix this test which is for connection to oracle. > > Is it because of I yet don't have mod_python installed in my machine? > > > Your help much appreciated. > > > > Pink Floyd: >>>> We are all equal at the end. > > > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with > vRanger. > Installation's a snap, and flexible recovery options mean your data is > safe, > secure and there when you need it. Discover what all the cheering's about. > Get your free trial download today. > http://p.sf.net/sfu/quest-dev2dev2 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Me <zed...@ya...> - 2011-06-04 02:33:37
|
Hello All I'm newbie to Python, Oracle and Apache 2.2 I've installed python 2.7 (ActiveState version), apache 2.2 and Oracle 10g XE. All of them running in the same machine with XP as a OS. I yet don't have 'mod_python' installed but I am planing to do so later. (just using CGI script for time being although for web development i've read mod_python is the best.) I just download the 'cx_Oracle-4.1.2-win32-10g-py27.exe' from the Oracle web site which is: (http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html) the installation went smooth with no problem as the above site walks through. then as site instructed::Create a file ora.psp under APACHE_HOME/htdocs to see whether the cx_Oracle module is working properly. -------------------------------------- <% import cx_Oracle db = cx_Oracle.connect('username', 'password', '127.0.0.1/XE') c = db.cursor() c.execute('select * from dual') req.write(c.fetchall()[0][0]) db.close() %> I put my username\pass for log in to Oracle as it works with database after login. ------------------------------------ i did save the file in notepad and put it in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ora.psp ( i saved as: "ora.psp" to eliminated the extra extention) when i go to url: ( http://127.0.0.1/ora.psp ) it just shows the content of the file like in notepad.(plain code) as it supposed to show 'x' in browser. (as a result of execuation of file) Apache 2.2 runs in port 80 (default) Oracle : http://127.0.0.1:8080/apex/f?p=4550:11:4261762709150240::NO::: (login page) However at python command prompt when I execute the following: >>> import cx_Oracle >>> print 'The version of cx_oracle is: ', cx_Oracle.version The version of cx_oracle is: 5.1 ------------------------------------ Please help me to fix this test which is for connection to oracle. Is it because of I yet don't have mod_python installed in my machine? Your help much appreciated. Pink Floyd: >>>> We are all equal at the end. |
From: Rodney B. <ba...@pl...> - 2011-05-31 19:40:06
|
Thanks for the reply, Anthony. I'll let this sit for a while. Rodney -----Original Message----- From: Anthony Tuininga [mailto:ant...@gm...] Sent: Tuesday, May 31, 2011 1:39 PM To: cx-...@li... Subject: Re: [cx-oracle-users] ORA-01461 when inserting into VARCHAR2 column Hi Rodney, The lack of response (on my part anyway) is due to sheer busyness. I hope to have more time in the near future and when I get a chance to look at this problem I'll respond to your request for help. In the meantime I do appreciate you trying to make it easier for me! Anthony On Tue, May 31, 2011 at 11:29 AM, Rodney Barnett <ba...@pl...> wrote: > In case the lack of response is due to the absence of any sample code, > here's a patch that adds a couple of tests to illustrate the problem. The > test in StringVar.py succeeds while the equivalent test in uStringVar.py > fails. > > Rodney > > diff -Naur cx_Oracle-5.1/test/SetupTest.sql > cx_Oracle-5.1test/test/SetupTest.sql > --- cx_Oracle-5.1/test/SetupTest.sql 2011-03-19 18:05:30.000000000 -0500 > +++ cx_Oracle-5.1test/test/SetupTest.sql 2011-05-31 > 11:35:50.458172563 -0500 > @@ -102,7 +102,7 @@ > > create table cx_Oracle.TestExecuteMany ( > IntCol number(9) not null, > - StringCol varchar2(100) > + StringCol varchar2(4000) > ) tablespace users; > > create table cx_Oracle.TestObjects ( > diff -Naur cx_Oracle-5.1/test/StringVar.py > cx_Oracle-5.1test/test/StringVar.py > --- cx_Oracle-5.1/test/StringVar.py 2011-03-19 18:05:30.000000000 -0500 > +++ cx_Oracle-5.1test/test/StringVar.py 2011-05-31 12:07:49.142192794 -0500 > @@ -248,6 +248,17 @@ > inString = "X" * badStringSize > self.failUnlessRaises(ValueError, var.setvalue, 0, inString) > > + def testInsert2001(self): > + """test inserting 2001 characters into varchar2 column""" > + self.cursor.execute("truncate table TestExecuteMany") > + inString = "x" * 2001 > + sql = "insert into TestExecuteMany (IntCol, StringCol) " \ > + "values (:1, :2)" > + self.cursor.execute(sql, [1, inString]) > + self.cursor.execute("select count(*) from TestExecuteMany") > + count, = self.cursor.fetchone() > + self.failUnlessEqual(count, 1) > + > def testCursorDescription(self): > "test cursor description is accurate" > self.cursor.execute("select * from TestStrings") > diff -Naur cx_Oracle-5.1/test/uStringVar.py > cx_Oracle-5.1test/test/uStringVar.py > --- cx_Oracle-5.1/test/uStringVar.py 2011-03-19 18:05:29.000000000 -0500 > +++ cx_Oracle-5.1test/test/uStringVar.py 2011-05-31 > 12:08:28.850211512 -0500 > @@ -228,6 +228,17 @@ > inString = u"X" * badStringSize > self.failUnlessRaises(ValueError, var.setvalue, 0, inString) > > + def testInsert2001(self): > + """test inserting 2001 characters into varchar2 column""" > + self.cursor.execute("truncate table TestExecuteMany") > + inString = u"x" * 2001 > + sql = "insert into TestExecuteMany (IntCol, StringCol) " \ > + "values (:1, :2)" > + self.cursor.execute(sql, [1, inString]) > + self.cursor.execute("select count(*) from TestExecuteMany") > + count, = self.cursor.fetchone() > + self.failUnlessEqual(count, 1) > + > def testCursorDescription(self): > "test cursor description is accurate" > self.cursor.execute(u"select * from TestStrings") > > > > > ---------------------------------------------------------------------------- -- > Simplify data backup and recovery for your virtual environment with vRanger. > Installation's a snap, and flexible recovery options mean your data is safe, > secure and there when you need it. Data protection magic? > Nope - It's vRanger. Get your free trial download today. > http://p.sf.net/sfu/quest-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > ---------------------------------------------------------------------------- -- Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Anthony T. <ant...@gm...> - 2011-05-31 18:39:21
|
Hi Rodney, The lack of response (on my part anyway) is due to sheer busyness. I hope to have more time in the near future and when I get a chance to look at this problem I'll respond to your request for help. In the meantime I do appreciate you trying to make it easier for me! Anthony On Tue, May 31, 2011 at 11:29 AM, Rodney Barnett <ba...@pl...> wrote: > In case the lack of response is due to the absence of any sample code, > here's a patch that adds a couple of tests to illustrate the problem. The > test in StringVar.py succeeds while the equivalent test in uStringVar.py > fails. > > Rodney > > diff -Naur cx_Oracle-5.1/test/SetupTest.sql > cx_Oracle-5.1test/test/SetupTest.sql > --- cx_Oracle-5.1/test/SetupTest.sql 2011-03-19 18:05:30.000000000 -0500 > +++ cx_Oracle-5.1test/test/SetupTest.sql 2011-05-31 > 11:35:50.458172563 -0500 > @@ -102,7 +102,7 @@ > > create table cx_Oracle.TestExecuteMany ( > IntCol number(9) not null, > - StringCol varchar2(100) > + StringCol varchar2(4000) > ) tablespace users; > > create table cx_Oracle.TestObjects ( > diff -Naur cx_Oracle-5.1/test/StringVar.py > cx_Oracle-5.1test/test/StringVar.py > --- cx_Oracle-5.1/test/StringVar.py 2011-03-19 18:05:30.000000000 -0500 > +++ cx_Oracle-5.1test/test/StringVar.py 2011-05-31 12:07:49.142192794 -0500 > @@ -248,6 +248,17 @@ > inString = "X" * badStringSize > self.failUnlessRaises(ValueError, var.setvalue, 0, inString) > > + def testInsert2001(self): > + """test inserting 2001 characters into varchar2 column""" > + self.cursor.execute("truncate table TestExecuteMany") > + inString = "x" * 2001 > + sql = "insert into TestExecuteMany (IntCol, StringCol) " \ > + "values (:1, :2)" > + self.cursor.execute(sql, [1, inString]) > + self.cursor.execute("select count(*) from TestExecuteMany") > + count, = self.cursor.fetchone() > + self.failUnlessEqual(count, 1) > + > def testCursorDescription(self): > "test cursor description is accurate" > self.cursor.execute("select * from TestStrings") > diff -Naur cx_Oracle-5.1/test/uStringVar.py > cx_Oracle-5.1test/test/uStringVar.py > --- cx_Oracle-5.1/test/uStringVar.py 2011-03-19 18:05:29.000000000 -0500 > +++ cx_Oracle-5.1test/test/uStringVar.py 2011-05-31 > 12:08:28.850211512 -0500 > @@ -228,6 +228,17 @@ > inString = u"X" * badStringSize > self.failUnlessRaises(ValueError, var.setvalue, 0, inString) > > + def testInsert2001(self): > + """test inserting 2001 characters into varchar2 column""" > + self.cursor.execute("truncate table TestExecuteMany") > + inString = u"x" * 2001 > + sql = "insert into TestExecuteMany (IntCol, StringCol) " \ > + "values (:1, :2)" > + self.cursor.execute(sql, [1, inString]) > + self.cursor.execute("select count(*) from TestExecuteMany") > + count, = self.cursor.fetchone() > + self.failUnlessEqual(count, 1) > + > def testCursorDescription(self): > "test cursor description is accurate" > self.cursor.execute(u"select * from TestStrings") > > > > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with vRanger. > Installation's a snap, and flexible recovery options mean your data is safe, > secure and there when you need it. Data protection magic? > Nope - It's vRanger. Get your free trial download today. > http://p.sf.net/sfu/quest-sfdev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Rodney B. <ba...@pl...> - 2011-05-31 17:29:44
|
In case the lack of response is due to the absence of any sample code, here's a patch that adds a couple of tests to illustrate the problem. The test in StringVar.py succeeds while the equivalent test in uStringVar.py fails. Rodney diff -Naur cx_Oracle-5.1/test/SetupTest.sql cx_Oracle-5.1test/test/SetupTest.sql --- cx_Oracle-5.1/test/SetupTest.sql 2011-03-19 18:05:30.000000000 -0500 +++ cx_Oracle-5.1test/test/SetupTest.sql 2011-05-31 11:35:50.458172563 -0500 @@ -102,7 +102,7 @@ create table cx_Oracle.TestExecuteMany ( IntCol number(9) not null, - StringCol varchar2(100) + StringCol varchar2(4000) ) tablespace users; create table cx_Oracle.TestObjects ( diff -Naur cx_Oracle-5.1/test/StringVar.py cx_Oracle-5.1test/test/StringVar.py --- cx_Oracle-5.1/test/StringVar.py 2011-03-19 18:05:30.000000000 -0500 +++ cx_Oracle-5.1test/test/StringVar.py 2011-05-31 12:07:49.142192794 -0500 @@ -248,6 +248,17 @@ inString = "X" * badStringSize self.failUnlessRaises(ValueError, var.setvalue, 0, inString) + def testInsert2001(self): + """test inserting 2001 characters into varchar2 column""" + self.cursor.execute("truncate table TestExecuteMany") + inString = "x" * 2001 + sql = "insert into TestExecuteMany (IntCol, StringCol) " \ + "values (:1, :2)" + self.cursor.execute(sql, [1, inString]) + self.cursor.execute("select count(*) from TestExecuteMany") + count, = self.cursor.fetchone() + self.failUnlessEqual(count, 1) + def testCursorDescription(self): "test cursor description is accurate" self.cursor.execute("select * from TestStrings") diff -Naur cx_Oracle-5.1/test/uStringVar.py cx_Oracle-5.1test/test/uStringVar.py --- cx_Oracle-5.1/test/uStringVar.py 2011-03-19 18:05:29.000000000 -0500 +++ cx_Oracle-5.1test/test/uStringVar.py 2011-05-31 12:08:28.850211512 -0500 @@ -228,6 +228,17 @@ inString = u"X" * badStringSize self.failUnlessRaises(ValueError, var.setvalue, 0, inString) + def testInsert2001(self): + """test inserting 2001 characters into varchar2 column""" + self.cursor.execute("truncate table TestExecuteMany") + inString = u"x" * 2001 + sql = "insert into TestExecuteMany (IntCol, StringCol) " \ + "values (:1, :2)" + self.cursor.execute(sql, [1, inString]) + self.cursor.execute("select count(*) from TestExecuteMany") + count, = self.cursor.fetchone() + self.failUnlessEqual(count, 1) + def testCursorDescription(self): "test cursor description is accurate" self.cursor.execute(u"select * from TestStrings") |