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

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

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
On 2010-08-13 12:40, Srikanth N wrote: > *1. How do we execute CGI Scripts in Windows? > * You'll need a web server. > *2. How do i configure the Server?(If i use WAMP,XAMPP) > * For CGI, you just need your server configured for CGI, nothing Python-specific. It would surprise me if XAMPP didn't se

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

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 to another server; I have that

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 question are usually ve

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

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 snippet? error pag

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 is not reading it from

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 line > 18 is not be

Re: Python CGI - Presenting a zip file to user

2008-01-02 Thread Justin Ezequiel
On Jan 3, 1:35 pm, jwwest <[EMAIL PROTECTED]> wrote: > Thanks! That worked like an absolute charm. > > Just a question though. I'm curious as to why you have to use the > msvcrt bit on Windows. If I were to port my app to *NIX, would I need > to do anything similar? > > - James not needed for *NIX

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

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

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

Re: python cgi problem with textarea

2007-04-23 Thread Tim Roberts
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.rmit.edu.au/~bevcimen/form.html >> >> > maybe the internal server err

Re: python cgi problem with textarea

2007-04-23 Thread Peter Otten
Adrian Smith wrote: > ...and I get an internal server error if I have any spaces in the > textarea, which is really going to limit its usefulness to me. Oddly, While debugging you should put > #!/usr/bin/python import cgitb cgitb.enable() > import cgi > print "Content-type: text/html\n"

Re: python cgi problem with textarea

2007-04-23 Thread placid
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.rmit.edu.au/~bevcimen/form.html > > > maybe the internal server error is because mod_python isn't installed >

Re: python cgi problem with textarea

2007-04-22 Thread Graham Dumpleton
On Apr 22, 11:09 pm, placid <[EMAIL PROTECTED]> wrote: > On Apr 22, 4:08 pm, Adrian Smith <[EMAIL PROTECTED]> wrote: > > > > > This may be more a cgi thing than a Python one, but I'm trying to get > > this page: > > >http://adrian10.phpwebhosting.com/trial.html > > > consisting basically of this: >

Re: python cgi problem with textarea

2007-04-22 Thread Adrian Smith
On Apr 22, 10:09 pm, placid <[EMAIL PROTECTED]> wrote: > i just tried it and its working. here it is > > http://yallara.cs.rmit.edu.au/~bevcimen/form.html > > maybe the internal server error is because mod_python isn't installed > assuming your using Apache as your web server Yeah, but it wouldn'

Re: python cgi problem with textarea

2007-04-22 Thread Jim
On Apr 22, 2:08 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > ...and I get an internal server error if I have any spaces in the > textarea, And what error appears in the server error log? -- http://mail.python.org/mailman/listinfo/python-list

Re: python cgi problem with textarea

2007-04-22 Thread Adrian Smith
On Apr 22, 11:40 pm, Jim <[EMAIL PROTECTED]> wrote: > On Apr 22, 2:08 am, Adrian Smith <[EMAIL PROTECTED]> wrote:> ...and I > > get an internal server error if I have any spaces in the textarea, > > And what error appears in the server error log? I've just asked my web provider why I don't appear

Re: python cgi problem with textarea

2007-04-22 Thread placid
On Apr 22, 4:08 pm, Adrian Smith <[EMAIL PROTECTED]> wrote: > This may be more a cgi thing than a Python one, but I'm trying to get > this page: > > http://adrian10.phpwebhosting.com/trial.html > > consisting basically of this: > > > > > > > ...to print out the contents of the textarea with thi

Re: Python cgi Apache os.system()

2006-11-09 Thread naima . mans
Hello thanks for your help.. it was a problem of path as you mentionned... my command was "O:\\ ccm start" and i have change it with the path of the drive O thanks a lot have a good day Tachi -- http://mail.python.org/mailman/listinfo/python-list

Re: Python cgi Apache os.system()

2006-11-08 Thread Cameron Walsh
[EMAIL PROTECTED] wrote: > Hello :) > > I have installed Apache on windows... > The server work well, and my python script also > > but when I want in my python script to run a System command like > os.system(my_command) the script doesn't do anything! > > here the error.log > > [Wed Nov 08 14:

Re: Python CGI Scripting Documentation

2006-07-03 Thread per9000
Hi, I wanted to try this myself a few days ago, my first (working) try had this source code: --- #!/usr/bin/python print 'Content-Type: text/plain' print print 'hell o world' --- (the output is just "hell o world\n", but the first four lines are still required I guess, I don't know why, but it w

Re: Python CGI Scripting Documentation

2006-07-03 Thread Vlad Dogaru
Alex Martelli wrote: Wow, I'm new in the field, but even I know your name. It's truly inspiring to be aswered to by you. Thank you, all of you, for your suggestions. I will try to look into the matter using the starting points you've given me, as well as read more about Django. Thanks, Vlad. --

Re: Python CGI Scripting Documentation

2006-07-02 Thread Alex Martelli
Vlad Dogaru <[EMAIL PROTECTED]> wrote: > Hello, > > I would like to learn web scripting with Python (sure, everyone uses > PHP, but I don't like the syntax and Python is more general-purpose > and... well, I guess you people know the advantages better than me). > Where can I get a thorough introd

Re: Python CGI Scripting Documentation

2006-07-02 Thread Michael
Sybren Stuvel wrote: > Why use CGI when you can use a framework that's so much easier and > more powerful? Lots of possible answers, a few: * Fun * Transferable skills * No single solution is ever the answer to all problems (not all problems are nails, not all solutions are hammers)

Re: Python CGI Scripting Documentation

2006-07-02 Thread placid
Vlad Dogaru wrote: > Hello, > > I would like to learn web scripting with Python (sure, everyone uses > PHP, but I don't like the syntax and Python is more general-purpose > and... well, I guess you people know the advantages better than me). > Where can I get a thorough introduction to both CGI an

Re: Python CGI problem: correct result, but incorrect browser response.

2006-04-06 Thread Tim Roberts
"Sullivan WxPyQtKinter" <[EMAIL PROTECTED]> wrote: > >title:Python CGI problem: correct result, but incorrect browser >response. > >In one of my CGI program,named 'login.py', the script return a HEADER >to web browser: > >Set-Cookie: sessionID=LAABUQLUCZIQJTZDWTFE; >Set-Cookie: username=testuser; >

Re: python cgi permision error

2006-03-19 Thread [EMAIL PROTECTED]
Sorry accidently replying using my other google account [EMAIL PROTECTED] wrote: > > > > assuming you are running this python script the standard cgi way and not > > through modpython or fastcgi. > yes I'm running it in standard cgi way coz my provider only allow me > that way. And it's really jus

Re: python cgi permision error

2006-03-17 Thread devilandme
> > assuming you are running this python script the standard cgi way and not > through modpython or fastcgi. yes I'm running it in standard cgi way coz my provider only allow me that way. And it's really just simple script. Sorry for the dumb question, I know modpython but what do you mean by fast

Re: python cgi permision error

2006-03-17 Thread David Bear
[EMAIL PROTECTED] wrote: > Hi > > I have python cgi script, but when I call it I got server internal > error. The log in my apache is > > [Sat Mar 18 04:17:14 2006] [error] [client 127.0.0.1] (13)Permission > denied: exec of '/srv/www/cgi-bin/helo.cgi' failed > [Sat Mar 18 04:17:14 2006] [error]

Re: Python CGI not working in Firefox but does in IE

2006-02-22 Thread Kent Johnson
Harlin Seritt wrote: > Also, is there a redirect command somewhere within Python CGI that can > get this done instead as I would actually prefer to have the CGI code > execute this rather than depend on the HTML to do it. http://groups.google.com/group/comp.lang.python/msg/6e929fab0d414b2c shows

Re: Python CGI not working in Firefox but does in IE

2006-02-22 Thread Iain King
Iain King wrote: > Harlin Seritt wrote: > > I have this Python CGI script running: > > > > [CODE] > > print 'Content-type: text/plain\n' > > > > location = 'http://server1.com' > > > > page = ''' > > > > > > > > > > > > ''' > > > > print page > > [/CODE] > > > > It works fine and redirects pe

Re: Python CGI not working in Firefox but does in IE

2006-02-22 Thread Harlin Seritt
Ack... I'm an idiot... Thanks Richard -- You're the Man! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI not working in Firefox but does in IE

2006-02-22 Thread Iain King
Harlin Seritt wrote: > I have this Python CGI script running: > > [CODE] > print 'Content-type: text/plain\n' > > location = 'http://server1.com' > > page = ''' > > > > > > ''' > > print page > [/CODE] > > It works fine and redirects perfectly when using Internet Explorer but > only shows thi

Re: Python CGI not working in Firefox but does in IE

2006-02-22 Thread Richard Brodie
"Harlin Seritt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [CODE] > print 'Content-type: text/plain\n' That's your problem. You've said text/plain when you meant text/html. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI

2005-12-01 Thread jbrewer
Thanks guys. I didn't realize that hidden form fields were so easy to use. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI

2005-12-01 Thread BJ Swope
Here's a snippet of code I use in a CGI I use... I check to see if the params has any data, if it does then return that data and some other data that comes from the params.  If params is empty, then draw a different page that says give me some data.     if len(params):     return params,inc_f

Re: Python CGI

2005-12-01 Thread Fuzzyman
That doesn't sound too difficult to do in a single script. As Tim has mentioned, you can always separate the code in two modules and just import the one needed for the action being performed. Your script just needs to output different HTML depending on the result - with a different form depending

Re: Python CGI

2005-12-01 Thread Tim Roberts
"jbrewer" <[EMAIL PROTECTED]> wrote: > >I need to update a CGI script I have been working on to perform >validation of input files. The basic idea is this: > >1.) HTML page is served >2.) User posts file and some other info >3.) Check file for necessary data >* If data is missing, then post a

Re: Python CGI post problem

2005-11-24 Thread Paul Boddie
Eddy Ilg wrote: > I'm having problems with a python cgi script. The script just won't read > any POST data. Forms with GET data work fine. [...] > form=cgi.FieldStorage(keep_blank_values=True) Since FieldStorage uses various defaults when you don't specify the fp and environ parameters, it may b

Re: python CGI,sybase and environ variables

2005-11-02 Thread Steve Holden
[EMAIL PROTECTED] wrote: > hi > i am writing a CGI to process some database transactions using the > Sybase module. > so in my CGI script, i have: > > ... > import Sybase > import cgitb; cgitb.enable(display=1 , logdir="/tmp/weblog.txt") > ... > ... > > the problem is , everytime i have ImportErr

Re: python CGI,sybase and environ variables

2005-11-02 Thread eight02645999
i have solved the problem. thanks. -- http://mail.python.org/mailman/listinfo/python-list

RE: python cgi script not understood as html

2005-10-25 Thread Iyer, Prasad C
Your python script is not getting executed. I guess there is something wrong with the server configuration. #-Original Message- #From: Philippe C. Martin [mailto:[EMAIL PROTECTED] #Sent: Tuesday, October 25, 2005 1:27 AM #To: python-list@python.org #Subject: python cgi script not unders

Re: python cgi script not understood as html

2005-10-24 Thread Philippe C. Martin
It is, thanks. Philippe Peter Hansen wrote: > Philippe C. Martin wrote: >> The following code outputs the actual HTML text to the browser, not the >> interpreted text. >> >> html_ok = """ >> Content-Type: text/html\n >> > "http://www.w3.org/TR/html4/loose.dtd";>\n > > HTTP header lines must

Re: python cgi script not understood as html

2005-10-24 Thread Philippe C. Martin
Many thanks !! Regards, Philippe Mitja Trampus wrote: > Philippe C. Martin wrote: >> Hi, >> >> The following code outputs the actual HTML text to the browser, not the >> interpreted text. >> >> Any idea ? >> >> html_ok = """ >> Content-Type: text/html\n > > > > ... > > """ > > Avoid t

Re: python cgi script not understood as html

2005-10-24 Thread Peter Hansen
Philippe C. Martin wrote: > The following code outputs the actual HTML text to the browser, not the > interpreted text. > > html_ok = """ > Content-Type: text/html\n > "http://www.w3.org/TR/html4/loose.dtd";>\n HTTP header lines must end with \r\n, not just with \n. Not sure this is the soluti

Re: python cgi script not understood as html

2005-10-24 Thread Mitja Trampus
Philippe C. Martin wrote: > Hi, > > The following code outputs the actual HTML text to the browser, not the > interpreted text. > > Any idea ? > > html_ok = """ > Content-Type: text/html\n > > ... > """ Avoid the starting newline (before content-type). Add at least TWO newlines after conten

Re: python cgi script not understood as html

2005-10-24 Thread Philippe C. Martin
the title should say "python cgi script html output not understood as html" Philippe C. Martin wrote: > Hi, > > The following code outputs the actual HTML text to the browser, not the > interpreted text. > > Any idea ? > > Regards, > > Philippe > import cgi > import logging > import auth #th

Re: Python cgi

2005-10-22 Thread jbrewer
I added enctype="multipart/form-data" to the tag, and that seemed to solve it. Thanks. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python cgi

2005-10-21 Thread Mike Meyer
"jbrewer" <[EMAIL PROTECTED]> writes: > Also, I need to run an external program with my CGI script using > something like os.system with flags from input forms, which is a major > security risk. Is it simply enough to test for flag.isalnum() or > should I do more to prevent random programs from be

Re: Python cgi

2005-10-21 Thread Mitja Trampus
jbrewer wrote: > I'm currently writing my first CGI script (in Python), and I keep > getting an error I don't know how to address. I'm not sure if this is > a Python or Apache error, but I suspect it's an Apache config thing. I suspect it's neither :) Make sure your HTML form looks like -- http

RE: Python CGI Script

2005-10-02 Thread Iyer, Prasad C
I guess your python script isn't getting executed. a. I guess you might have to tweak the server if the script is not getting executed. b. Maybe your script is getting executed but you are not setting the "Content-type" parameter which is essential for browser that it is an html page. Note :- Se

Re: Python CGI Script

2005-10-02 Thread Ivan Herman
Efrat, I am afraid a CGI script is never *executed* by the browser. Instead, it sends the URL to a server, expects the server to execute the script, and display the server's response. If you just put a file name then (it seems, I never even tried that) Firefox uses the local file store as a 'serve

Re: Python CGI Script

2005-10-02 Thread Steve Holden
Efrat Regev wrote: > Hello, > > I'm a data-structures course TA trying to write a python CGI script > for automatically compiling and testing students' projects. > Unfortunately, I've run into some questions while writing this, which I > couldn't solve with the various (and helpful) p

Re: Python CGI and Firefox vs IE

2005-09-07 Thread dimitri pater
On 7 Sep 2005 11:10:00 -0700, Jason <[EMAIL PROTECTED]> wrote: IE... Yeah, I  know what you mean. Here's another one that doesn't work in IE, but it does work in Firefox: canvas = pid.PILCanvas()  canvas.drawRect(0,400, 500, 0, fillColor=pid.floralwhite, edgeColor=pid.maroon ) # display stuff

Re: Python CGI and Firefox vs IE

2005-09-07 Thread Jason
IE... Have to come up with a workaround, go back to the old . I'm about the only one who uses firefox in our facility. Thanks for the reply and the link. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI and Firefox vs IE

2005-09-07 Thread infidel
> I see what's happening, but I'm at a loss to figure out what to do > about it. Any help would be appreciated. Try giving the buttons different name attributes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CGI and Firefox vs IE

2005-09-07 Thread Stephan Diehl
On Wed, 07 Sep 2005 10:50:15 -0700, Jason wrote: > Hey y'all, this falls under the murky realm of HTML, CGI and > Python...and IE. > > Python 2.4, using CGI to process a form. > > Basically I've got 3 buttons. Here's the HTML code: > > > All > Servers > type='submit'>WKPEA1 > type='submit'>

Re: Python-cgi web or Perl-cgi script doubt

2005-07-30 Thread Michael Sparks
praba kar wrote: >I want to know difference between > Python-cgi and Perl-cgi and also I want > to which one is efficient from the performance. Possibly the most important difference between the two is when you're using JUST cgi - ie no mod_perl, no mod_python, etc. With python, if your cg

Re: Python-cgi or Perl-cgi script doubt

2005-07-29 Thread EP
Prabahar wrote: >I want to know difference between > Python-cgi and Perl-cgi and also I want > to which one is efficient from the performance. The difference between a cgi program written in Perl and a cgi program written in Python is the choice of programming language. Both work quite

Re: Python CGI discussion Group

2005-03-15 Thread Dmitry A.Lyakhovets
On 15 Mar 2005 07:05:59 -0800 "Fuzzyman" <[EMAIL PROTECTED]> wrote: > There is a `web design` group over on google-groups. > http://groups-beta.google.com/group/wd > > It's brief is for ``Discussion of web design (html, php, flash, > wysiwig, cgi, perl, python, css, design concepts, etc.).``, but

Re: python/cgi/html bug

2005-01-19 Thread Dfenestr8
On Wed, 19 Jan 2005 12:15:18 -0800, Paul Rubin wrote: > Dfenestr8 <[EMAIL PROTECTED]> writes: >> No glaring security holes that you noticed? Other than being able to >> hide things in html tags? > > Looks like you can also embed arbitrary javascript (I just tried it). I > haven't looked at the sc

Re: python/cgi/html bug

2005-01-19 Thread Paul Rubin
Dfenestr8 <[EMAIL PROTECTED]> writes: > No glaring security holes that you noticed? Other than being able to hide > things in html tags? Looks like you can also embed arbitrary javascript (I just tried it). I haven't looked at the script itself yet. -- http://mail.python.org/mailman/listinfo/pyth

Re: python/cgi/html bug

2005-01-19 Thread Dfenestr8
On Wed, 19 Jan 2005 04:32:04 -0800, Fuzzyman wrote: > This looks very good. > I've been looking for a python messageboard CGI for a long time. > Thanx! No glaring security holes that you noticed? Other than being able to hide things in html tags? > If you wanted to add user accounts/login/admi

Re: python/cgi/html bug

2005-01-19 Thread Dfenestr8
On Tue, 18 Jan 2005 21:50:58 -0800, Dan Bishop wrote: > > Dfenestr8 wrote: >> Hi. >> >> I've written a cgi messageboard script in python, for an irc chan I > happen >> to frequent. >> >> Bear with me, it's hard for me to describe what the bug is. So I've >> divided this post into two sections: HO

Re: python/cgi/html bug

2005-01-18 Thread Dan Bishop
Dfenestr8 wrote: > Hi. > > I've written a cgi messageboard script in python, for an irc chan I happen > to frequent. > > Bear with me, it's hard for me to describe what the bug is. So I've > divided this post into two sections: HOW MY SCRIPTS WORKS, and WHAT THE > BUG IS. > ... > The problem is wh