html5lib

2011-03-04 Thread Christof
http://code.google.com/p/html5lib/downloads/list xhtml to html5 -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

PySide: Python for Qt 1.0 released!

2011-03-04 Thread Renato Araujo Oliveira Filho
Hi all, For those of you interested in writing Qt and QML software on Python: The PySide project has released PySide: Python for Qt version 1.0.0 after a long stabilization period. In addition to the source code release, project community packagers have already released binary packages for all

Re: debugging segfaults in pythen PyQt (QWebview)

2011-03-04 Thread Marco Bizzarri
This applies to debugging a spinning Zope server, but I think you can adapt the suggestions to your core dump: http://www.upfrontsystems.co.za/Members/jean/zope-notes/debug-spinning-zope Regards Marco On Thu, Mar 3, 2011 at 10:40 AM, Gelonida gelon...@gmail.com wrote: Hi, I have a QWebview

AW: Pure python standard library and License

2011-03-04 Thread Markus Schaber
Hi, Terry, Von: Terry Reedy Your interpretation seems reasonable, but only a paid lawyer (or ultimately a judge) can 'confirm' a legal interpretation. Sorry, we programmers generally hate the system. I also am a programmer, and not a lawyer. And our paid lawyer cannot look into the code (where

AW: Pure python standard library and License

2011-03-04 Thread Markus Schaber
Hi, First, sorry for sending an HTML message to the list, this was not intended. I now found out that http://docs.python.org/release/2.6.6/license.html does actually explain which part of the software is covered by which part of the license, but contains a different subset of licenses than the

Re: making a class callable

2011-03-04 Thread Tom Zych
dude wrote: f = foo(wow) ... However, I always get the module not callable error. ... That was the problem. I was using: import ohYeah To get that error, I think you must have been importing a module named foo as well. Or you would have gotten a NameError instead. -- Tom Zych /

Surf Traffic Exchange

2011-03-04 Thread Raja
http://www.surftrafficexchange.com/?refid=5979 -- http://mail.python.org/mailman/listinfo/python-list

Big Cash

2011-03-04 Thread Raja
http://bigcash.zipnadazilch.com/index.php?referral=87081 -- http://mail.python.org/mailman/listinfo/python-list

Big Extra Cash

2011-03-04 Thread Raja
http://www.bigextracash.com/aft/3e8b26c3.html -- http://mail.python.org/mailman/listinfo/python-list

Best Online Currency Trading

2011-03-04 Thread Raja
http://www.etoro.com/B520_A26094_TClick.aspx -- http://mail.python.org/mailman/listinfo/python-list

Re: question about endswith()

2011-03-04 Thread Tom Zych
Ethan Furman wrote: What is extensions? A string or a tuple? I'm guessing a string, because then you're looking at: -- filename.endswith(x) for x in 'hdf5' which is the same as -- filename.endswith('h') or filename.endswith('d') or filename.endswith('f') or filename.endswith('5')

Re: question about endswith()

2011-03-04 Thread Jean-Michel Pichavant
Matt Funk wrote: Hi Grant, first of all sorry for the many typos in my previous email. To clarify, I have a python list full of file names called 'files'. Every single filename has extension='.hdf' except for one file which has an '.hdf5' extension. When i do (and yes, this is pasted):

Re: auto increment

2011-03-04 Thread monkeys paw
On 3/4/2011 12:07 AM, Chris Rebert wrote: On Thu, Mar 3, 2011 at 9:05 PM, Dan Strombergdrsali...@gmail.com wrote: On Thu, Mar 3, 2011 at 8:48 PM, Chris Rebertc...@rebertia.com wrote: On Thu, Mar 3, 2011 at 8:41 PM, monkeys pawmon...@joemoney.net wrote: Does python have an analogy to c/perl

Re: Problem with python 3.2 and circular imports

2011-03-04 Thread Frank Millman
On February 28 2011 Rafael Durán Castañeda wrote I'm stil totally stuck with relative imports, i' ve tried the example tree from PEP 328 without any result: package/ __init__.py subpackage1/ __init__.py moduleX.py moduleY.py subpackage2/ __init__.py

Fun with 'str' and 'bytes'

2011-03-04 Thread Frank Millman
Hi all I want to create a cookie containing a session id. In python 2.6 I had the following - from __future__ import unicode_literals session_id = b64encode(urandom(20)) response_headers.append( (b'Set-Cookie', b'sid={0}'.format(session_id))) After upgrading to 3.2, the above lines

learn the network program of python

2011-03-04 Thread loopzhong001
Dear All, Would anyone tell me haow to start? loopzhong -- http://mail.python.org/mailman/listinfo/python-list

Re: Need an example program that implements rpm -pql via import rpm

2011-03-04 Thread Steven W. Orr
On 3/3/2011 11:11 PM, geremy condra wrote: On Thu, Mar 3, 2011 at 7:24 PM, Steven W. Orrste...@syslang.net wrote: I look everywhere but I couldn't find anything. Could someone please point me to a small example program that does an import rpm, takes an rpm file as an argument and gets the list

Examples of Programming with PyUSB 1.0?

2011-03-04 Thread Aldo Ceccarelli
Hello All, I will need to write a manager for acquiring barcodes from a USB reader with PyUSB 1.0 http://pyusb.sourceforge.net on libusb http://www.libusb.org/ but unfortunately I have no USB protocol background at the moment. Is there any PyUSB 1.0 reporistory of examples to learn? Thank you

Re: Examples of Programming with PyUSB 1.0?

2011-03-04 Thread Aldo Ceccarelli
On 4 Mar, 14:54, Aldo Ceccarelli ceccarelli.a...@gmail.com wrote: Hello All, I will need to write a manager for acquiring barcodes from a USB reader with PyUSB 1.0  http://pyusb.sourceforge.neton libusbhttp://www.libusb.org/ but unfortunately I have no USB protocol background at the moment.

Re: python simplejson decoding

2011-03-04 Thread Arthur Mc Coy
Good day people, So I have python file which can handle json data to put and get back it from a file say objects.json. Great. Now I want to run this code from within C++ application. I used swig to wrap the C++ class, which wants to call python code. It works fine, because when I import native

Re: question about endswith()

2011-03-04 Thread HMX962b
On 03/03/11 23:39, Matt Funk wrote: Hi, i have a list of files, some of which end with .hdf and one of them end with hdf5. I want to filter the hdf5 file. Thereforei set extensions: hdf5 I try to filter as below: if (any(filename.endswith(x) for x in extensions)): The problem is that i

Re: learn the network program of python

2011-03-04 Thread Noah Hall
On Fri, Mar 4, 2011 at 12:47 PM, loopzhong001 loopzhong...@126.com wrote: Dear All,     Would anyone tell me haow to start? Well, to start on this mailing list - 1) Name the networking framework/modules you want to use (if you have one, else say can someone suggest a networking

Re: auto increment

2011-03-04 Thread BartC
Chris Rebert c...@rebertia.com wrote in message news:mailman.596.1299215244.1189.python-l...@python.org... On Thu, Mar 3, 2011 at 9:05 PM, Dan Stromberg drsali...@gmail.com wrote: On Thu, Mar 3, 2011 at 8:48 PM, Chris Rebert c...@rebertia.com wrote: On Thu, Mar 3, 2011 at 8:41 PM, monkeys

Re: Need an example program that implements rpm -pql via import rpm

2011-03-04 Thread Daniel Mahoney
On Thu, 03 Mar 2011 22:24:24 -0500, Steven W. Orr wrote: I look everywhere but I couldn't find anything. Could someone please point me to a small example program that does an import rpm, takes an rpm file as an argument and gets the list of files contained in the file, the same as if I had

Re: Need an example program that implements rpm -pql via import rpm

2011-03-04 Thread Amelia
On Fri, 04 Mar 2011 09:24:26 -0600, Daniel Mahoney wrote: On Thu, 03 Mar 2011 22:24:24 -0500, Steven W. Orr wrote: I look everywhere but I couldn't find anything. Could someone please point me to a small example program that does an import rpm, takes an rpm file as an argument and gets the

Re: debugging segfaults in pythen PyQt (QWebview)

2011-03-04 Thread Hans-Peter Jansen
On Thursday 03 March 2011, 10:40:20 Gelonida wrote: Hi, I have a QWebview application, which segfaults rather often, but not all the time. I assume it is some kind of race condition when loading a certain web page with quite some built in AJax. [...] The application crashes under Windows

Re: Communicating from Flash to Python

2011-03-04 Thread Victor Subervi
On Fri, Mar 4, 2011 at 2:57 AM, Godson Gera godso...@gmail.com wrote: You can use PyAMF http://pyamf.org Thanks! Beno -- http://mail.python.org/mailman/listinfo/python-list

Re: Need an example program that implements rpm -pql via import rpm

2011-03-04 Thread Steven W. Orr
On 3/4/2011 10:24 AM, Daniel Mahoney wrote: On Thu, 03 Mar 2011 22:24:24 -0500, Steven W. Orr wrote: I look everywhere but I couldn't find anything. Could someone please point me to a small example program that does an import rpm, takes an rpm file as an argument and gets the list of files

Re: question about endswith()

2011-03-04 Thread Matt Funk
Hi, thanks guys. This is it. The following code will match both hdf and hdf5 for reasons explained in the email from Ethan. extensions = 'hdf5' #doesn't work files =

import python module from C++ code

2011-03-04 Thread Arthur Mc Coy
Hi all, I have a C++ application. I have a .cpp file which is not a main program, but a class where I want to call python script (doSomething.py file). I'm using embed python like in a tutorial here: http://www.codeproject.com/KB/cpp/embedpython_1.aspx But the tutorial is bad. It does not

Re: Fun with 'str' and 'bytes'

2011-03-04 Thread nn
On Mar 4, 7:32 am, Frank Millman fr...@chagford.com wrote: Hi all I want to create a cookie containing a session id. In python 2.6 I had the following - from __future__ import unicode_literals session_id = b64encode(urandom(20)) response_headers.append(     (b'Set-Cookie',

Re: import python module from C++ code

2011-03-04 Thread Santoso Wijaya
Have you read the doc [1] on extending/embedding Python? ~/santa [1] http://docs.python.org/extending/ On Fri, Mar 4, 2011 at 8:27 AM, Arthur Mc Coy 1984docmc...@gmail.comwrote: Hi all, I have a C++ application. I have a .cpp file which is not a main program, but a class where I want to

python xmp toolkit question

2011-03-04 Thread jyoung79
Is anyone here using the Python XMP Toolkit? I'm trying to install this and having problems. First, I tried installing Exempi. The website says to do the following: ./configure make sudo make install but for Mac OS X they say to do one of these (I'm installing it on Leopard and hopefully

Re: import python module from C++ code

2011-03-04 Thread Arthur Mc Coy
Yes, I did. Here the link http://docs.python.org/extending/extending.html#providing-a-c-api-for-an-extension-module It does not cover .py file embeding. So it is not my case. On Fri, Mar 4, 2011 at 7:03 PM, Santoso Wijaya santoso.wij...@gmail.comwrote: Have you read the doc [1] on

Re: import python module from C++ code

2011-03-04 Thread Arthur Mc Coy
The problem is how to write python module under SWIG for C++ application Nor SWIG documentation neither embeding python documentation does not answer to this. If you can help, please, share your idea. Arthur -- http://mail.python.org/mailman/listinfo/python-list

Re: import python module from C++ code

2011-03-04 Thread Santoso Wijaya
Extending an embedded Python is not that much different than extending Python proper. There's even this section [1] in that documentation, conveniently titled, Extending Embedded Python. ~/santa [1] http://docs.python.org/extending/embedding.html#extending-embedded-python On Fri, Mar 4, 2011 at

What is the best book to learn Python from Perl and C++ background

2011-03-04 Thread Ignoramus20691
I bought a Hello World! book for my 9 year old son. The book teached programming for kids and it does it in Python. I do not know any Python, but I am very comfortable with C++ and perl. I wrote a little over 100k lines of perl. I want to learn Python quickly to help him with his studies/fun.

Re: import python module from C++ code

2011-03-04 Thread Arthur Mc Coy
Using simple words: I have mymodule.py file and c++ application. mymodule.py file contains two classes A and B. A class is a custom data type. B class contains functions putJSON, getJSON which I want to run from within C++ code. These functions are members of class B. So I need to import

Re: question about endswith()

2011-03-04 Thread Mauro Caceres
if you could define extension to be a tuple, you could use it this way, which is a little simpler: extensions = ('hdf5',) #works files = ('MOD03.A2010002.1810.005.2010258062733.hdf','MOD03.A2010002.1950.005.2010258063105.hdf','MOD03.A2010002.1950.005.2010258063105.hdf5') for filename in files:

Re: python xmp toolkit question

2011-03-04 Thread Ned Deily
In article 20110304161955.LI5T1.94538.root@cdptpa-web16-z02, jyoun...@kc.rr.com wrote: Is anyone here using the Python XMP Toolkit? I'm trying to install this and having problems. First, I tried installing Exempi. The website says to do the following: ./configure make sudo make

getting text out of an xml string

2011-03-04 Thread JT
Yo, So I have almost convinced a small program to do what I want it to do. One thing remains (at least, one thing I know of at the moment): I am converting xml to some other format, and there are strings in the xml like this. The python: elif v == content: print content,

Re: What is the best book to learn Python from Perl and C++ background

2011-03-04 Thread nn
On Mar 4, 12:49 pm, Ignoramus20691 ignoramus20...@NOSPAM. 20691.invalid wrote: I bought a Hello World! book for my 9 year old son. The book teached programming for kids and it does it in Python. I do not know any Python, but I am very comfortable with C++ and perl. I wrote a little over 100k

What do I need to know in order to write a web application in python?

2011-03-04 Thread ErichCart ErichCart
I am currently a Computer Science student, I can write in pascal, C, and Java, and recently I learned about Python and fell in love with it. I watched some python programming tutorials on youtube, and now I can write some programs. But what I really want to do is to make a website where people can

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Santoso Wijaya
First, learn the language. Second, browse a multitude of popular web frameworks written in Python, and try your hands on a few of them. I'd suggest looking into django, pyramid, webpy, ... (others will fill in). ~/santa On Fri, Mar 4, 2011 at 12:08 PM, ErichCart ErichCart

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Corey Richardson
On 03/04/2011 03:08 PM, ErichCart ErichCart wrote: I am currently a Computer Science student, I can write in pascal, C, and Java, and recently I learned about Python and fell in love with it. I watched some python programming tutorials on youtube, and now I can write some programs. But what I

Re: getting text out of an xml string

2011-03-04 Thread John Machin
On Mar 5, 6:53 am, JT jeff.temp...@gmail.com wrote: Yo,  So I have almost convinced a small program to do what I want it to do.  One thing remains (at least, one thing I know of at the moment): I am converting xml to some other format, and there are strings in the xml like this. The

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread ErichCart ErichCart
It is just that I want to better my python skills by doing this. I have heard about Django, can't this be done with Django? -- http://mail.python.org/mailman/listinfo/python-list

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Santoso Wijaya
Django is excellent as a CMS builder (think blogs, articles websites), though it has many uses beyond that, as well. If, ultimately, you want client-side interactivity, however, you'd have to look into (perhaps in addition to Python--it can provide some of the backend logic for the website you

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Corey Richardson
On 03/04/2011 03:34 PM, ErichCart ErichCart wrote: It is just that I want to better my python skills by doing this. I have heard about Django, can't this be done with Django? As you described it? Absolutely not [1]. When thinking of Django, think more of Ruby on Rails or something vaguely

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread John Gordon
In 67a0332e-aa25-4bc6-a0b5-0f68f597b...@y14g2000vbb.googlegroups.com ErichCart ErichCart erichc...@gmail.com writes: It is just that I want to better my python skills by doing this. I have heard about Django, can't this be done with Django? Django does help with web content, but it doesn't

Re: having both dynamic and static variables

2011-03-04 Thread BartC
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote in message news:4d6f26a5$0$30003$c3e8da3$54964...@news.astraweb.com... On Wed, 02 Mar 2011 19:45:16 -0800, Yingjie Lan wrote: Hi everyone, Variables in Python are resolved dynamically at runtime, which comes at a performance cost.

Re: having both dynamic and static variables

2011-03-04 Thread Santoso Wijaya
Declaring the *type* of such variables is a different matter I think (and probably is not considered 'pythonic'; certainly it's a crude, if effective, way of getting extra performance). I concur. Especially given performance is not a primary goal of Python to begin with, and--if such a

Re: how to read the last line of a huge file???

2011-03-04 Thread tkp...@hotmail.com
I've implementing this method of reading a file from the end, i.e def seeker(filename): offset = -10 with open(filename) as f: while True: f.seek(offset, os.SEEK_END) lines = f.readlines() if len(lines) = 2: return lines[-1]

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread ErichCart ErichCart
By real-time, I mean that I want it to be similar to the way instant online chess works. Something like here: instantchess.com, but for RISK. I thought about making such an application, and now that I want to practice python I thought that perhaps it can be done with python. Now after your

Re: import python module from C++ code

2011-03-04 Thread Arthur Mc Coy
Still need the answer to the question: howto embed given python file (which contains python class and its members) into the c++ application ? I have to pass the arguments from c++ to python and back so I need to do conversions. They are ok. Fails PyImport_Import(my_module) call saying No module

Re: getting text out of an xml string

2011-03-04 Thread JT
On Mar 4, 9:30 pm, John Machin sjmac...@lexicon.net wrote: Your data has been FUABARred (the first A being for Almost) -- the \u3c00 and \u3e00 were once and respectively. You will Hi John, I realized that a few minutes after posting. I then realized that I could just extract the text

Re: What is the best book to learn Python from Perl and C++ background

2011-03-04 Thread geezah
check the link below. (you can read online or get a pdf) http://www.swaroopch.com/notes/Python -- http://mail.python.org/mailman/listinfo/python-list

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Santoso Wijaya
GUI application is a whole other matter entirely. For that, you might want to look into cross-platform GUI toolkits with Python bindings. E.g., PyQT [1], wxPython [2], TkInter [3], etc. Python, after all, is just a cross-platform language. To do all those user-friendly bells and whistles, you'd

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Corey Richardson
On 03/04/2011 04:48 PM, ErichCart ErichCart wrote: In fact this doesn't necessary need to be web application. For example I have a friend who uses Delphi, and he can create all sorts of windows applications easily, like he can see the window on the screen and he can place buttons, text fields,

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread John Gordon
In 1b0d04db-c45d-481d-b19e-03ba2d2a5...@p16g2000vbo.googlegroups.com ErichCart ErichCart erichc...@gmail.com writes: By real-time, I mean that I want it to be similar to the way instant online chess works. Something like here: instantchess.com, but for RISK. That site appears to require a

Numerical representation

2011-03-04 Thread Jon Herman
Hello all, I am new to the Python language and writing a Runge-Kutta-Fellberg 7(8) integrator in Python, which requires an extreme numerical precision for my particular application. Unfortunately, I can not seem to attain it. The interesting part is if I take my exact code and translate it to

Re: Numerical representation

2011-03-04 Thread Santoso Wijaya
Have you taken a look at numpy? [1] It was written for exactly this kind of usage. ~/santa [1] http://numpy.scipy.org/ On Fri, Mar 4, 2011 at 2:32 PM, Jon Herman jfc.her...@gmail.com wrote: Hello all, I am new to the Python language and writing a Runge-Kutta-Fellberg 7(8) integrator in

Re: Numerical representation

2011-03-04 Thread Robert Kern
On 3/4/11 5:49 PM, Santoso Wijaya wrote: Have you taken a look at numpy? [1] It was written for exactly this kind of usage. ~/santa [1] http://numpy.scipy.org/ While numpy does provide arrays much like MATLAB's, it won't help at all for the precision issues the OP is encountering (and

Re: Numerical representation

2011-03-04 Thread Robert Kern
On 3/4/11 4:32 PM, Jon Herman wrote: Hello all, I am new to the Python language and writing a Runge-Kutta-Fellberg 7(8) integrator in Python, which requires an extreme numerical precision for my particular application. Unfortunately, I can not seem to attain it. The interesting part is if I

Re: how to read the last line of a huge file???

2011-03-04 Thread MRAB
On 04/03/2011 21:46, tkp...@hotmail.com wrote: I've implementing this method of reading a file from the end, i.e def seeker(filename): offset = -10 with open(filename) as f: while True: f.seek(offset, os.SEEK_END) lines = f.readlines()

Re: how to read the last line of a huge file???

2011-03-04 Thread Ian Kelly
On Fri, Mar 4, 2011 at 5:26 PM, MRAB pyt...@mrabarnett.plus.com wrote: UnsupportedOperation: can't do non-zero end-relative seeks But offset is initialized to -10. Does anyone have any thoughts on what the error might be caused by? I think it's because the file has been opened in text mode,

Re: Numerical representation

2011-03-04 Thread Jon Herman
Actually, I import numpy in my code for array creation...in the documentation I did not manage to find anything that would solve this precision problem I mentioned however. If you're familiar with it, would you happen to know what capability of numpy might solve my problem? On Fri, Mar 4, 2011

my computer is allergic to pickles

2011-03-04 Thread Bob Fnord
I'm using python to do some log file analysis and I need to store on disk a very large dict with tuples of strings as keys and lists of strings and numbers as values. I started by using cPickle to save the instance of the class that contained this dict, but the pickling process started to write

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Paul Rubin
ErichCart ErichCart erichc...@gmail.com writes: By real-time, I mean that I want it to be similar to the way instant online chess works. Something like here: instantchess.com, but for RISK. If you want to do that in a web browser, the main technique for it is called AJAX and you'd write your

Re: my computer is allergic to pickles

2011-03-04 Thread MRAB
On 05/03/2011 01:56, Bob Fnord wrote: I'm using python to do some log file analysis and I need to store on disk a very large dict with tuples of strings as keys and lists of strings and numbers as values. I started by using cPickle to save the instance of the class that contained this dict, but

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread Grumman
On 3/4/2011 16:48, ErichCart ErichCart wrote: In fact this doesn't necessary need to be web application. For example I have a friend who uses Delphi, and he can create all sorts of windows applications easily, like he can see the window on the screen and he can place buttons, text fields, radio

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread CM
On Mar 4, 5:07 pm, Corey Richardson kb1...@aim.com wrote: On 03/04/2011 04:48 PM, ErichCart ErichCart wrote: In fact this doesn't necessary need to be web application. For example I have a friend who uses Delphi, and he can create all sorts of windows applications easily, like he can see

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread CM
On Mar 4, 5:07 pm, Corey Richardson kb1...@aim.com wrote: On 03/04/2011 04:48 PM, ErichCart ErichCart wrote: In fact this doesn't necessary need to be web application. For example I have a friend who uses Delphi, and he can create all sorts of windows applications easily, like he can see

Re: What do I need to know in order to write a web application in python?

2011-03-04 Thread CM
On Mar 4, 5:07 pm, Corey Richardson kb1...@aim.com wrote: On 03/04/2011 04:48 PM, ErichCart ErichCart wrote: In fact this doesn't necessary need to be web application. For example I have a friend who uses Delphi, and he can create all sorts of windows applications easily, like he can see

Re: my computer is allergic to pickles

2011-03-04 Thread GSO
On 5 March 2011 02:14, MRAB pyt...@mrabarnett.plus.com wrote: ... Any comments, suggestions? You obviously can't feed your computer pickles then. How about a tasty tidbit of XML? Served up in a main dish of DOM, or serially if preferred? -- http://mail.python.org/mailman/listinfo/python-list

Want to free hosting.

2011-03-04 Thread Rat Olivier
Hey Want to free hosting... This is for very short time. Visithttp://www.balticwebhost.com/aff.php?aff=001 -- http://mail.python.org/mailman/listinfo/python-list

questions about multiprocessing

2011-03-04 Thread Vincent Ren
Hello, everyone, recently I am trying to learn python's multiprocessing, but I got confused as a beginner. If I run the code below: from multiprocessing import Pool import urllib2 otasks = [ 'http://www.php.net' 'http://www.python.org' 'http://www.perl.org'

Re: questions about multiprocessing

2011-03-04 Thread Philip Semanchuk
On Mar 4, 2011, at 11:08 PM, Vincent Ren wrote: Hello, everyone, recently I am trying to learn python's multiprocessing, but I got confused as a beginner. If I run the code below: from multiprocessing import Pool import urllib2 otasks = [ 'http://www.php.net'

Re: questions about multiprocessing

2011-03-04 Thread Miki Tebeka
otasks = [ ... print pool.map(f, tasks) You are running the maps on tasks while the list of URLs is called otasks (unless there's any error in the cutpaste). HTH, -- Miki -- http://mail.python.org/mailman/listinfo/python-list

Re: my computer is allergic to pickles

2011-03-04 Thread Miki Tebeka
I'm using python to do some log file analysis and I need to store on disk a very large dict with tuples of strings as keys and lists of strings and numbers as values. I recommend that you'll use the shelve module. It stores data on disk and is more memory efficient than in-memory pickle

Generate PDF with Tamil font problem

2011-03-04 Thread satheesh
Hi All, I am using python's reportlab to print some unicode Tamil characters '#2986;#3015;'. I added necessary unicode font to reportlab. But It prints the output as '#3015;#2986;' (in reverse order). This issue happens for multi-byte characters, whereas for character '#2986;' is printed as it

ImSim: Image Similarity

2011-03-04 Thread n00m
Let me present my newborn project (in Python) ImSim: http://sourceforge.net/projects/imsim/ Its README.txt: - ImSim is a python script for finding the most similar pic(s) to a given one among a set/list/db of your pics. The

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Likewise, this fails with 3.2:: import os os.write(1, ba * 66000) -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11395

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11395 ___ ___

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: It's probably a Windows limitation regarding the number of bytes that can be written to stdout in one write. As for the difference between python versions, what does python -c import sys; print(sys.getsizeof('a')) return ? --

[issue11373] Fix 2 new typos in the docs

2011-03-04 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Please fix the word Builtin to Built-in as well. Thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11373 ___

[issue11373] Fix 2 new typos in the docs

2011-03-04 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11373 ___ ___ Python-bugs-list

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: no, it works with 3.2b2 (r32b2:87398), and fails with 3.2 final (r32:88445) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11395

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Extract of issue #1602: WriteConsoleW has one bug that I know of, which is that it a href=http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1232;fails when writing more than 26608 characters at once/a. That's easy to work around by

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Extract of the WriteConsole Function: The storage for this buffer is allocated from a shared heap for the process that is 64 KB in size. The maximum size of the buffer will depend on heap usage.

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This changed with r87824 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11395 ___ ___

[issue11388] Implement MutableSequence.clear()

2011-03-04 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Please also update the table entry for MutableSequence in Doc/library/collections.abc.rst -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11388

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This changed with r87824 Yes, I changed Python to open all files in binary mode. With Python 3.2, you can open sys.std* streams in binary mode using -u command line option (u like unbuffered, not Unicode ;-)). --

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Indeed, Python3.1 fails with the -u option. Before r87824, the C call to write() performed CRLF conversion. In the implementation of MSVCRT, a local buffer is used (1025 chars in vs8.0, 5*1024 in vs10.0), so WriteFile is called with

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Anyway, use os.write() to write unicode into the Windows console is not the right thing to do. We should use WriteConsoleW(): #1602 is the correct fix for this issue. -- ___ Python

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I'm writing bytes here: os.write(1, bb * 66000) And WriteConsole has the same issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11395

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: And WriteConsole has the same issue. print() (sys.stdout and sys.stderr) should use WriteConsoleW() and use small chunks (smaller than 64 KB, I don't know the safest size). -- ___

[issue11388] Implement MutableSequence.clear()

2011-03-04 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Documentation fix and some unit tests committed in revision 88742 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11388 ___

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: IIUC, this is a Windows bug? Is there any easy workaround for us? -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11395

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It may be a windows bug, but it's also an a python regression! A fix is to limit the number of chars: === --- D:/py3k/Modules/_io/fileio.c (revision 87824) +++

  1   2   >