473,379 Members | 1,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Got Python web host, yay! Now what?

I found a good web host that has Python 2.x support and I've set up an
account. It's LunarPages.com if you're interested . Do I have to do
anything special to run Python scripts, besides upload the script to the
cgi-bin directory? If so, please direct me to a good web page or doc that
goes into the necessary details.

thx

--

Robert Oschler
"Let the web hear you, add your voice to your web site in minutes!"
-- http://audiodirect.spiderchase.com/
(For a limited time, free voiceover with every sign-up, use this link
instead)
-- http://audio.spiderchase.com/
(A song - are you blue?)
-- http://bluedreams.spiderchase.com/
Jul 18 '05 #1
2 3487
On Thu, 21 Aug 2003 16:47:07 GMT, "Robert Oschler"
<no_replies@fake_email_address.invalid> wrote in comp.lang.python in
article <fI*********************@news2.news.adelphia.net >:
I found a good web host that has Python 2.x support and I've set up an
account. It's LunarPages.com if you're interested . Do I have to do
anything special to run Python scripts, besides upload the script to the
cgi-bin directory? If so, please direct me to a good web page or doc that
goes into the necessary details.

thx


This will depend on the set up that your web host provides.

On the server where I host, I simply upload my scripts to cgi-bin and they
run.

However, I recently helped someone set up a script on a different server,
and after a couple of hours of tearing our hair out, we found out that on
that server, all scripts had to be renamed to have a .cgi extension, or
they would not run. (I've usually run my scripts with a .py extension.)

So, you should check with your host to find out what requirements they may
have for running cgi scripts.

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/

Jul 18 '05 #2
On Thu, 21 Aug 2003 16:47:07 +0000, Robert Oschler wrote:
I found a good web host that has Python 2.x support and I've set up an
account. It's LunarPages.com if you're interested . Do I have to do
anything special to run Python scripts, besides upload the script to the
cgi-bin directory? If so, please direct me to a good web page or doc that
goes into the necessary details.

thx

--

Robert Oschler

3 things to watch out for

1. Make sure permissions are set to 755 (chmod 755 yourscript.py)

2. Make sure the 'bang' line (the first line of the file) is correct.
If python is at /usr/bin/python, the first line of the file should
be exactly #!/usr/bin/python

3. Make sure your script outputs a Content-type (and possibly other, as
needed) headers.

Code sample:

print 'Content-type: text/html'
print ''

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Nick Keighley | last post by:
I'm probably missing something rather obvious, but is there a known problem with getting a Python based socket program to communicate with a C based socket program? A simple echo server written in...
44
by: Carl | last post by:
"Nine Language Performance Round-up: Benchmarking Math & File I/O" http://www.osnews.com/story.php?news_id=5602 I think this is an unfair comparison! I wouldn't dream of developing a numerical...
7
by: Ixokai | last post by:
Hello all. :) I've been a long time Python fan, and have fairly recently (with the support of a coworker who surprised me by mentioning my pet language one day) convinced my company to begin the...
3
by: Xah Lee | last post by:
20050226 exercise: generate all possible pairings given a list that is a set partitioned into subsets, generate a list of all possible pairings of elements in any two subset. Example: ...
0
by: paul | last post by:
Hello, I am trying to make up a catalogue of my books. I found tools on isbntools.com in python. YAY i thought. Something happens! But I cant seem to get the part to download the books...
5
by: Maurice LING | last post by:
Hi, I've been using FB1.5 and access the database using Kinterbasdb + Python. My connection is established using kinterbasdb.connect() method and the parameters host, dns, database, user,...
26
by: A.M | last post by:
Hi, I am new to Python, with C#/Java background Is there any built-in Hash implementation in Python? I am looking for a container that I can access to it's items by name. Something...
0
by: metaperl | last post by:
A Comparison of Python Class Objects and Init Files for Program Configuration ============================================================================= Terrence Brannon bauhaus@metaperl.com...
4
by: Derek Martin | last post by:
Hi kids! I've got some code that uses select.select() to capture all the output of a subprocess (both stdout and stderr, see below). This code works as expected on a variety of Fedora systems...
9
by: Blubaugh, David A. | last post by:
Sir, You are absolutely correct. I was praying to G_d I did not have to slaughter my project's source code in this manner. However, like life itself, I was given legacy source code (i.e....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.