473,326 Members | 2,127 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,326 software developers and data experts.

Web Programming thru python

HI,

Please help how to execute a py file with xitami.
I installed xitami , downloaded lrwp file.
accessing the first web application program
import urllib
# Get a file-like object for the Python Web site's home page.
f = urllib.urlopen("http://www.python.org")
# Read from the object, storing the page's contents in 's'.
s = f.read()
f.close()
through browser like "http://localhost/first.py
it is dispaying the source code of the first.py.
Please help me how to execute the file.
thank you.

Sep 17 '07 #1
3 1174
I have been wondering the same thing. I know you have to load the
mod_python into apache. But I failed on setting that up. I run an
ubuntu server.

But I would check out a site like this: http://webpython.codepoint.net/mod_python

-Daniel

On Sep 17, 7:14 am, python_lover <govisath...@gmail.comwrote:
HI,

Please help how to execute a py file with xitami.

I installed xitami , downloaded lrwp file.

accessing the first web application program

import urllib
# Get a file-like object for the Python Web site's home page.
f = urllib.urlopen("http://www.python.org")
# Read from the object, storing the page's contents in 's'.
s = f.read()
f.close()

through browser like "http://localhost/first.py

it is dispaying the source code of the first.py.

Please help me how to execute the file.

thank you.

Sep 17 '07 #2
danfolkes a écrit :
(top post corrected - Daniel, please, avoid top-posting...)
On Sep 17, 7:14 am, python_lover <govisath...@gmail.comwrote:
>HI,

Please help how to execute a py file with xitami.

I installed xitami , downloaded lrwp file.

accessing the first web application program

import urllib
# Get a file-like object for the Python Web site's home page.
f = urllib.urlopen("http://www.python.org")
# Read from the object, storing the page's contents in 's'.
s = f.read()
f.close()

through browser like "http://localhost/first.py

it is dispaying the source code of the first.py.

Please help me how to execute the file.

I have been wondering the same thing. I know you have to load the
mod_python into apache.
Not necessarily - there are other ways to serve python-generated dynamic
content from apache. But anyway, please note the OP is asking about
xitami, not apache...

Sep 17 '07 #3
python_lover <go*********@gmail.comwrote:
>
Please help how to execute a py file with xitami.

I installed xitami , downloaded lrwp file.

accessing the first web application program
...
through browser like "http://localhost/first.py

it is dispaying the source code of the first.py.

Please help me how to execute the file.
If you want this called as a CGI script, then you probably want this in the
cgi-bin directory. You can use [Cgi-Alias] to make other directories into
CGI directories as well.

If you want ALL .py files to be executed, you should be able to create a
filter using Xitami's configuration stuff at http://localhost/admin.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Sep 19 '07 #4

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

Similar topics

3
by: ssaeed1973 | last post by:
I am trying to write a program in python (brand new to Python) that would create a database of posts made to binary groups so the user can search for a certain file and have a nzb file returned. I...
13
by: yy0127 | last post by:
I don't know why i entered the below code and it will miss some records. Anyone can help me??? users = {} users1 = {} while 1: user, serviceType, msgType, inOut, date, time, numBytes =
2
by: Atz | last post by:
Hi ! The question is a bit tricky ( for me ) so please take it easy ... Im writing some program for Microchip chip testing... The program should send data to some LCD display which is on some...
0
by: Asheesh | last post by:
Hi, I want to configure client machine with oracle database server thru .Net programming. Can any body tell me how? Actually the scenario is: I am crating .net setup project for complete...
1
by: kishore_mca330 | last post by:
hi all ,i am kishore i have interest on system programming thru c.but i dont have any material to persue my learnings.pls any ooe who know any links or material pls send me reply tro my id .thanks...
23
by: herraotic | last post by:
I have been getting ready to learn programming for a long time, installed a GNU/Linux operating system, learnt the ins and outs but I think it is time to pick up a book and learn to now program. ...
38
by: ifti_crazy | last post by:
I am VB6 programmer and wants to start new programming language but i am unable to deciced. i have read about Python, Ruby and Visual C++. but i want to go through with GUI based programming...
3
by: FireNWater | last post by:
I'm working my way thru the book "Core Python Programming" 2d Edition - Wesley Chun. . . Trying to figure out what he's looking for on Page 248, Exercise 6-11 (a). Is it supposed to be: 1)...
6
by: John Ladasky | last post by:
Hi folks, I've played around with neural nets for a while. I wrote my own slow, pure-Python NN package. I knew that there were Python NN packages out there -- but I couldn't really understand...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.