PyPI - how do you pronounce it?

2012-01-27 Thread Chris Angelico
Hopefully this will be a step up from Rick's threads in usefulness, but I'm aware it's not of particularly great value! How do you pronounce PyPI? Is it: * Pie-Pie? * Pie-Pip, but without the last p? (same as above but short i) * Pie-Pea-Eye? * Something else? I've been saying Pie-Pea-Eye myself,

what is the unicode?

2012-01-27 Thread contro opinion
as far as i know >>> u'中国'.encode('utf-8') '\xe4\xb8\xad\xe5\x9b\xbd' so,'\xe4\xb8\xad\xe5\x9b\xbd' is the utf-8 of '中国' >>> u'中国'.encode('gbk') '\xd6\xd0\xb9\xfa' so,'\xd6\xd0\xb9\xfa' is the utf-8 of '中国' >>> u'中国' u'\u4e2d\u56fd' what is the meaning of u'\u4e2d\u56fd'? u'\u4e2d\u56fd

Re: Re: How do I call super() in c extention ?

2012-01-27 Thread YASUDA Hideyuki
> Have you considered using Cython for this? No. I hadn't known Cython. Now, I'll try to use Cython. thanks. umedoblock (-28163年01月-9日 04:59), Stefan Behnel wrote: umedoblock, 27.01.2012 03:03: I'd like to call super() in c extension. I'd like to rewrite class Baa as c extension. Have you

to express unicode string

2012-01-27 Thread contro opinion
>>> s='你好' >>> t=u'你好' >>> s '\xc4\xe3\xba\xc3' >>> t u'\u4f60\u597d' >>> t=us Traceback (most recent call last): File "", line 1, in NameError: name 'us' is not defined >>> how can i use us to express u'你好'?? can i add someting in us to express u'你好'?? -- http://mail.python.org/mailman/l

Re: Where to put data

2012-01-27 Thread bvdp
On Friday, January 27, 2012 3:15:44 PM UTC-7, John Nagle wrote: > On 1/25/2012 9:26 AM, bvdp wrote: > > I'm having a disagreement with a buddy on the packaging of a program > > we're doing in Python. It's got a number of modules and large number > > of library files. The library stuff is data, not

Re: Where to put data

2012-01-27 Thread bvdp
On Thursday, January 26, 2012 8:20:24 PM UTC-7, Michael Torrie wrote: > > > I'm getting mangled by the debian maintainers and friends who seem to > > believe that python modules need to go into /usr/lib/python... > > I guess the maintainers aren't distinguishing between python apps and > their sub

Re: calling a simple PyQt application more than once

2012-01-27 Thread John Posner
Jabba Laci wrote: > Hi, > > I have a simple PyQt application that creates a webkit instance to > scrape AJAX web pages. It works well but I can't call it twice. I > think the application is not closed correctly, that's why the 2nd call > fails. Here is the code below. I also put it on pastebin: > h

Patching CGIHTTPServer.py

2012-01-27 Thread Giovanni Funchal
Hi everyone, I was fiddling around with CGIHTTPServer.py --- a very handy module for quickly setting up a full HTTP server with CGI support --- when I noticed that it doesn't support responses other than "200 OK". So, for instance if your page wants to do a redirect (response 303), it just isn't s

Re: Where to put data

2012-01-27 Thread John Nagle
On 1/25/2012 9:26 AM, bvdp wrote: I'm having a disagreement with a buddy on the packaging of a program we're doing in Python. It's got a number of modules and large number of library files. The library stuff is data, not code. How much data? Megabytes? Gigabytes? I have some modules w

Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

2012-01-27 Thread Jon Clements
On Jan 27, 6:38 am, Nathan Rice wrote: > > May I suggest a look at languages such as ATS and Epigram? They use > > types that constrain values specifically to prove things about your > > program. Haskell is a step, but as far as proving goes, it's less > > powerful than it could be. ATS allows you

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-27 Thread Steven D'Aprano
On Fri, 27 Jan 2012 09:06:57 -0800, Emile van Sebille wrote: > On 1/25/2012 9:14 PM Steven D'Aprano said... >> In the >> same way that a native English speaker would never make the mistake of >> using "organ" to refer to an unnamed mechanical device, so she would >> never use "gadget" to refer to

runtime error

2012-01-27 Thread nikos spanakis
Hi I just  minstalled python 3.1 on my windons XP SP3 but on the start up I get the following error message: Fatal Python error: Py_Initialize: can't initialize sys standard streams ImportError: No module named encodings.utf_8 This application has requested the Runtime to terminate it in an

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-27 Thread Emile van Sebille
On 1/25/2012 9:14 PM Steven D'Aprano said... In the same way that a native English speaker would never make the mistake of using "organ" to refer to an unnamed mechanical device, so she would never use "gadget" to refer to an unnamed body part. My wife introduced me to the term "picnic gadget"

Re: problems with tkinter updates

2012-01-27 Thread yves
On 2012-01-24 02:52, Peter Otten wrote: Have update() (renamed to read_more() in my code) do the reading: import sys import tkinter import tkinter.scrolledtext root = tkinter.Tk() text_window = tkinter.Toplevel() text = tkinter.scrolledtext.ScrolledText(text_window) text.pack() infile = open