Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread Chris Angelico
On Tue, Sep 22, 2015 at 7:36 AM, wrote: > Thank you very much. Can I write .py pages like in PHP or should I > use a framework like Django, Web2py or TurboGears? I recommend using WSGI and a framework that uses it (my personal preference is Flask, but the above will also work). Here are a couple

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread tropical . dude . net
On Monday, September 21, 2015 at 10:29:48 PM UTC+2, alister wrote: > On Mon, 21 Sep 2015 12:51:09 -0700, tropical.dude.net wrote: > > > On Monday, September 21, 2015 at 9:47:33 PM UTC+2, tropical...@gmail.com > > wrote: > >> On Monday, September 21, 2015 at 9:41:29 PM UTC+2, John Gordon wrote: > >

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread alister
On Mon, 21 Sep 2015 12:51:09 -0700, tropical.dude.net wrote: > On Monday, September 21, 2015 at 9:47:33 PM UTC+2, tropical...@gmail.com > wrote: >> On Monday, September 21, 2015 at 9:41:29 PM UTC+2, John Gordon wrote: >> > In <44e870a7-9567-40ba-8a65-d6b52a8c5...@googlegroups.com> >> > tropical.du

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread tropical . dude . net
On Monday, September 21, 2015 at 9:47:33 PM UTC+2, tropical...@gmail.com wrote: > On Monday, September 21, 2015 at 9:41:29 PM UTC+2, John Gordon wrote: > > In <44e870a7-9567-40ba-8a65-d6b52a8c5...@googlegroups.com> > > tropical.dude@gmail.com writes: > > > > > print("Content-Type: text/html;c

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread tropical . dude . net
On Monday, September 21, 2015 at 9:41:29 PM UTC+2, John Gordon wrote: > In <44e870a7-9567-40ba-8a65-d6b52a8c5...@googlegroups.com> > tropical.dude@gmail.com writes: > > > print("Content-Type: text/html;charset=utf-8") > > print("Hello World!") > > As I recall, you must have a blank line betw

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread tropical . dude . net
On Monday, September 21, 2015 at 9:30:11 PM UTC+2, Albert Visser wrote: > On Mon, 21 Sep 2015 20:41:13 +0200, wrote: > > > Hello everybody, > > > (...) > > > > I created index.py: > > #!/usr/bin/env python > > # -*- coding: UTF-8 -*-# enable debugging > > import cgitb > > > > cgitb.enable() > > p

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread John Gordon
In <44e870a7-9567-40ba-8a65-d6b52a8c5...@googlegroups.com> tropical.dude@gmail.com writes: > print("Content-Type: text/html;charset=utf-8") > print("Hello World!") As I recall, you must have a blank line between the headers and the content. But that may or may not be your problem, as you ha

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread tropical . dude . net
On Monday, September 21, 2015 at 9:20:22 PM UTC+2, sohca...@gmail.com wrote: > On Monday, September 21, 2015 at 11:41:54 AM UTC-7, tropical...@gmail.com > wrote: > > Hello everybody, > > > > I installed the LAMP stack on in Ubuntu, but I am having > > problems co

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread Albert Visser
On Mon, 21 Sep 2015 20:41:13 +0200, wrote: Hello everybody, (...) I created index.py: #!/usr/bin/env python # -*- coding: UTF-8 -*-# enable debugging import cgitb cgitb.enable() print("Content-Type: text/html;charset=utf-8") print("Hello World!") But it is still not working. Can anybody

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread sohcahtoa82
On Monday, September 21, 2015 at 11:41:54 AM UTC-7, tropical...@gmail.com wrote: > Hello everybody, > > I installed the LAMP stack on in Ubuntu, but I am having > problems configuring Apache to run python CGI scripts. > > I ran: > sudo a2enmod cgi > &

Problem configuring apache to run python cgi on Ubuntu 14.04

2015-09-21 Thread tropical . dude . net
Hello everybody, I installed the LAMP stack on in Ubuntu, but I am having problems configuring Apache to run python CGI scripts. I ran: sudo a2enmod cgi I added to apache2.conf Options +ExecCGI AddHandler cgi-script .py I created index.py: #!/usr/bin/env python # -*- coding

Re: WSGI (was: Re: Python CGI)

2014-05-25 Thread alister
On Sun, 25 May 2014 09:06:18 +0200, Chris wrote: > On 05/20/2014 03:52 AM, Tim Chase wrote: >> While Burak addressed your (Fast-)CGI issues, once you have a >> test-script successfully giving you output, you can use the >> standard-library's getpass.getuser() function to tell who your script >> is

WSGI (was: Re: Python CGI)

2014-05-25 Thread Chris
On 05/20/2014 03:52 AM, Tim Chase wrote: > While Burak addressed your (Fast-)CGI issues, once you have a > test-script successfully giving you output, you can use the > standard-library's getpass.getuser() function to tell who your script > is running as. LoadModule wsgi_module modules/mod_wsgi.so

WSGI (was: Re: Python CGI)

2014-05-25 Thread Christian
On 05/20/2014 03:52 AM, Tim Chase wrote: > While Burak addressed your (Fast-)CGI issues, once you have a > test-script successfully giving you output, you can use the > standard-library's getpass.getuser() function to tell who your script > is running as. LoadModule wsgi_module modules/mod_wsgi.so

Re: Python CGI

2014-05-19 Thread Tim Chase
On 2014-05-19 20:32, Christian wrote: > I'd like to use Python for CGI-Scripts. Is there a manual how to > setup Python with Fast-CGI? I'd like to make sure that Python > scripts aren't executed by www-user, but the user who wrote the > script. While Burak addressed your (Fast-)CGI issues, once yo

Re: Python CGI

2014-05-19 Thread Burak Arslan
On 05/19/14 21:32, Christian wrote: > Hi, > > I'd like to use Python for CGI-Scripts. Is there a manual how to setup > Python with Fast-CGI? Look for Mailman fastcgi guides. Here's one for gentoo, but I imagine it'd be easily applicable to other disros: https://www.rfc1149.net/blog/2010/12/30/co

Python CGI

2014-05-19 Thread Christian
Hi, I'd like to use Python for CGI-Scripts. Is there a manual how to setup Python with Fast-CGI? I'd like to make sure that Python scripts aren't executed by www-user, but the user who wrote the script. -- Gruß, Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Data transfer from Python CGI to javascript

2013-08-09 Thread MRAB
On 09/08/2013 07:53, e...@cleantechsolution.in wrote: I have written the following program #!c:\Python27\Python.exe import cgi, cgitb; import sys, serial cgitb.enable() ser = serial.Serial('COM27', 9600) myvar = ser.readline() print "Content-type:text/html\n\n" print """ Real Time Temperature

Data transfer from Python CGI to javascript

2013-08-09 Thread engg
I have written the following program #!c:\Python27\Python.exe import cgi, cgitb; import sys, serial cgitb.enable() ser = serial.Serial('COM27', 9600) myvar = ser.readline() print "Content-type:text/html\n\n" print """ Real Time Temperature window.onload = startInterval; function sta

Problem with running python cgi scripts through my browser

2012-04-20 Thread kreta06
Dear Python Tutors, I am having problems trying to send an email (using the smtplib module ) to send an email to myself over my browser using a python script, which is being called by an html form that I have created. My python cgi script is located in my cgi-bin directory, which I had made sure

RE: Python - CGI-BIN - Apache Timeout Problem

2012-03-04 Thread Sean Cavanaugh (scavanau)
Original Message- From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert Sent: Friday, March 02, 2012 3:23 PM To: Sean Cavanaugh (scavanau) Cc: python-list@python.org Subject: Re: Python - CGI-BIN - Apache Timeout Problem On Fri, Mar 2, 2012 at 12:09 PM, Sean Cavanaugh (scav

RE: Python - CGI-BIN - Apache Timeout Problem

2012-03-02 Thread Sean Cavanaugh (scavanau)
-- From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert Sent: Friday, March 02, 2012 3:23 PM To: Sean Cavanaugh (scavanau) Cc: python-list@python.org Subject: Re: Python - CGI-BIN - Apache Timeout Problem On Fri, Mar 2, 2012 at 12:09 PM, Sean Cavanaugh (scavanau) wrote: > THE PRO

RE: Python - CGI-BIN - Apache Timeout Problem

2012-03-02 Thread Sean Cavanaugh (scavanau)
l Message- From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert Sent: Friday, March 02, 2012 3:23 PM To: Sean Cavanaugh (scavanau) Cc: python-list@python.org Subject: Re: Python - CGI-BIN - Apache Timeout Problem On Fri, Mar 2, 2012 at 12:09 PM, Sean Cavanaugh (scavanau) wrote: &g

Re: Python - CGI-BIN - Apache Timeout Problem

2012-03-02 Thread Chris Rebert
On Fri, Mar 2, 2012 at 12:09 PM, Sean Cavanaugh (scavanau) wrote: > THE PROBLEM: > > When I execute the scripts from the command line (#python main.py) it > generates it fine (albeit slowly), it prints all the html code out including > the script.  The ‘core’ part of the script dumbed down to the

Python - CGI-BIN - Apache Timeout Problem

2012-03-02 Thread Sean Cavanaugh (scavanau)
Hello List, Would appreciate some insight/help, ran out of ideas... BRIEF OVERVIEW: I am trying to create a simple webserver gui wrapper for a set of scripts I developed to test some of our firewalls here at Cisco. Being that the total amount of engineer that will ever probably use thi

python cgi webpage won't redirect before background children processes finish

2011-02-22 Thread Yingjie Lin
Hi all, I have a python cgi script which looks like this: [CODE STARTING HERE] open('x') print 'Content-Type: text/html\n\n' .. print '' % myURL .. ### after printing the webpage os.system('python myfile.py') logfile.write('END OF SCR

Re: Python CGI windows

2010-08-13 Thread Thomas Jollans
On 2010-08-13 12:40, Srikanth N wrote: > *2. How do i configure the Server?(If i use WAMP,XAMPP) > * Sorry, I forgot to link you to http://www.editrocket.com/articles/python_apache_windows.html Hope this helps. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI windows

2010-08-13 Thread Thomas Jollans
e if XAMPP didn't set up a working cgi-bin for your programming pleasure anyway. > *3. Is mod_python required for python cgi? > * No. mod_python is a completely different approach to running Python from the web. Don't use it, it's dead. If you want something similar, use mod_ws

Python CGI windows

2010-08-13 Thread Srikanth N
Dear All, I Have certain clarification in python CGI. I use Python IDLE *1. How do we execute CGI Scripts in Windows? 2. How do i configure the Server?(If i use WAMP,XAMPP) 3. Is mod_python required for python cgi? * Someone Please revert back to me with the solution for the same.I would be at

RE: Python, CGI and Sqlite3

2010-04-13 Thread Ahmed, Shakir
-Original Message- From: python-list-bounces+shahmed=sfwmd@python.org [mailto:python-list-bounces+shahmed=sfwmd@python.org] On Behalf Of Tim Chase Sent: Tuesday, April 13, 2010 2:36 PM To: Majdi Sawalha Cc: python-list@python.org Subject: Re: Python, CGI and Sqlite3 On 04/13/2010

Re: Python, CGI and Sqlite3

2010-04-13 Thread Tim Chase
On 04/13/2010 12:41 PM, Majdi Sawalha wrote: import sqlite3 statement? and it gives the following error ImportError: No module named sqlite3, i tried it on python shell and all statements are work well. A couple possible things are happening but here are a few that pop to mind: 1) you're r

Python, CGI and Sqlite3

2010-04-13 Thread Majdi Sawalha
Dear list members, I am writing CGI program that reads a text feild and uses with select statement to retrieve data from a database file using sqlite3. the program behaived very strange as it does not recognizes the import sqlite3 statement? and it gives the following error ImportError: No mo

Re: Converting Python CGI to WSGI scripts

2010-03-17 Thread python
Sebastian/John, Thank you very much for your feedback. John: I initially missed the nuance of WSGI scripts being function calls. I suspect your tip has saved me a lot of pain :) Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting Python CGI to WSGI scripts

2010-03-16 Thread John Nagle
Sebastian Bassi wrote: On Tue, Mar 16, 2010 at 2:18 PM, wrote: I have a few dozen simple Python CGI scripts. Are there any advantages or disadvantages to rewriting these CGI scripts as WSGI scripts? It depends of the script. WSGI should be faster since you don't start a Python instanc

Re: Converting Python CGI to WSGI scripts

2010-03-16 Thread Sebastian Bassi
On Tue, Mar 16, 2010 at 2:18 PM, wrote: > I have a few dozen simple Python CGI scripts. > Are there any advantages or disadvantages to rewriting these CGI scripts as > WSGI scripts? It depends of the script. WSGI should be faster since you don't start a Python instance for each c

Converting Python CGI to WSGI scripts

2010-03-16 Thread python
I have a few dozen simple Python CGI scripts. Are there any advantages or disadvantages to rewriting these CGI scripts as WSGI scripts? Apologies if my terminology is not correct ... when I say WSGI scripts I mean standalone scripts like the following simplified (as an example) template: import

Re: best performance for storage of server information for python CGI web app?

2009-11-28 Thread Aahz
In article <58e5cd75-75be-4785-8e79-490364396...@e31g2000vbm.googlegroups.com>, davidj411 wrote: > >i was also thinking about using SQL Lite with one DB to store all the >info. with this option, i would not have to worry about concurrent >updates, but as the file size increases, i could expect pe

best performance for storage of server information for python CGI web app?

2009-11-18 Thread davidj411
I am wondering what will give me the best performance for storing information about the servers in our environment. currently i store all info about all servers in a single shelve file, but i have concerns. 1) as the size of the shelve file increases, will performance suffer ? 2) what about if 2 up

