Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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:
  #1  
Old May 9th, 2003, 01:07 AM
manishbh manishbh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 manishbh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to manishbh
configuring apache for python scripts

Hi,
How should I configure my apache server for runnning python scripts. I am able to run perl scripts from my apache server but unable to run python scripts. Please help me out.

Regards,
Manish Bhandari

Reply With Quote
  #2  
Old May 9th, 2003, 05:10 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,537 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 18 h 17 m 47 sec
Reputation Power: 68
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
Python CGI

If you can run Perl CGI already it should be pretty easy to use Python too. It's probably the path to Python which is causing the problem. Not knowing where you have Python installed or which platform your using id try #!/usr/bin/env python. on Windows it will find Python where ever you have it installed, on Linux/Unix I believe it searches only the usr/bin directory but in not sure about that. Anyway give it a try.

Mark

Reply With Quote
  #3  
Old May 9th, 2003, 05:44 AM
manishbh manishbh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 5 manishbh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to manishbh
I was able to run the python script

Hi,
I was able to run the python script successfully after spending a little more time on the problem. Now if anyone could tell me how to run jython scripts than that wud be really great. Because now I am stuck there. . I know this is not the right platform to post such questions, but I think jython is the logical next step for python application developers.

I am sure now that I am giving the right path, but the apache server gives an internal server error, every time i try to read a script that specifies the location to jython interpreter. Same file with the location of python interpreter works fine.

Does apache supports Jython scripts after all?

Regards,
Manish

Reply With Quote
  #4  
Old May 9th, 2003, 09:11 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,537 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 18 h 17 m 47 sec
Reputation Power: 68
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
Jython and CGI

Not having used Jython much I wouldnt know about developing in Jython. but if your trying to use Jython for CGI just use, #!/usr/bin/env jython. It works for me.

for example:

#!/usr/bin/env jython
print 'content-type: text/plain\n'
print 'yo, from jython'

if your talking about developing applets in Jython, then you dont need to configure apache at all as applets run client side. You'd have to check up on this though. If im wrong let me know!

Mark

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > configuring apache for python scripts

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap