|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
||||
|
||||
|
Class not loading properly in CGI
Hullo,
I've got a very, very odd problem here which I can't seem to solve. I'm creating a class instance in a CGI script, but that instance isn't inheriting all of the methods associated with that file. Confused? Here's what I mean: the commands to check: import db mydb = db.mySQL() str(dir(mydb)) done in a python shell on my machine: "['__doc__', '__init__', '__module__', 'connectTime', 'cursor', 'delete', 'fetchRow', 'fetchRows', 'info', 'insert', 'mysql', 'update']" in the cgi script online: ['connectTime', 'cursor', 'mysql'] What on earth is going on? |
|
#2
|
||||
|
||||
|
Hey telex, its a nice idea thats for sure! I gave it a try earlier but i couldnt get it to connect?
Anyway this is pretty wierd.. i guess.. are both your computer and the server running the same version of Python on the same OS etc? Oh, is it just this class of does this happen with classes from other modules? Mark. |
|
#3
|
||||
|
||||
|
Ah, well the Python installation on the web server is 1.5.2, whilst I'm using 2.2.3... could this be it? Is there anything that the 2.x series changed in this regard?
http://www.newtolinux.org.uk/techne/install.py That page shows useful info relating to this problem. |
|
#4
|
||||
|
||||
|
Could well be
, an increadable amount has changed since Python 1.5 although i wasn't Pythoning bach then . I first came across Python a month of two before Python 2 was released..So obviously my best sugestion would be UPDATE YOUR PYTHON VERSION - i'd give you a long list of reasons to do this but i'm sure you already have plenty of reasons - and see if that fixes the bug.Mark. |
|
#5
|
||||
|
||||
|
Yers, well I can bug my web host to do it, but it'd be good to isolate the problem anyway, in case they don't and so the code is backwards compatable. If anyone knows what they might have done to the class system to cause this problem, I'd appreciate help!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Class not loading properly in CGI |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|