Re: In python CGI, how to pass "hello" back to a javascript function as an argument at client side?

2009-10-13 Thread Piet van Oostrum
>>>>> zxo102 (z) wrote: >z> Hi everyone, >z> How can I pass a string generated from python cgi at server side >z> to a >z> javascript function as an argument at client side? >z> I want test.py to "return" a "hello" back s

Re: In python CGI, how to pass "hello" back to a javascript function as an argument at client side?

2009-10-13 Thread Bruno Desthuilliers
zxo102 a écrit : Hi everyone, How can I pass a string generated from python cgi at server side to a javascript function as an argument at client side? This is common HTTP / javascriot stuff - nothing related to Python. First learn about the HTTP protocol - something you obviously need if

In python CGI, how to pass "hello" back to a javascript function as an argument at client side?

2009-10-12 Thread zxo102
Hi everyone, How can I pass a string generated from python cgi at server side to a javascript function as an argument at client side? Here is my case: 1. client side: "load" is a javascript function in a html page. It starts the python CGI "test.py" via Apache: .

Serving html and python cgi through BaseHTTPServer.py

2009-04-22 Thread Mads Nielsen
Hello all. im tinkering with some beginner cgi stuff in python. (form processing) i have a basic html document with a form and some inputs and i have a cgi.py file to process the form. how does one serve html and python cgi through the BaseHTTPServer included with python 2.6 ? i have tried to

