Re: CGI

2015-12-27 Thread Chris Warrick
On 27 December 2015 at 18:59, Laurent Delacroix wrote: > On 26/12/15 10:41, Pol Hallen wrote: >> >> How can I execute a local command (like ls or similar) and show output >> via browser? >> > > Either you use a proper web framework (Flask, Bottle, Django in order of > complexity) or you set up a w

Re: CGI

2015-12-27 Thread Laurent Delacroix
On 26/12/15 10:41, Pol Hallen wrote: > > How can I execute a local command (like ls or similar) and show output > via browser? > Either you use a proper web framework (Flask, Bottle, Django in order of complexity) or you set up a web server with FastCGI support (e.g. nginx) and run a WSGI appli

Re: CGI

2015-12-27 Thread Maitu Zentz
Pol Hallen: > Merry Christmas to all :-) > > A (newbie) question: I'd like learn about CGI pyhton script to create > some utility using http://localhost/python_script01.py > > Something like that: > > #!/usr/bin/python print "Content-type: text/html" > print print "" > print "Hello!" > print ""

Re: CGI

2015-12-27 Thread Chris Angelico
On Sat, Dec 26, 2015 at 7:35 AM, Pol Hallen wrote: > Merry Christmas to all :-) > > A (newbie) question: I'd like learn about CGI pyhton script to create some > utility using http://localhost/python_script01.py > > Something like that: > > #!/usr/bin/python > print "Content-type: text/html" > prin

Re: cgi parse_qs still exists?

2015-03-30 Thread Mark Lawrence
On 30/03/2015 07:48, dieter wrote: Mark Lawrence writes: This has been marked for deprecation since at least 2.6 but is still in the 3.5 code base. Does anybody know if this is by accident or design? If the former I'll happily raise an issue to get it removed unless somebody beats me to it.

Re: cgi parse_qs still exists?

2015-03-29 Thread dieter
Mark Lawrence writes: > This has been marked for deprecation since at least 2.6 but is still > in the 3.5 code base. Does anybody know if this is by accident or > design? If the former I'll happily raise an issue to get it removed > unless somebody beats me to it. I am using "cgi.parse_qs" - an

Re: [CGI] Basic newbie error or server configuration error?

2012-08-20 Thread Gilles
On Mon, 20 Aug 2012 16:56:14 +0200, Hans Mulder wrote: >Most such panels have a button to show the error log for your own site. > >If you can't find it, ask the help desk of the web hosting company. > >If there really is no way for you to see the error log, ask the help >desk to mail you the error

Re: [CGI] Basic newbie error or server configuration error?

2012-08-20 Thread Hans Mulder
On 20/08/12 15:50:43, Gilles wrote: > On Mon, 20 Aug 2012 07:59:39 -0400, Rod Person > wrote: >> Check the Apache error log, there should be more information there. > > It's a shared account, so I only have access to what's in cPanel, > which didn't display anything. Most such panels have a butt

Re: [CGI] Basic newbie error or server configuration error?

2012-08-20 Thread Gilles
On Mon, 20 Aug 2012 07:59:39 -0400, Rod Person wrote: >Check the Apache error log, there should be more information there. It's a shared account, so I only have access to what's in cPanel, which didn't display anything. Problem solved. Thank you. -- http://mail.python.org/mailman/listinfo/pytho

Re: [CGI] Basic newbie error or server configuration error?

2012-08-20 Thread Rod Person
On Mon, 20 Aug 2012 13:41:20 +0200 Gilles wrote: > Hello > > Apache fails running this basic CGI script that I found on the Net: > > www.acme.com/cgi-bin/test.py?name=myname > === > #!/usr/bin/env python > > # Import modules for CGI handling > import cgi, cgitb > > cgitb.enable() > >

Re: [CGI] Basic newbie error or server configuration error?

