Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #37217

Re: Forcing Python to detect DocumentRoot

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torriem@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.017
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.05; 'binary': 0.05; 'python': 0.09; 'thread,': 0.09; 'apache': 0.13; 'server,': 0.15; '"python': 0.16; 'content-type': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'wrote:': 0.17; 'script.': 0.17; 'file.': 0.20; 'trying': 0.21; 'script': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'am,': 0.27; 'tree': 0.27; 'cgi': 0.29; 'header,': 0.29; 'code': 0.31; 'file': 0.32; 'running': 0.32; 'to:addr :python-list': 0.33; 'screen': 0.34; 'wrong': 0.34; 'open': 0.35; 'too.': 0.35; 'received:org': 0.36; 'serve': 0.36; 'but': 0.36; 'message-id:@gmail.com': 0.36; 'anything': 0.36; 'too': 0.36; 'display': 0.36; 'possible': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'header:Received:5': 0.40; 'your': 0.60; 'link': 0.60; 'remove': 0.61; 'times': 0.63; 'more': 0.63; 'useful.': 0.65; 'technically': 0.91
X-Virus-Scanned amavisd-new at torriefamily.org
Date Mon, 21 Jan 2013 11:42:06 -0700
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:10.0.11) Gecko/20121115 Thunderbird/10.0.11
MIME-Version 1.0
To python-list@python.org
Subject Re: Forcing Python to detect DocumentRoot
References <339d9d6d-b000-4cf3-8534-375e0c44b2ca@googlegroups.com> <roy-E9765E.09090217012013@news.panix.com> <mailman.590.1358435662.2939.python-list@python.org> <10ebf68d-12f9-46d6-be50-6c314500302d@googlegroups.com> <mailman.628.1358515700.2939.python-list@python.org> <2bf766db-ffcd-4a7f-8e08-6e3400618e78@googlegroups.com> <mailman.652.1358544847.2939.python-list@python.org> <mailman.676.1358583157.2939.python-list@python.org> <m2y5fposc4.fsf@cochabamba.vanoostrum.org> <c435de79-a4bf-447a-b187-b6f8866be675@googlegroups.com> <mailman.741.1358771626.2939.python-list@python.org> <52e3e53e-f2fe-4e0f-a11d-1c6d52f39c36@googlegroups.com>
In-Reply-To <52e3e53e-f2fe-4e0f-a11d-1c6d52f39c36@googlegroups.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.758.1358793733.2939.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1358793733 news.xs4all.nl 6887 [2001:888:2000:d::a6]:60244
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:37217

Show key headers only | View raw


On 01/21/2013 07:55 AM, Ferrous Cranus wrote:
> Yes Dave so we need to remove <img src="/data/images/mail.png">
> since the apache cant see to open it and let Python open it which we
> know it can because it has access to any system file the user has
> access too.

What are you trying to accomplish?  I don't see how opening the file
with python will do anything because as has been said many times on this
thread, your python CGI generates html code which the browser then
renders.  Opening an image file with python will do nothing useful.

> So if a python script can open any file the user has access too then
> we need a "python way" of opening this file.

Still don't understand why you want python to open the image file.  What
do you want python to do with it?  It's running on a web server, so
there's no screen for python to display the image too.

Technically it is possible to have a script that opens the image and
serves it up as a binary stream to the browser using the image
content-type header, but it's way more efficient to serve up the file
statically.  And you'd have to have a proper link in the html code
anyway, to refer to your image-serving CGI script.

Methinks you're barking up the wrong tree with python opening the image
file.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-16 05:51 -0800
  Re: Forcing Python to detect DocumentRoot Joel Goldstick <joel.goldstick@gmail.com> - 2013-01-16 09:01 -0500
    Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-16 06:32 -0800
      Re: Forcing Python to detect DocumentRoot Joel Goldstick <joel.goldstick@gmail.com> - 2013-01-16 09:39 -0500
    Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-16 06:32 -0800
  Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-17 01:03 -0800
  Re: Forcing Python to detect DocumentRoot rusi <rustompmody@gmail.com> - 2013-01-17 05:51 -0800
  Re: Forcing Python to detect DocumentRoot Roy Smith <roy@panix.com> - 2013-01-17 09:09 -0500
    Re: Forcing Python to detect DocumentRoot Joel Goldstick <joel.goldstick@gmail.com> - 2013-01-17 10:14 -0500
      Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-18 05:02 -0800
        Re: Forcing Python to detect DocumentRoot Joel Goldstick <joel.goldstick@gmail.com> - 2013-01-18 08:28 -0500
          Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-18 10:58 -0800
            Re: Forcing Python to detect DocumentRoot Joel Goldstick <joel.goldstick@gmail.com> - 2013-01-18 14:11 -0500
            Re: Forcing Python to detect DocumentRoot Chris Angelico <rosuav@gmail.com> - 2013-01-19 08:34 +1100
              Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-19 00:01 -0800
                Re: Forcing Python to detect DocumentRoot Michael Torrie <torriem@gmail.com> - 2013-01-21 11:49 -0700
              Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-19 00:01 -0800
                Re: Forcing Python to detect DocumentRoot Piet van Oostrum <piet@vanoostrum.org> - 2013-01-19 21:01 +0100
                Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-20 22:25 -0800
                Re: Forcing Python to detect DocumentRoot Dave Angel <d@davea.name> - 2013-01-21 07:33 -0500
                Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 06:55 -0800
                Re: Forcing Python to detect DocumentRoot Michael Torrie <torriem@gmail.com> - 2013-01-21 11:42 -0700
                Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 06:55 -0800
          Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-18 10:58 -0800
        Re: Forcing Python to detect DocumentRoot Rodrick Brown <rodrick.brown@gmail.com> - 2013-01-18 08:41 -0500
          Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-18 12:49 -0800
          Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-18 12:49 -0800
        Re: Forcing Python to detect DocumentRoot Michael Torrie <torriem@gmail.com> - 2013-01-21 08:46 -0700
          Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 08:02 -0800
            Re: Forcing Python to detect DocumentRoot Michael Torrie <torriem@gmail.com> - 2013-01-21 11:36 -0700
          Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 08:02 -0800
            Re: Forcing Python to detect DocumentRoot Piet van Oostrum <piet@vanoostrum.org> - 2013-01-21 20:05 +0100
      Re: Forcing Python to detect DocumentRoot Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-18 05:02 -0800
  Re: Forcing Python to detect DocumentRoot Barry Scott <barry@barrys-emacs.org> - 2013-01-19 11:40 +0000
  Re: Forcing Python to detect DocumentRoot alex23 <wuwei23@gmail.com> - 2013-01-19 17:53 -0800

csiph-web