Re: Unix Change Passwd Python CGI

2009-02-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Derek Tracy wrote: > Apache is running on the same system that needs the password changed. I > need to keep security high and can not install additional modules at > this time. > > I just need a general direction to start looking, and I do not have >

Re: Unix Change Passwd Python CGI

2009-02-24 Thread James Matthews
IMHO That sounds like the biggest security hole I can think of. Anyways you can open a pipe to passwd. to have the change there password. James On Tue, Feb 24, 2009 at 5:19 PM, Derek Tracy wrote: > I am using python version 2.5.1 and need to create a python cgi application > to allow a u

Unix Change Passwd Python CGI

2009-02-24 Thread Derek Tracy
I am using python version 2.5.1 and need to create a python cgi application to allow a user to change their unix password. Apache is running on the same system that needs the password changed. I need to keep security high and can not install additional modules at this time. I just need a

Re: small python-cgi wiki?

2009-01-28 Thread Дамјан Георгиевски
> I'm looking to set up a small private wiki, and am looking for > recommendations. > > Some sort of CGI based package that I could just untar somewhere web > accessable via Apache would be great. http://hatta.sheep.art.pl/About · single file · stores stuff in mercurial. · it's WSGI, so yes you c

Re: small python-cgi wiki?

2009-01-28 Thread Petite Abeille
On Jan 28, 2009, at 6:02 PM, Bernard Rankin wrote: I'm looking to set up a small private wiki, and am looking for recommendations. Some sort of CGI based package that I could just untar somewhere web accessable via Apache would be great. You might be interested by Nanoki, a small, simple

