New submission from Deepak Dodo deepakd...@gmail.com:
When I try to read the contents of the webpage:
http://www.ai-class.com/course/json/filter/QuizQuestion
using urllib.read, it doesn't read the entire content.
This behavior is only seen on windows and the same operation works fine on
linux
Deepak Dodo deepakd...@gmail.com added the comment:
This is the source code I am using. Even if I use any module other than urllib
to read the contents, its not reading the entire contents of the webpage. This
happens only on Windows.
--
Added file: http://bugs.python.org/file23450
Deepak Dodo deepakd...@gmail.com added the comment:
The log file is also attached. This error is because the entire content of the
webpage has not been read.
--
Added file: http://bugs.python.org/file23451/error.log
___
Python tracker rep
Hi all,
I followed the tutorial but at page 4 I can't get rid of CSRF errors,
even though I followed everything in this page :
http://docs.djangoproject.com/en/dev/ref/contrib/csrf/
Any idea?
Dorian
--
http://mail.python.org/mailman/listinfo/python-list
Le 19/08/2010 20:40, Thomas Jollans a écrit :
On Thursday 19 August 2010, it occurred to Dodo to exclaim:
Hi all,
I followed the tutorial but at page 4 I can't get rid of CSRF errors,
even though I followed everything in this page :
http://docs.djangoproject.com/en/dev/ref/contrib/csrf/
what
Le 09/06/2010 20:37, rantingrick a écrit :
On Jun 9, 12:20 pm, Dodododo_do_not_wake...@yahoo.fr wrote:
Le 09/06/2010 18:54, rantingrick a crit :
On Jun 9, 11:26 am, Dodododo_do_not_wake...@yahoo.frwrote:
Hello,
I trying to make this piece of code work (this is python3)
from
Le 07/06/2010 15:26, Alf P. Steinbach a écrit :
* Dodo, on 07.06.2010 12:38:
Le 05/06/2010 19:07, Alf P. Steinbach a écrit :
* Dodo, on 05.06.2010 15:46:
Hi,
let's consider this exemple :
from tkinter import *
from tkinter.ttk import *
class First:
def __init__(self):
self.root = Tk()
B
Hello,
I trying to make this piece of code work (this is python3)
from tkinter import *
from tkinter.ttk import *
class Window:
def __init__(self):
self.root = Tk()
self.menu = Menu(self.root)
self.root['menu'] = self.menu
self.submenu = Menu(self.menu)
self.ck = 0
Le 09/06/2010 18:49, rantingrick a écrit :
On Jun 5, 8:46 am, Dodododo_do_not_wake...@yahoo.fr wrote:
Hi,
let's consider this exemple :
from tkinter import *
from tkinter.ttk import *
class First:
def __init__(self):
self.root = Tk()
B =
Le 09/06/2010 18:54, rantingrick a écrit :
On Jun 9, 11:26 am, Dodododo_do_not_wake...@yahoo.fr wrote:
Hello,
I trying to make this piece of code work (this is python3)
from tkinter import *
from tkinter.ttk import *
class Window:
def __init__(self):
self.root = Tk()
self.menu =
Le 09/06/2010 19:13, Dodo a écrit :
Le 09/06/2010 18:49, rantingrick a écrit :
On Jun 5, 8:46 am, Dodododo_do_not_wake...@yahoo.fr wrote:
Hi,
let's consider this exemple :
from tkinter import *
from tkinter.ttk import *
class First:
def __init__(self):
self.root = Tk()
B = Button(self.root
Le 05/06/2010 19:07, Alf P. Steinbach a écrit :
* Dodo, on 05.06.2010 15:46:
Hi,
let's consider this exemple :
from tkinter import *
from tkinter.ttk import *
class First:
def __init__(self):
self.root = Tk()
B = Button(self.root, command=self.op)
B.pack()
self.root.mainloop()
def op(self
Hi,
let's consider this exemple :
from tkinter import *
from tkinter.ttk import *
class First:
def __init__(self):
self.root = Tk()
B = Button(self.root, command=self.op)
B.pack()
self.root.mainloop()
Let's consider this code:
#!/usr/bin/python3
import cgi, sys
print(Content-type:image/jpeg\n\n)
f = open(img.jpg,rb)
sys.stdout.flush()
sys.stdout.buffer.write( f.read() )
f.close()
I receive the file with one padding byte at the start of the file (0x0a)
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
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
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'binary data' instead ofbinary data so the
browser can't read the image!!
f
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 29/04/2010 20:00, goldtech a écrit :
Hi,
Trying to start out with simple things but apparently there's some
basics I need help with. This works OK:
import re
p = re.compile('(ab*)(sss)')
m = p.match( 'absss' )
m.group(0)
'absss'
m.group(1)
'ab'
m.group(2)
'sss'
...
But two questions:
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
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
Help! this is driving me crazy lol
I want to print raw binary data to display an image file
BUT
python3 outputs b'binary data' instead of binary data so the
browser can't read the image!!
f = open(/some/path/%s % x, 'rb')
print(f.read())
any idea?
Dorian
--
Hi all,
Under python 2.6, chr() Return a string of one character whose ASCII
code is the integer i. (quoted from docs.python.org)
Under python 3.1, chr() Return the string of one character whose
Unicode codepoint is the integer i.
I want to convert a ASCII code back to a character under
Le 26/04/2010 22:26, Alf P. Steinbach a écrit :
On 26.04.2010 22:12, * Dodo:
Hi all,
Under python 2.6, chr() Return a string of one character whose ASCII
code is the integer i. (quoted from docs.python.org)
Under python 3.1, chr() Return the string of one character whose
Unicode codepoint
Hello,
I don't understand why this won't execute
import urllib.request as u
import socket
socket.setdefaulttimeout(10)
l = http://img144.imageshack.us/my.php?image=koumakandg8.jpg; #
supposed to timeout
try:
h = u.urlretrieve(l)
except u.URLError, e: # I tried u.e too, no effect.
Le 20/04/2010 13:06, MRAB a écrit :
Dodo wrote:
Hello,
I don't understand why this won't execute
import urllib.request as u
import socket
socket.setdefaulttimeout(10)
l = http://img144.imageshack.us/my.php?image=koumakandg8.jpg; #
supposed to timeout
try:
h = u.urlretrieve(l)
except
Here's a small script to generate again the error
running windows 7 with python 3.1
FILE : parseShift.py
import urllib.request as url
from html.parser import HTMLParser
class myParser(HTMLParser):
def handle_starttag(self, tag, attrs):
print(Start of %s tag : %s % (tag,
alright, it's just because of Windows cmd
in IDLE it works fine
any workaround?
Dorian
Le 13/04/2010 13:40, Dodo a écrit :
Here's a small script to generate again the error
running windows 7 with python 3.1
FILE : parseShift.py
import urllib.request as url
from html.parser import HTMLParser
28 matches
Mail list logo