Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 29th, 2003, 04:17 PM
cmi cmi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Germany
Posts: 10 cmi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
newbie needs help with mod_python

Hiya,

I just installed python 2.3, the lastest stable apache2 and the latest mod_python.

I just want to write a little "hello world"-script to check if mod_python is installed in the right way. So I used the mod_python-example for this script

Quote:
from mod_python import apache

def handler(req):
req.write("Hello World")
return apache.OK


but I get an error 500 all the time and the apache error-log present this line
Quote:
[Fri Aug 29 23:00:18 2003] [error] make_obcallback: could not call init.


Maybe the directory-entry in the httpd.conf is wrong, but I'm very new at administer an server

Quote:
<Directory "D:/Programme/Apache Group/Apache2/Apache2/htdocs/python">
AddHandler python-program .py
PythonHandler mptest
PythonDebug On
</Directory>

What does the python-handler mean? Do I have to add a handler for every new file? Can't believe it

Every help would be very nice. Maybe somebody have a link to a mod_python-tutorial?

Thank you

Reply With Quote
  #2  
Old August 29th, 2003, 05:17 PM
jimmy2k1 jimmy2k1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 89 jimmy2k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 48 m 50 sec
Reputation Power: 7
bah I had to go through hell trying to get mod_python to work when I had Python 2.2, I don't even bother with 2.3, nothing works for me.

Reply With Quote
  #3  
Old August 29th, 2003, 06:43 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
I have to agree with 2k's statment about going though hell with mod_python. I've tired so many times to get it working and finally just gave up (for now). You obviously got further than me as I couldn't even get Apache to start up once i'd finished following there intallation instructions . I even tried suing the windows installer, same deal.

I'd just stick to CGI when using Python for web programming.. at least for now, maybe in the future they will make it easier to handle i'll reconsider my oppion.

2k, Python 2.3 is (at least in my oppion) much better than 2.2 (and I was/am very happy with 2.2), definatly worth the upgrade! I've got no complains so far at all.. infact there is only one thing i was expecting to see but having and thats a function to check a variables existance (similar to PHP and isset) maybe next time.

Sorry, i know this isn't much help,
Mark.

Reply With Quote
  #4  
Old August 30th, 2003, 05:54 AM
cmi cmi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Germany
Posts: 10 cmi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
So did I understood you correctly, that mod_python is very hard to handle? Hm thats bad I want to learn Python and I did learn other programming languages using their web-abilities, beacuse this is the most usefull for me But thanks for the info, that I'm not alone with my problems

Reply With Quote
  #5  
Old August 30th, 2003, 11:52 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
well you can use Python for CGI in just about the same way as mod_python, it's not as powerful when it comes to interacting with the server and it's a tad slower but other than that the two are the same.. it's my fav' way of working with Python on the web without heading into Zope and ect.

Wana use Python like PHP, check out Spyce at http://spyce.sourceforge.net/

Mark.

Reply With Quote
  #6  
Old August 30th, 2003, 11:27 PM
jimmy2k1 jimmy2k1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 89 jimmy2k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 48 m 50 sec
Reputation Power: 7
Quote:
Originally posted by netytan
I have to agree with 2k's statment about going though hell with mod_python. I've tired so many times to get it working and finally just gave up (for now). You obviously got further than me as I couldn't even get Apache to start up once i'd finished following there intallation instructions . I even tried suing the windows installer, same deal.

I'd just stick to CGI when using Python for web programming.. at least for now, maybe in the future they will make it easier to handle i'll reconsider my oppion.

2k, Python 2.3 is (at least in my oppion) much better than 2.2 (and I was/am very happy with 2.2), definatly worth the upgrade! I've got no complains so far at all.. infact there is only one thing i was expecting to see but having and thats a function to check a variables existance (similar to PHP and isset) maybe next time.

Sorry, i know this isn't much help,
Mark.

I was talking about giving up trying to get mod_python to work with Python 2.3. I already upgraded when the Python 2.3 came out.

Reply With Quote
  #7  
Old August 31st, 2003, 02:37 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Sorry, my mistake 2k..

Mark.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > newbie needs help with mod_python


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway