Re: Trying to write CGI script with python...

2005-05-01 Thread Peter Otten
M.E.Farmer wrote: > I found an excellent example that was posted by the F-bot. > Fredrik LundhMay 26 2000 Python has since grown the cgitb module. Putting import cgitb; cgitb.enable() at the top of your cgi script may be even more convenient than using the Lundhian wrapper. Peter -

Re: Trying to write CGI script with python...

2005-04-30 Thread Steve Holden
Jason Mobarak wrote: M.E.Farmer wrote: I found an excellent example that was posted by the F-bot. [...] try: import myscript myscript.main() except: print "Content-Type:", "text/html" print file = StringIO.StringIO() Note: it's usually a very bad idea to name -anything- "file" unles

Re: Trying to write CGI script with python...

2005-04-30 Thread Jason Mobarak
M.E.Farmer wrote: > I found an excellent example that was posted by the F-bot. [...] > try: > import myscript > myscript.main() > except: > print "Content-Type:", "text/html" > print > file = StringIO.StringIO() Note: it's usually a very bad idea to name -anything- "file" unles

Re: Trying to write CGI script with python...

2005-04-29 Thread M.E.Farmer
I found an excellent example that was posted by the F-bot. Fredrik Lundh May 26 2000 From: "Fredrik Lundh" <[EMAIL PROTECTED]> Date: 2000/05/26 richard_chamberl...@ wrote: > I'm having great difficulties getting Python to work via CGI. > Is there anyway I can get the traceback on to the web p

Re: Trying to write CGI script with python...

2005-04-29 Thread M.E.Farmer
Just in case you don't have a clue what they are talking about ;) import traceback try: #your stuff here except: traceback.print_exc() That should return any exceptions you may be throwing. -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to write CGI script with python...

2005-04-29 Thread Fuzzyman
If you just want to wrap an existing python script - but pass arguments from a web interface, it ought to be very easy. You'll need to understand CGI of course. There's a good free article about getting started with CGI over at PyZine ( http://www.pyzine.com ) ;-) Can you confirm that your CGI is

Re: Trying to write CGI script with python...

2005-04-28 Thread Jason Mobarak
Probably going to need more information about how mplayer is not being accessed correctly. CGI uses the shell environment to pass web information to a program... so maybe this is messing up mplayer. You'll need to augment or wrap your partners program in order to give you more information about wh

Trying to write CGI script with python...

2005-04-28 Thread ckb2102
Hi there, I am new to this so I apologize in advance if I am not following the right etiquette or something... I am working on a project for school. My partner has written a short program in Python which takes 2 arguments - the name of a .mov file and a number which represents the number of