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
>
> 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
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
>
[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
--
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
>
>
> """
>
28 matches
Mail list logo