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
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
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/
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
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
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
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
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
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
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.
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"
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
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
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
--
http://mail.python.org/mailman/listinfo/python-l
>
> 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
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
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
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
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
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
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-
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
Hi all,
I'm trying to get python to work with cgi for a small intranet site,
however even a simply "hello world test isn't working". Here is the
test file:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable debugging
import cgitb; cgitb.enable()
print "Content-Type: text/plain;charset=utf-8"
pr
Hello:
I would like to generate a temporary output in my cgi-python script where
the user could see the actual program status while the program is still
running behind the web, and know how long approximately it could take, and
then finally display the final cgi-output. I have no idea how
Thanks for quick reply.
Yes, that's the hint I needed.
Lada
Marc 'BlackJack' Rintsch wrote:
> On Tue, 24 Jul 2007 11:58:47 +0200, Ladislav Andel wrote:
>
>
>> Here is what I have in image.cgi but it is incorrect and i'm not able to
>> find it on the web.
>>
>> #!/usr/bin/python
>> print "Cont
Marc 'BlackJack' Rintsch wrote:
> On Tue, 24 Jul 2007 11:58:47 +0200, Ladislav Andel wrote:
>
>> Here is what I have in image.cgi but it is incorrect and i'm not able to
>> find it on the web.
>>
>> #!/usr/bin/python
>> print "Content-Type: image/png\n"
>> print 'image.png'
>
> You have to print
On Tue, 24 Jul 2007 11:58:47 +0200, Ladislav Andel wrote:
> Here is what I have in image.cgi but it is incorrect and i'm not able to
> find it on the web.
>
> #!/usr/bin/python
> print "Content-Type: image/png\n"
> print 'image.png'
You have to print the image, not the name. Read the binary fi
Hi,
I'm trying to display image through my cgi script in HTML page
via
Can you give me an example, please?
What should be in the cgi script to display it?
Here is what I have in image.cgi but it is incorrect and i'm not able to
find it on the web.
#!/usr/bin/python
print "Content-Type: image/p
Adrian Smith wrote:
> On May 7, 2:30 pm, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>> On Sun, 06 May 2007 21:30:16 -0700, Adrian Smith wrote:
>
>> It is NOT the same error. There are NO syntax errors in the script, there
>> is a runtime error. The so-called administrator is wrong: you can't use
On May 7, 2:30 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Sun, 06 May 2007 21:30:16 -0700, Adrian Smith wrote:
> It is NOT the same error. There are NO syntax errors in the script, there
> is a runtime error. The so-called administrator is wrong: you can't use
> Perl to test just any old
On Sun, 06 May 2007 21:30:16 -0700, Adrian Smith wrote:
> The support guy looked at it and gave me this:
>
> Traceback (most recent call last):
> File "python1.cgi", line 6, in ?
> print form["essay"].value
> File "/usr/local/lib/python2.4/cgi.py", line 559, in __getitem__ raise
> KeyError, key
>
While waiting for my paid-for web-hosting company to get back to me
about my difficulties running python scripts on their servers...
http://groups.google.com/group/comp.lang.python/browse_frm/thread/39b52bcf0dffec4c/4ff805bf283acc15?lnk=gst&q=adrian+smith&rnum=1&hl=en#4ff805bf283acc15
...I went and
Hi Christian,
I have seen your well-solved cgi-python answers. That's why I think you
would be able to answer my query related to the same.
I am writing a cgi program and placing it in cgi-bin folder of Apache
Server. Now I have written a python script in the same folder to
generate a
[EMAIL PROTECTED]:
>I know PHP has support for uploading files from the browser to the
>server, but does python (not mod_py) have any modules for going about
>this?
http://www.python.org/doc/2.3.2/lib/node403.html
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/273844
--
René Pijlman
--
I know PHP has support for uploading files from the browser to the
server, but does python (not mod_py) have any modules for going about
this? If not post your ideas on how I should do this.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> Testing Web applications can be hard, but the traceback tells you
> everything you need to know here.
especially if you make sure to use the cgitb module:
http://docs.python.org/lib/module-cgitb.html
while developing/debugging.
--
http://mail.python.org/mailman/li
Python_it wrote:
> I going to use the cgi-handler (mod_python):
>
> http://www.modpython.org/live/mod_python-3.2.2b/doc-html/hand-cgi.html
>
> If I test a simply py script it works
You don't say how you test it, but I imagine that you just point your
browser to the location where the program is pu
Python_it wrote:
> I going to use the cgi-handler (mod_python):
>
> http://www.modpython.org/live/mod_python-3.2.2b/doc-html/hand-cgi.html
>
>
> If I test a simply py script it works
>
> code:
> ===
> print "Content-type: text/html\n"
> print """
>
>
> TEST
>
>
> """
>
I going to use the cgi-handler (mod_python):
http://www.modpython.org/live/mod_python-3.2.2b/doc-html/hand-cgi.html
If I test a simply py script it works
code:
===
print "Content-type: text/html\n"
print """
TEST
"""
But if I test a py script with cgi comments (import
39 matches
Mail list logo