Re: small python-cgi wiki?

2009-01-28 Thread excord80
On Jan 28, 12:02 pm, Bernard Rankin wrote: > > I'm looking to set up a small private wiki, and am looking for > recommendations. > > Some sort of CGI based package that I could just untar somewhere web > accessable via Apache would be great. There are a number of them listed at http://wiki.pyt

small python-cgi wiki?

2009-01-28 Thread Bernard Rankin
Hello, I'm looking to set up a small private wiki, and am looking for recommendations. Some sort of CGI based package that I could just untar somewhere web accessable via Apache would be great. Any ideas? Thanks, :) -- http://mail.python.org/mailman/listinfo/python-list

Re: using subprocess module in Python CGI

2009-01-08 Thread ANURAG BAGARIA
Dear Matt, Thank you for your answer. This script is just a kind of test script so as to actually get it started on doing any simple job. The actual process would be much more complicated where in I would like to extract the tar file and search for a file with certain extension and this file would

Re: using subprocess module in Python CGI

2008-12-23 Thread Matt Nordhoff
ANURAG BAGARIA wrote: > Hello, > > I am a Python Newbie and would like to call a short python script via > browser using a CGI script, but initially I am trying to call the same > python script directly through python command line. The script intends > to perform a few command line in a pipe and I

Re: using subprocess module in Python CGI