2012-08-20 Thread Gilles
Found it: The script MUST return something to the browser. I was missing this: print "Content-Type: text/html;charset=utf-8" print # print a document print "Name is %s" % ( cgi.escape(name), ) Sorry about that. -- http://mail.python.org/mailman/listinfo/python-list

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Gilles
On Fri, 17 Aug 2012 14:44:37 +0100, Robert Kern wrote: >> For some reason, this CGI script that I found on Google displays the >> contents of the variable but the HTML surrounding it is displayed >> as-is by the browser instead of being rendered Thanks all. I (obviously) combined two scripts but

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Alexander Blinne
On 17.08.2012 15:27, Gilles wrote: > For some reason, this CGI script that I found on Google displays the > contents of the variable but the HTML surrounding it is displayed > as-is by the browser instead of being rendered: > print "Content-Type: text/plain;charset=utf-8" With this line you tell

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Robert Kern
On 8/17/12 2:27 PM, Gilles wrote: Hello I'm learning how to call Python scripts through the different solutions available. For some reason, this CGI script that I found on Google displays the contents of the variable but the HTML surrounding it is displayed as-is by the browser instead

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Dan Sommers
On 2012-08-17 at 15:27:59 +0200, Regarding "[CGI] Why is HTML not rendered?," Gilles wrote: > For some reason, this CGI script that I found on Google displays the > contents of the variable but the HTML surrounding it is displayed > as-is by the browser instead of being rendered: ... [with all d

Re: [CGI] Why is HTML not rendered?

2012-08-17 Thread Rob Day
On 17 August 2012 14:27, Gilles wrote: > > print "Content-Type: text/plain;charset=utf-8" > print > Here's the problem - you're telling the browser to display in plain text. Try 'text/html' instead. -- Robert K. Day robert@merton.oxon.org -- http://mail.python.org/mailman/listinfo/python

Re: CGI input: Filter dict.update() unwanted variables

2011-08-23 Thread Chris Angelico
On Mon, Aug 22, 2011 at 4:39 PM, Miki Tebeka wrote: > You can check if there is a "non-allowed variable" and then return HTTP error. > if set(form) - set(allowedVariables): >    print('Status: 406\n\n') >    raise SystemExit() > I'd be disinclined to do this; ignore unrecognized query variables,

Re: CGI input: Filter dict.update() unwanted variables

2011-08-22 Thread Gnarlodious
On Aug 22, 9:39 am, Miki Tebeka wrote: > HTH Yes it helps, thank you! -- Gnarlie http://Gnarlodious.com -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI input: Filter dict.update() unwanted variables

2011-08-22 Thread Miki Tebeka
> Is there an easy way to limit updates to > ONLY variables in the allowedVariables dict? allowedVariables = ['eeny', 'meeny', 'miny', 'mo'] form = cgi.FieldStorage() safe_input = dict((key, form.getvalue(key)) for key in allowedVariables) > And in addition, maybe return an error so the attacke

Re: CGI: Assign FieldStorage values to variables

2011-08-17 Thread Gnarlodious
On Aug 17, 3:25 am, Chris Angelico wrote: > You do NOT > want end users having the power to set variables. Thanks for the warning, I can see I will need to quarantine the form input. And update() is out of the question. -- Gnarlie http://Gnarlodious.com/ -- http://mail.python.org/mailman/listinfo

Re: CGI: Assign FieldStorage values to variables

2011-08-17 Thread Chris Rebert
On Wed, Aug 17, 2011 at 2:19 AM, Gnarlodious wrote: > I should add that this does what I want, but something a little more > Pythonic? > > import cgi, os > os.environ["QUERY_STRING"] = "name1=Val1&name2=Val2&name3=Val3" > form=cgi.FieldStorage() > > form > > dict = {} > for key in form.keys(): dic

Re: CGI: Assign FieldStorage values to variables

2011-08-17 Thread Nobody
On Wed, 17 Aug 2011 02:06:31 -0700, Gnarlodious wrote: > I get a construct like this: > > form=FieldStorage(None, None, [MiniFieldStorage('name1', 'Val1'), > MiniFieldStorage('name2', 'Val2'), MiniFieldStorage('name3', 'Val3')]) > > Now how would I assign every variable name* its value? Don't d

Re: CGI: Assign FieldStorage values to variables

2011-08-17 Thread Gnarlodious
I should add that this does what I want, but something a little more Pythonic? import cgi, os os.environ["QUERY_STRING"] = "name1=Val1&name2=Val2&name3=Val3" form=cgi.FieldStorage() form dict = {} for key in form.keys(): dict[ key ] = form[ key ].value dict locals().update(dict) name3 -- Gnarl

Re: CGI: Assign FieldStorage values to variables

2011-08-17 Thread Chris Angelico
On Wed, Aug 17, 2011 at 10:19 AM, Gnarlodious wrote: > import cgi, os > os.environ["QUERY_STRING"] = "name1=Val1&name2=Val2&name3=Val3" > form=cgi.FieldStorage() > > form > > dict = {} > for key in form.keys(): dict[ key ] = form[ key ].value > You could probably use a list comp for this, but the

Re: CGI: Assign FieldStorage values to variables

2011-08-17 Thread Chris Angelico
On Wed, Aug 17, 2011 at 10:06 AM, Gnarlodious wrote: > I get a construct like this: > > form=FieldStorage(None, None, [MiniFieldStorage('name1', 'Val1'), > MiniFieldStorage('name2', 'Val2'), MiniFieldStorage('name3', 'Val3')]) > > when I need to assign the variable name2 the value Val2 You can pr

Re: CGI: Assign FieldStorage values to variables

2011-08-17 Thread Gnarlodious
I should add that this does what I want, but something a little more Pythonic? import cgi, os os.environ["QUERY_STRING"] = "name1=Val1&name2=Val2&name3=Val3" form=cgi.FieldStorage() form dict = {} for key in form.keys(): dict[ key ] = form[ key ].value dict locals().update(dict) name3 -- Gnarl

Re: CGI: remove variable from Tuple Object query

2011-06-05 Thread Chris Rebert
On Sun, Jun 5, 2011 at 8:55 PM, Gnarlodious wrote: > Say I send a request like this: > http://0.0.0.0/Sectrum/Gnomon?see=Gnomon&order=7&epoch=1303541219 > > This makes for a CGIform of the CGI Tuple Object type: > FieldStorage(None, None, [MiniFieldStorage('see', 'Gnomon'), > MiniFieldStorage('ord

Re: CGI FieldStorage instances?

2010-11-24 Thread Gnarlodious
On Nov 23, 7:22 pm, Ian Kelly wrote: > Try Django[1] or TurboGears[2]. > > [1]http://www.djangoproject.com/ > [2]http://www.turbogears.org/ Thanks, never understood what those programs were for. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI FieldStorage instances?

2010-11-23 Thread Ian Kelly
On 11/23/2010 7:01 PM, Gnarlodious wrote: On Nov 22, 11:32 pm, Dennis Lee Bieber wrote: Or upgrade to some modernistic framework wherein the application is a monolithic program and the "name/" portion maps to methods/functions within the application... Yes, that describes what I am l

Re: CGI FieldStorage instances?

2010-11-23 Thread Gnarlodious
On Nov 22, 11:32 pm, Dennis Lee Bieber wrote: >         Or upgrade to some modernistic framework wherein the application is > a monolithic program and the "name/" portion maps to methods/functions > within the application... Yes, that describes what I am looking for! Is there such a modernistic f

Re: CGI FieldStorage instances?

2010-11-22 Thread Gnarlodious
Let me rephrase the question. Say I have a query string like this: ?view=Data&item=9875 What I want to do is simply invoke process "view" with variable "Data". This would replace my existing query string mess which looks like this: if 'view' in form and 'item' in form: HTML=view(Data, item(9

Re: CGI FieldStorage instances?

2010-11-21 Thread Tim Roberts
Gnarlodious wrote: > >I'm having a hard time understanding this, can someone explain? > >Running a CGI with query string: > >?action=Find&page=Data > >Script includes these lines: > >form=cgi.FieldStorage(keep_blank_values=1) >print("Content-type:text/html\n\n") >print(cgi.print_form(form)) > >Out

Re: CGI python 3 write RAW BINARY

2010-05-21 Thread sam
On May 7, 7:33 am, Dodo wrote: > Le 01/05/2010 12:52, Dodo a écrit : > > > > > > > Le 30/04/2010 17:52, Antoine Pitrou a écrit : > >> Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : > >>> I don't get a thing. > >>> Now with the fix : > >>> All browsers shows a different thing, but not the i

Re: CGI python 3 write RAW BINARY

2010-05-07 Thread Dodo
Le 01/05/2010 12:52, Dodo a écrit : Le 30/04/2010 17:52, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : I don't get a thing. Now with the fix : All browsers shows a different thing, but not the image! http://ddclermont.homeip.net/misc/python/ If I save it to co

Re: CGI python 3 write RAW BINARY

2010-05-04 Thread Gabriel Genellina
En Sat, 01 May 2010 07:52:01 -0300, Dodo escribió: Le 30/04/2010 17:52, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : I don't get a thing. Now with the fix : All browsers shows a different thing, but not the image! http://ddclermont.homeip.net/misc/python/

Re: CGI python 3 write RAW BINARY

2010-05-01 Thread Dodo
Le 30/04/2010 17:52, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : I don't get a thing. Now with the fix : All browsers shows a different thing, but not the image! http://ddclermont.homeip.net/misc/python/ If I save it to computer : * Windows image viewer won't

Re: CGI python 3 write RAW BINARY

2010-04-30 Thread Antoine Pitrou
Le Thu, 29 Apr 2010 23:37:32 +0200, Dodo a écrit : > I don't get a thing. > Now with the fix : > All browsers shows a different thing, but not the image! > http://ddclermont.homeip.net/misc/python/ > > If I save it to computer : > * Windows image viewer won't read it > * Irfanview can read it

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Dodo
Le 29/04/2010 18:33, Dodo a écrit : Le 29/04/2010 17:07, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit : @Antoine : It not sys.stdout.buffer.write but sys.stdout.write() instead. But it still doesn't work, now I have empty content Let me insist: please use sys.std

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Dodo
Le 29/04/2010 22:21, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 18:33:08 +0200, Dodo a écrit : Oh, I tested on my windows machine avec sys.stdout.buffer.write() didn't work. I just tested on my linux server, and it works So, let's modify the script sys.stdout.buffer.write

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Antoine Pitrou
Le Thu, 29 Apr 2010 18:33:08 +0200, Dodo a écrit : > Oh, I tested on my windows machine avec sys.stdout.buffer.write() didn't > work. > I just tested on my linux server, and it works > > So, let's modify the script > > sys.stdout.buffer.write( f.read() ) > sys.stdo

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Dodo
Le 29/04/2010 17:07, Antoine Pitrou a écrit : Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit : @Antoine : It not sys.stdout.buffer.write but sys.stdout.write() instead. But it still doesn't work, now I have empty content Let me insist: please use sys.stdout.buffer.write(). You'll also have

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Antoine Pitrou
Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit : > > @Antoine : It not sys.stdout.buffer.write but sys.stdout.write() > instead. But it still doesn't work, now I have empty content Let me insist: please use sys.stdout.buffer.write(). You'll also have to call sys.stdout.flush() before doing so.

Re: CGI python 3 write RAW BINARY

2010-04-29 Thread Dodo
Le 29/04/2010 01:45, Antoine Pitrou a écrit : Le Wed, 28 Apr 2010 23:54:07 +0200, Dodo a écrit : Help! this is driving me crazy lol I want to print raw binary data to display an image file BUT python3 outputs b'' instead of so the browser can't read the image!! f = open("/some/path/%s"

Re: CGI python 3 write RAW BINARY

2010-04-28 Thread Antoine Pitrou
Le Wed, 28 Apr 2010 23:54:07 +0200, Dodo a écrit : > Help! this is driving me crazy lol > I want to print raw binary data to display an image file BUT > python3 outputs b'' instead of so the > browser can't read the image!! > > f = open("/some/path/%s" % x, 'rb') > print(f.read()) print

Re: CGI python 3 write RAW BINARY

2010-04-28 Thread Gary Herron
Dodo wrote: Help! this is driving me crazy lol I want to print raw binary data to display an image file BUT python3 outputs b'' instead of so the browser can't read the image!! f = open("/some/path/%s" % x, 'rb') print(f.read()) any idea? Dorian Huh??? In what universe does print

Re: CGI templating with python

2010-04-02 Thread Aaron Watters
On Apr 1, 11:19 am, KB wrote: > > Django will probably get you where you want to go the fastest: > > >    http://www.djangoproject.com/ > > > In particular, its admin interface will probably automatically generate a > > usable > > UI for you without your having to write many templates at all. > >

Re: CGI templating with python

2010-04-01 Thread KB
> Django will probably get you where you want to go the fastest: > >    http://www.djangoproject.com/ > > In particular, its admin interface will probably automatically generate a > usable > UI for you without your having to write many templates at all. Robert, Thank you very very much. I had a

Re: CGI templating with python

2010-04-01 Thread Someone Something
Cheetah would work, but it would be a major pain to debug (I hate those 500 Server Error pages) something django (as mentioned above) or turbogears (with Kid) would get you rolling quickly. On Wed, Mar 31, 2010 at 8:38 PM, KB wrote: > Hi there, > > Years ago I wrote a LAMP app using python. I fi

Re: CGI templating with python

2010-03-31 Thread Robert Kern
On 2010-03-31 19:38 , KB wrote: Hi there, Years ago I wrote a LAMP app using python. I find I need a simple web data entry tool to store records (stock research) and when I enter a stock ticker, to pull up all the past research I have done. I am imagining fields like ticker, date, pulldown menus

Re: CGI vs mod_python

2009-11-12 Thread Victor Subervi
On Wed, Nov 11, 2009 at 3:32 PM, Dave Angel wrote: > > > Victor Subervi wrote: > >> >> >> The problem was not CGI. It turned out to be line-endings being mangled by >> Windoze and __invisible __ in my unix editor. Lovely. >> Thanks anyway, >> V >> >> >> > That's twice you've blamed Windows for t

Re: CGI vs mod_python

2009-11-11 Thread Dave Angel
Victor Subervi wrote: The problem was not CGI. It turned out to be line-endings being mangled by Windoze and __invisible __ in my unix editor. Lovely. Thanks anyway, V That's twice you've blamed Windows for the line-ending problem. Windows didn't create those crlf endings, your text edit

Re: CGI vs mod_python

2009-11-11 Thread Victor Subervi
On Tue, Nov 10, 2009 at 6:12 PM, John Nagle wrote: > sstein...@gmail.com wrote: > >> >> On Nov 9, 2009, at 10:18 AM, Victor Subervi wrote: >> >> Yes, obviously. But if CGI is enabled, it should work anyway, should it >>> not? >>> >> >> Depends on what "CGI is enabled" means. >> >> Usually, web s

Re: CGI vs mod_python

2009-11-10 Thread John Nagle
sstein...@gmail.com wrote: On Nov 9, 2009, at 10:18 AM, Victor Subervi wrote: Yes, obviously. But if CGI is enabled, it should work anyway, should it not? Depends on what "CGI is enabled" means. Usually, web servers are not set to just handle cgi scripts from anywhere, but only from specif

Re: CGI vs mod_python

2009-11-09 Thread Victor Subervi
Uuuuh. Thanks! V On Mon, Nov 9, 2009 at 10:45 AM, sstein...@gmail.com wrote: > On Nov 9, 2009, at 10:41 AM, Victor Subervi wrote: > > On Mon, Nov 9, 2009 at 10:29 AM, sstein...@gmail.com > wrote: > >> >> On Nov 9, 2009, at 10:18 AM, Victor Subervi wrote: >> >> Yes, obviously. But if CGI is enab

Re: CGI vs mod_python

2009-11-09 Thread sstein...@gmail.com
On Nov 9, 2009, at 10:18 AM, Victor Subervi wrote: Yes, obviously. But if CGI is enabled, it should work anyway, should it not? Depends on what "CGI is enabled" means. Usually, web servers are not set to just handle cgi scripts from anywhere, but only from specific file system locations.

Re: CGI vs mod_python

2009-11-09 Thread Victor Subervi
Yes, obviously. But if CGI is enabled, it should work anyway, should it not? V On Mon, Nov 9, 2009 at 9:46 AM, sstein...@gmail.com wrote: > > On Nov 9, 2009, at 9:32 AM, Victor Subervi wrote: > > Hi; >> I've been told by a server farm that they're having trouble getting my >> scripts to work be

Re: CGI vs mod_python

2009-11-09 Thread sstein...@gmail.com
On Nov 9, 2009, at 9:32 AM, Victor Subervi wrote: Hi; I've been told by a server farm that they're having trouble getting my scripts to work because they're written with cgi calls as opposed to mod_python. Is there a basis for their complaint? These pages serve fine on another server.

Re: cgi and POST

2009-08-28 Thread Ken Seehart
D'Arcy J.M. Cain wrote: On Fri, 28 Aug 2009 13:59:57 -0700 Ken Seehart wrote: Using cgi, how do I get the /data /(not the uri arguments) originating from a POST that did not originate from a form. You don't care where it came from. Just treat it exactly as if it came from a form.

Re: cgi and POST

2009-08-28 Thread D'Arcy J.M. Cain
On Fri, 28 Aug 2009 13:59:57 -0700 Ken Seehart wrote: > Using cgi, how do I get the /data /(not the uri arguments) originating > from a POST that did not originate from a form. You don't care where it came from. Just treat it exactly as if it came from a form. -- D'Arcy J.M. Cain |

Re: cgi script

2009-08-02 Thread Piet van Oostrum
> golu (g) wrote: >g> Hi, >g> i started learning cgi few days ago in python and everything went >g> fine until i started getting the follwing error >g> " >g> The server encountered an internal error and was unable to complete >g> your request. Either the server is overloaded or there was an

Re: cgi script

2009-08-02 Thread Carl Banks
On Aug 1, 11:11 pm, golu wrote: > Hi, > i started learning cgi few days ago in python and everything went > fine  until i started getting the follwing error > " > The server encountered an internal error and was unable to complete > your request. Either the server is overloaded or there was an err

Re: cgi file limit size?

2009-04-09 Thread davidj411
i am using these modules: import cgi,time import cgitb; cgitb.enable() iis webmapping now works with -U (key was to remove '-u' from the grouping of "s"'s: C:\Python25\python.exe -u "%s %s" here is the form html code: Server name: File name: i increased the timeout on the IIS server to 2,200

Re: CGI Python problem

2008-11-07 Thread Tim O'Toole
> > Well, if Python's not installed, the next step is _getting_ it installed -- > whether having your admin install it globally (I mean, who *doesn't* install > python?! ;-) or you install it locally in your home directory as detailed > at [1] where you download the source and compile from scratch

Re: CGI Python problem

2008-11-06 Thread Tim Chase
Tim O'Toole wrote: Alas that cgi script confirmed python is not installed on the server machine (which I had assumed it was). Did you also try it with the "find" variant in addition to just the "which" version? This would find Python if it wasn't on the $PATH. Looks like game over with th

Re: CGI Python problem

2008-11-06 Thread Tim O'Toole
Alas that cgi script confirmed python is not installed on the server machine (which I had assumed it was). Looks like game over with this avenue of trouble shooting? On Fri, Nov 7, 2008 at 1:03 AM, Tim Chase <[EMAIL PROTECTED]> wrote: >> As for writing some perl, not too sure how to do that, but

Re: CGI Python problem

2008-11-06 Thread Tim Chase
As for writing some perl, not too sure how to do that, but from the information in phpinfo I logged onto the webserver machine and did a "whereis python" - it came back blank! Of course doing a whereis perl gave a non-blank answer. So this seems to be the route cause of my trouble. Indeed! I ma

Re: CGI Python problem

2008-11-06 Thread Tim O'Toole
With regard to phpinfo(), its shows the mod_cgi is loaded, but neither mod_perl or mod_python is loaded (I read on the python.org site that mod_python can interfere with running python through mod_python). As for writing some perl, not too sure how to do that, but from the information in phpinfo I

Re: CGI Python problem

2008-11-06 Thread Tim Chase
Here is the permissions, which I think are definitely right now: drwxrwxrwx 8 4.0K Nov 6 13:34 public_html/ drwxrwxrwx 2 4.0K Nov 6 13:35 cgi-bin/ [inside public_html] -rw-r-xr-x 1 117 Nov 6 11:39 test_pl.cgi* [inside cgi-bin] -rw-r-xr-x 1 168

Re: CGI Python problem

2008-11-06 Thread Tim O'Toole
Thanks for replying Tim, Here is the permissions, which I think are definitely right now: drwxrwxrwx 8 4.0K Nov 6 13:34 public_html/ drwxrwxrwx 2 4.0K Nov 6 13:35 cgi-bin/ [inside public_html] -rw-r-xr-x 1 117 Nov 6 11:39 test_pl.cgi* [inside cgi-bin] -rw-

Re: CGI Python problem

2008-11-06 Thread Tim Chase
I've placed this file in both public_html and as a test in public_html/ cgi-bin directories in my local user account (I dont have root access - its a corparate network). The file definitely has read and execute permission (744) as have the assoicated directories. My guess would be the permission

Re: cgi, parse_header and semi-colon

2008-06-10 Thread Gabriel Genellina
En Sat, 07 Jun 2008 04:49:41 -0300, Sylvain <[EMAIL PROTECTED]> escribió: > If we upload a file with a semi-colon (i.e : "C:/my;file.jpg") : > cgi.FieldStorage.filename returns only "my" everything after the semi- > colon is missing It's a known bug: http://bugs.python.org/issue1540529 - the

Re: cgi, parse_header and semi-colon

2008-06-07 Thread Sylvain
On Jun 6, 5:33 pm, "Richard Brodie" <[EMAIL PROTECTED]> wrote: > "Sylvain" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > If we upload a file with a semi-colon (i.e : "C:/my;file.jpg") : > > cgi.FieldStorage.filename returns only "my" everything after the semi- > > colon is m

Re: cgi, parse_header and semi-colon

2008-06-06 Thread Richard Brodie
"Sylvain" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If we upload a file with a semi-colon (i.e : "C:/my;file.jpg") : > cgi.FieldStorage.filename returns only "my" everything after the semi- > colon is missing > > Is it a bug or i'm missing something ? I doubt it's bug in par

Re: CGI with URL problem

2008-02-14 Thread rodmc
Thanks for your reply, no one is running locally on my PC and the other as the default user which occurs when the script is run through a browser. Best, rod -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI with URL problem

2008-02-13 Thread Ralf Schönian
rodmc schrieb: > -- sorry if this has shown up twice, but my browser crashed and ended > up posting the message when I hit the space bar for some odd reason. > Also it was not quite ready. > > Hi, > > I am writing a small CGI app which tests if another webpage exists, > the pages are on a Wiki s

Re: cgi undefined?

2007-11-04 Thread Tyler Smith
On 2007-11-04, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > '/home/tyler/public_html/cgi-bin/cgi.py' > ^^ > > Very simple -- you named YOUR handler "cgi". So when it does "import > cgi" it is importing itself... > Of course. I knew it must be somethin

Re: cgi undefined?

2007-11-04 Thread Bruno Desthuilliers
Tyler Smith a écrit : > Hi, > > I'm trying to learn how to use python for cgi scripting. I've got > apache set up on my laptop, and it appears to be working correctly. > I can run a basic cgi script that just outputs a new html page, > without reading in any form data, so I know that the basics ar

Re: CGI and external JavaScript nightmare

2007-10-22 Thread Istvan Albert
On Oct 18, 5:04 pm, IamIan <[EMAIL PROTECTED]> wrote: > > > The OP's problem is that he suffers from the delusion that people want > > > to steal the source code for hisCGIscript. > > Why is assuming someone may try to get my source CGI delusional? > > I'm on a shared server (Dreamhost). The CGI it

Re: CGI Server that supports redirects

2007-10-22 Thread John J. Lee
Thomas Guettler <[EMAIL PROTECTED]> writes: > Hi, > > CGIHTTPServer does not support redirects[1] > > Is there an other python-only way to get a web server > running wich can execute python code? > > Since I already use flup[2]. I think there is not much > missing to get it serving as http server.

Re: cgi scripts in Mac OS X

2007-10-20 Thread James Stroud
Jeff McNeil wrote: > Your web server needs to be told to execute Python scripts. You can > handle it a few different ways, depending on your environment. > > 1. Place your .py script inside of a ScriptAlias'd /cgi-bin/ directory > which will force it to be executed. > > 2. Rename your .py script

Re: cgi scripts in Mac OS X

2007-10-20 Thread Jeff McNeil
Your web server needs to be told to execute Python scripts. You can handle it a few different ways, depending on your environment. 1. Place your .py script inside of a ScriptAlias'd /cgi-bin/ directory which will force it to be executed. 2. Rename your .py script to .cgi and add an 'AddHandler c

Re: CGI Server that supports redirects

2007-10-19 Thread Michele Simionato
On Oct 19, 10:56 am, Thomas Guettler <[EMAIL PROTECTED] guettler.de> wrote: > Hi, > > CGIHTTPServer does not support redirects[1] > > Is there an other python-only way to get a web server > running wich can execute python code? Have you tried the CherryPy server, which is also included with Paste?

Re: CGI and external JavaScript nightmare

2007-10-18 Thread IamIan
> > The OP's problem is that he suffers from the delusion that people want > > to steal the source code for hisCGIscript. Why is assuming someone may try to get my source CGI delusional? I'm on a shared server (Dreamhost). The CGI itself has 755 permissions to execute, but what about folder permi

Re: CGI and external JavaScript nightmare

2007-10-18 Thread Paul Boddie
On 18 Okt, 17:24, Steve Holden <[EMAIL PROTECTED]> wrote: > allen.fowler wrote: [Quoting IamIan...] > >> One CGI question - since all of my CGIs are spitting out HTML is their > >> source code safe? wget and linking to the source deliver the output > >> HTML. Are there any other methods of trying

Re: CGI and external JavaScript nightmare

2007-10-18 Thread Steve Holden
allen.fowler wrote: >> One CGI question - since all of my CGIs are spitting out HTML is their >> source code safe? wget and linking to the source deliver the output >> HTML. Are there any other methods of trying to steal the source CGI I >> need to protect against? >> >> Thank you. > > Not sure I

Re: CGI and external JavaScript nightmare

2007-10-17 Thread IamIan
Thank you for the replies. After a lot of research I tracked down the issue. I was using the CGI to build all of the pages for the site, then filling in content with .innerHTML= as users clicked on tabs. Since I wanted to place the Google Ads in different parts of each page, the Google Ads JavaScri

Re: CGI and external JavaScript nightmare

2007-10-17 Thread allen.fowler
> > One CGI question - since all of my CGIs are spitting out HTML is their > source code safe? wget and linking to the source deliver the output > HTML. Are there any other methods of trying to steal the source CGI I > need to protect against? > > Thank you. Not sure I fully understand the questi

Re: CGI and external JavaScript nightmare

2007-10-17 Thread IamIan
Thank you for the replies. After a lot of research I tracked down the issue. I was using the CGI to build all of the pages for the site, then filling in content with .innerHTML= as users clicked on tabs. Since I wanted to place the Google Ads in different parts of each page, the Google Ads JavaScri

Re: CGI and external JavaScript nightmare

2007-10-17 Thread IamIan
Thank you for the replies. After a lot of research I tracked down the issue. I was using the CGI to build all of the pages for the site, then filling in content with .innerHTML= as users clicked on tabs. Since I wanted to place the Google Ads in different parts of each page, the Google Ads JavaScri

Re: CGI and external JavaScript nightmare

2007-10-17 Thread IamIan
Thank you for the replies. After a lot of research I tracked down the issue. I was using the CGI to build all of the pages for the site, then filling in content with .innerHTML= as users clicked on tabs. Since I wanted to place the Google Ads in different parts of each page, the Google Ads JavaScri

Re: CGI and external JavaScript nightmare

2007-10-17 Thread IamIan
Thank you for the replies. After a lot of research I tracked down the issue. I was using the CGI to build all of the pages for the site, then filling in content with .innerHTML= as users clicked on tabs. Since I wanted to place the Google Ads in different parts of each page, the Google Ads JavaScri

Re: CGI and external JavaScript nightmare

2007-10-16 Thread Paul Boddie
On 11 Okt, 08:23, IamIan <[EMAIL PROTECTED]> wrote: > My website is built from a Python CGI and works great. I'm now > including Google Ads, which requires two pieces of JavaScript; the > first contains the display settings for the ads, and the second piece > is a very lengthy garbled js file > at

Re: CGI and external JavaScript nightmare

2007-10-15 Thread File Grok
What's your URL for an example page that is having this error? Trying to figure out Google's JS is usually an example of self abuse. > My website is built from a Python CGI and works great. I'm now > including Google Ads, which requires two pieces of JavaScript; the > first contains the display se

Re: CGI and external JavaScript nightmare

2007-10-11 Thread Istvan Albert
On Oct 11, 2:23 am, IamIan <[EMAIL PROTECTED]> wrote: > > is a very lengthy garbled js file > athttp://pagead2.googlesyndication.com/pagead/show_ads.js > > The first piece of JavaScript works fine and the ads display > correctly, however the second file throws an "unterminated string > literal" js

Re: CGI and external JavaScript nightmare

2007-10-11 Thread IamIan
bump -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi

2007-08-29 Thread Fabio Z Tessitore
Il Wed, 29 Aug 2007 23:11:53 +0200, Gigs_ ha scritto: > Gigs_ wrote: >> Fabio Z Tessitore wrote: >>> Are you sure your script is in the right dir? >>> >>> On my home computer, php script will work in /var/www but my python >>> script need an other dir to work properly (i don't remember which now >

Re: cgi

2007-08-29 Thread Gigs_
Gigs_ wrote: > Fabio Z Tessitore wrote: >> Are you sure your script is in the right dir? >> >> On my home computer, php script will work in /var/www but my python >> script need an other dir to work properly (i don't remember which now >> ;-)) >> >> bye >> > i think that it is in right dir becaus

Re: cgi

2007-08-29 Thread Gigs_
Fabio Z Tessitore wrote: > Are you sure your script is in the right dir? > > On my home computer, php script will work in /var/www but my python > script need an other dir to work properly (i don't remember which now ;-)) > > bye > i think that it is in right dir because other script in same di

Re: cgi

2007-08-29 Thread Fabio Z Tessitore
Are you sure your script is in the right dir? On my home computer, php script will work in /var/www but my python script need an other dir to work properly (i don't remember which now ;-)) bye -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi

2007-08-29 Thread Gigs_
Fabio Z Tessitore wrote: > Il Wed, 29 Aug 2007 19:24:54 +0200, Gigs_ ha scritto: > >> i have simple page and form that ask for name and color and cgi script >> that print that name in another page and background in chosen color >> >> all the time this error pop: >> Error response >> >> Error code

  1   2   3   4   >