2008-12-23 Thread ANURAG BAGARIA
Thank you for the prompt response. Yeah, I missed out one line at the end of the error, the whole of which is: Traceback (most recent call last): File "process.py", line 18, in retval = subprocess.call(comd, 0, None, None, outptr, errptr) File "/usr/lib/python2.5/subprocess.py", line 443

Re: using subprocess module in Python CGI

2008-12-22 Thread Chris Rebert
On Mon, Dec 22, 2008 at 2:02 AM, ANURAG BAGARIA wrote: > Hello, > > I am a Python Newbie and would like to call a short python script via > browser using a CGI script, but initially I am trying to call the same > python script directly through python command line. The script intends to > perform a

using subprocess module in Python CGI

2008-12-22 Thread ANURAG BAGARIA
Hello, I am a Python Newbie and would like to call a short python script via browser using a CGI script, but initially I am trying to call the same python script directly through python command line. The script intends to perform a few command line in a pipe and I have written the script (a short

Permission Issues in python cgi scripts on Apache 2.2 on OSX Leopard

2008-11-14 Thread Dan Yamins
Using Apache 2.2 on my local OSX machine, I;ve set up a virtual host to serve a directory that a project of mine is in. In this directory, I have some python .cgi scripts that I use to dynamically generated locally-used html code. In several places,scripts that work fine when not run as .cgi

Re: Problems with running Python CGI Scripts

2008-09-03 Thread Gabriel Genellina
En Wed, 03 Sep 2008 05:29:39 -0300, Edward FISHER <[EMAIL PROTECTED]> escribi�: I can get the script to run the python script but all that happens is that the black python box appears then disapears, the html that the python scripts should generate is never output. [...] This is calling th

Problems with running Python CGI Scripts

2008-09-03 Thread Edward FISHER
Hey guys. Im having problems running a python cgi. Im using the example code from: http://www.python.org/doc/essays/pp...east/sld041.htm as writen by Van Rossum himself I can get the script to run the python script but all that happens is that the black python box appears then disapears, the

Re: Please recommend a blog program written using python-cgi

2008-06-12 Thread Royt
huge monster (I don't > > think such a thing now exists). > > I guess you are out of luck. Usually people use frameworks because it *does* > make work easier. AFAIK google engine supports Django. So try & aquaint you > with that - and I bet there are Django-based blogs out ther

Re: Please recommend a blog program written using python-cgi

2008-06-12 Thread Diez B. Roggisch
Royt wrote: > Hi, I'm a newbie to Python, but I think it won't be too hard to learn. > A few days ago I registered Google App Engine, it only support Python > 2.5. I want to set my blog on it soon. But it's not easy for me to > finish it in a short time since I'm not very familiar with Python, so

Please recommend a blog program written using python-cgi

2008-06-12 Thread Royt
Hi, I'm a newbie to Python, but I think it won't be too hard to learn. A few days ago I registered Google App Engine, it only support Python 2.5. I want to set my blog on it soon. But it's not easy for me to finish it in a short time since I'm not very familiar with Python, so I want find some code

Re: Python CGI Upload from Server Status

2008-06-06 Thread Derek Tracy
On Fri, Jun 6, 2008 at 9:16 AM, John Dohn <[EMAIL PROTECTED]> wrote: > On Sat, Jun 7, 2008 at 12:50 AM, Derek Tracy <[EMAIL PROTECTED]> wrote: > >> I am trying to create a simple python cgi app that allows the user to kick >> off an ftp from the server the cgi is on

Re: Python CGI Upload from Server Status

2008-06-06 Thread John Dohn
On Sat, Jun 7, 2008 at 12:50 AM, Derek Tracy <[EMAIL PROTECTED]> wrote: > I am trying to create a simple python cgi app that allows the user to kick > off an ftp from the server the cgi is on to another server; I have that > piece working using ftplib but since the files in quest

Re: argument to python cgi script

2008-04-10 Thread Gabriel Genellina
En Wed, 09 Apr 2008 11:14:33 -0300, syed mehdi <[EMAIL PROTECTED]> escribió: > Hi Guys, > If someone can help me in telling how can i pass arguments to python cgi > script then that will be good. > like if i want to pass "some argument" to my remote python script,

argument to python cgi script

2008-04-09 Thread syed mehdi
Hi Guys, If someone can help me in telling how can i pass arguments to python cgi script then that will be good. like if i want to pass "some argument" to my remote python script, by calling something like: http://localhost/cgi-bin/test.py?some\ argument. What is the correct way

Re: Python - CGI - XML - XSD

2008-03-13 Thread Diez B. Roggisch
> Sorry, it was really late when i wrote this post. The file is an XSL > file. It defines HTML depending on what appears in the XML document. Then the content-type might be the culprit, yes. But testing so would have been faster than waiting for answers here... Diez -- http://mail.python.org/ma

Re: Python - CGI - XML - XSD

2008-03-12 Thread xkenneth
On Mar 12, 11:58 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > xkenneth wrote: > > On Mar 12, 6:32 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> xkenneth wrote: > >>> Hi All, > >>>    Quick question. I've got an XML schema file (XSD) that I've > >>> written, that works fine when my data i

Re: Python - CGI - XML - XSD

2008-03-12 Thread Stefan Behnel
xkenneth wrote: > On Mar 12, 6:32 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> xkenneth wrote: >>> Hi All, >>>Quick question. I've got an XML schema file (XSD) that I've >>> written, that works fine when my data is present as an XML file. >>> (Served out by apache2.) Now when I call pyt

Re: Python - CGI - XML - XSD

2008-03-12 Thread xkenneth
On Mar 12, 6:32 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > xkenneth wrote: > > Hi All, > > >    Quick question. I've got an XML schema file (XSD) that I've > > written, that works fine when my data is present as an XML file. > > (Served out by apache2.) Now when I call python as a cgi scri

Re: Python - CGI - XML - XSD

2008-03-12 Thread Diez B. Roggisch
xkenneth wrote: > Hi All, > >Quick question. I've got an XML schema file (XSD) that I've > written, that works fine when my data is present as an XML file. > (Served out by apache2.) Now when I call python as a cgi script, and > tell it print out all of the same XML, also served up by apache2

Python - CGI - XML - XSD

2008-03-11 Thread xkenneth
Hi All, Quick question. I've got an XML schema file (XSD) that I've written, that works fine when my data is present as an XML file. (Served out by apache2.) Now when I call python as a cgi script, and tell it print out all of the same XML, also served up by apache2, the XSD is not applied. Doe

Re: Python CGI & Webpage with an Image

2008-03-08 Thread rodmc
> Is the cgi script in the same directory? The user's browser looks > for the jpg relative to the URL it used to get the page, which in > the case of the CGI script is the path to the script, not the > path to the html file. No the CGI script is in a different folder, I could move everything to

Re: Python CGI & Webpage with an Image

2008-03-06 Thread Bryan Olson
rodmc wrote: > [...] I have played around a bit more > so that both the image and HTML file are in the public_html folder. > They are called via python using a relative URL, and have permissions > set to 755. Within the HTML file the image is accessed using just > "banner.jpg". The actual page disp

Re: Python CGI & Webpage with an Image

2008-03-06 Thread rodmc
Hi, Thanks for your very quick response. I have played around a bit more so that both the image and HTML file are in the public_html folder. They are called via python using a relative URL, and have permissions set to 755. Within the HTML file the image is accessed using just "banner.jpg". The act

Re: Python CGI & Webpage with an Image

2008-03-06 Thread Bryan Olson
rodmc wrote: [...] > Python: > > f = open("finish.html") > doc = f.read() > f.close() > print doc You might need to start with: print "Content-Type: text/html" print Is "finish.html" in the right place? When you browse to your script, can you see that you're getti

Re: Python CGI & Webpage with an Image

2008-03-06 Thread rodmc
Hi, Good point, some code samples is probably required. Please note that for reasons of integration with another system I am not using a templating system. Anyway I have copied them below: Python: f = open("finish.html") doc = f.read() f.close() print doc HTML:

Re: Python CGI & Webpage with an Image

2008-03-05 Thread Miki
Hello Rod, > I have a set of CGI scripts set up and in one page (which is stored in > an HTML file then printed via a python CGI) there is an image. However > the image never displays, can anyone recommend a way round this > problem? We need more information, can you post a code sn

Python CGI & Webpage with an Image

2008-03-05 Thread rodmc
Hi, I have a set of CGI scripts set up and in one page (which is stored in an HTML file then printed via a python CGI) there is an image. However the image never displays, can anyone recommend a way round this problem? Kind regards, rod -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI script and CSS style sheet

2008-01-23 Thread epsilon
Tim, Thanks for the information and I'll work with you suggestions. Also, I will let you know what I find. Thanks again, Christopher Tim Chase wrote: > > I'm working with a Python CGI script that I am trying to use with an > > external CSS (Cascading Style Sheet) and it

Re: Python CGI script and CSS style sheet

2008-01-23 Thread Tim Chase
> I'm working with a Python CGI script that I am trying to use with an > external CSS (Cascading Style Sheet) and it is not reading it from the > web server. The script runs fine minus the CSS formatting. Does > anyone know if this will work within a Python CGI? It seems that

Python CGI script and CSS style sheet

2008-01-23 Thread epsilon
All: I'm working with a Python CGI script that I am trying to use with an external CSS (Cascading Style Sheet) and it is not reading it from the web server. The script runs fine minus the CSS formatting. Does anyone know if this will work within a Python CGI? It seems that line 18 is not

Re: pipes python cgi and gnupg

2008-01-08 Thread alisonken1
On Dec 28 2007, 7:07 pm, [EMAIL PROTECTED] wrote: > form = cgi.FieldStorage() > if not form.has_key("pass"): >print "Enter password" > > filename = "test.gpg" > pass = form.getvalue("pass").strip() > os.system("gpg --version > gpg.out") > os.system("echo %s | gpg --batch --password-fd 0 --decr

Re: Python CGI - Presenting a zip file to user

2008-01-02 Thread Justin Ezequiel
gt; > - James not needed for *NIX as *NIX does not have a notion of binary- vs text- mode I seem to recall not needing the msvcrt stuff a while ago on Windows but recently needed it again for Python CGI on IIS -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI - Presenting a zip file to user

2008-01-02 Thread jwwest
On Jan 2, 8:56 pm, Justin Ezequiel <[EMAIL PROTECTED]> wrote: > On Jan 3, 7:50 am, jwwest <[EMAIL PROTECTED]> wrote: > > > > > Hi all, > > > I'm working on a cgi script that zips up files and presents the zip > > file to the user for download. It works fine except for the fact that > > I have to ov

Re: Python CGI - Presenting a zip file to user

2008-01-02 Thread Justin Ezequiel
On Jan 3, 7:50 am, jwwest <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm working on a cgi script that zips up files and presents the zip > file to the user for download. It works fine except for the fact that > I have to overwrite the file using the same filename because I'm > unable to delete it aft

Python CGI - Presenting a zip file to user

2008-01-02 Thread jwwest
Hi all, I'm working on a cgi script that zips up files and presents the zip file to the user for download. It works fine except for the fact that I have to overwrite the file using the same filename because I'm unable to delete it after it's downloaded. The reason for this is because after sending

pipes python cgi and gnupg

2007-12-28 Thread byte8bits
I think this is more a GnuPG issue than a Python issue, but I wanted to post it here as well in case others could offer suggestions: I can do this from a python cgi script from a browser: os.system("gpg --version > gpg.out") However, I cannot do this from a browser: os.system(&

Re: dynamically generating temporary files through python/cgi (ot)

2007-11-01 Thread Hendrik van Rooyen
Miss Pfeffe wrote: >How do you make a python out of a banana?! You kiss it just long enough - else it turns into a frog, so be careful! -- http://mail.python.org/mailman/listinfo/python-list

dynamically generating temporary files through python/cgi

2007-10-31 Thread Miss Pfeffe
How do you make a python out of a banana?!-- http://mail.python.org/mailman/listinfo/python-list

Streaming files from python cgi

2007-09-27 Thread Salil Kulkarni
Hello, I am trying to create a cgi which downloads a pdf/tiff file from an ftpserver using ftplib. Everything works until this point. But, once the file has been retrieved, I want to be able to stream the file to the browser so that the user gets an option to save it, or open it with the necessary

My first Python CGI (was: Coming from Perl)

2007-09-13 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Amer Neely <[EMAIL PROTECTED]> wrote: >Amer Neely wrote: >> TheFlyingDutchman wrote: >>> On Sep 12, 5:30 pm, Amer Neely <[EMAIL PROTECTED]> wrote: I'm a complete newbie with Python, but have several years experience with Perl in a web environment. >>>

Python & cgi on win98--tinyweb problems, etc

2007-06-28 Thread Kirk Bailey
RE: TinyWeb running python in windows PROBLEM: getting python scripts to execute. SOLUTION: Insure the script ends in the name extension .py. Windows associates all such files with the pythonw.exe interpreter program, and will use it to interpret them. IT IGNORES THE SHEBANG (the first line in

Re: Python CGI and Browser timeout

2007-04-28 Thread Steve Holden
Steve Holden wrote: > Sebastian Bassi wrote: >> On 26 Apr 2007 14:48:29 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >>> In order to work around this problem, I started printing empty strings >>> (i.e. print "") so that the browser does not timeout. >> How do you print something while doing

Re: Python CGI and Browser timeout

2007-04-28 Thread Steve Holden
Sebastian Bassi wrote: > On 26 Apr 2007 14:48:29 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> In order to work around this problem, I started printing empty strings >> (i.e. print "") so that the browser does not timeout. > > How do you print something while doing the query and waiting f

Re: Python CGI and Browser timeout

2007-04-26 Thread skulka3
Thanks for the response. To further clarify the details: I am printing the empty strings in a for loop. So the processing happens in a loop when all the results from the query have been already retrieved and each record is now being processed inside the loop. I also update the display periodical

Re: Python CGI and Browser timeout

2007-04-26 Thread Sebastian Bassi
On 26 Apr 2007 14:48:29 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there a better solution to avoid browser timeouts? Raising timeout in Apache, by default is 300 seconds. Limiting jobs size (both in the html form and from script size since you should not trust on client validations)

Re: Python CGI and Browser timeout

2007-04-26 Thread Sebastian Bassi
On 26 Apr 2007 14:48:29 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > In order to work around this problem, I started printing empty strings > (i.e. print "") so that the browser does not timeout. How do you print something while doing the query and waiting for the results? I saw some page

Re: Python CGI and Browser timeout

2007-04-26 Thread Gabriel Genellina
En Thu, 26 Apr 2007 18:48:29 -0300, <[EMAIL PROTECTED]> escribió: > I am creating a simple cgi script which needs to retrieve and process > a huge number of records from the database (more than 11,000) and > write the results to a file on disk and display some results when > processing is complet

Python CGI and Browser timeout

2007-04-26 Thread skulka3
Hello, I am creating a simple cgi script which needs to retrieve and process a huge number of records from the database (more than 11,000) and write the results to a file on disk and display some results when processing is complete. However, nothing needs to be displayed while the processing is

Re: python cgi problem with textarea

2007-04-24 Thread Adrian Smith
On Apr 24, 8:00 pm, placid <[EMAIL PROTECTED]> wrote: > oops...i did read the problem description, but i when i tried the code > it worked for me and when i put spaces into the TextArea it wasn't > reflected correctly back. So i thought this was the problem. > > Adrian, can you still try replacing

Re: python cgi problem with textarea

2007-04-24 Thread placid
On Apr 24, 4:52 pm, Tim Roberts <[EMAIL PROTECTED]> wrote: > placid <[EMAIL PROTECTED]> wrote: > >On Apr 23, 1:01 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > >> On Apr 22, 10:09 pm, placid <[EMAIL PROTECTED]> wrote: > > >> > i just tried it and its working. here it is > > >> >http://yallara.cs.rm

  1   2   3   >