Re: Tkinter: The good, the bad, and the ugly!

2011-01-21 Thread Michael Torrie
On 01/20/2011 11:17 AM, Emile van Sebille wrote: > The problem with QT is the license. PyQT indeed is licensed poorly for anything that's not GPL. But Qt itself is dual-licensed under GPL and the LGPL, as of version 4.6 I think. The LGPL license would seem to be quite acceptable even for commerc

Re: Best way to administer code updates to server daemon

2011-01-21 Thread Paul Rubin
Daniel da Silva writes: > I am writing a custom IRC server, and I was wondering would be the > best way to administer code updates to the daemon. Am I doomed to have > to restart the server every time I want to do an update (which would > disconnect all clients)? I don't mind doing something a lit

Re: HTSQL 2.0 RC1 -- a Query Language for the Accidental Programmer

2011-01-21 Thread rusi
On Jan 22, 2:45 am, "Clark C. Evans" wrote: > Kirill Simonov and myself would like to introduce HTSQL, a novel > approach to relational database access which is neither an ORM nor raw SQL. : > We're curious what you think. Thanks -- looks interesting. Given the claim htsql is higher level than s

Re: Krippendorff's alpha

2011-01-21 Thread OKB (not okblacke)
Steven D'Aprano wrote: > On Sat, 22 Jan 2011 01:48:01 +, OKB (not okblacke) wrote: > >> Does anyone know of a Python implementation of calculating >> Krippendorff's alpha? ( >> http://en.wikipedia.org/wiki/Krippendorff%27s_Alpha ) > > Google is your friend. Search for "Krippendorff's alpha

Re: Short circuting

2011-01-21 Thread Robert Kern
On 1/21/11 5:33 PM, Ed Connell wrote: Hi, Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.sea

Re: Short circuting

2011-01-21 Thread Tim Chase
On 01/21/2011 05:33 PM, Ed Connell wrote: Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.sear

Re: Krippendorff's alpha

2011-01-21 Thread Steven D'Aprano
On Sat, 22 Jan 2011 01:48:01 +, OKB (not okblacke) wrote: > Does anyone know of a Python implementation of calculating > Krippendorff's alpha? ( > http://en.wikipedia.org/wiki/Krippendorff%27s_Alpha ) Google is your friend. Search for "Krippendorff's alpha python" and the very first link ta

Re: Krippendorff's alpha

2011-01-21 Thread geremy condra
On Fri, Jan 21, 2011 at 5:48 PM, OKB (not okblacke) wrote: >        Does anyone know of a Python implementation of calculating > Krippendorff's alpha?  ( > http://en.wikipedia.org/wiki/Krippendorff%27s_Alpha ) First hit on google is [0], which has a full implementation, worked out example of how

Krippendorff's alpha

2011-01-21 Thread OKB (not okblacke)
Does anyone know of a Python implementation of calculating Krippendorff's alpha? ( http://en.wikipedia.org/wiki/Krippendorff%27s_Alpha ) Thanks, -- --OKB (not okblacke) Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail."

Re: Python, Solaris 10, and Mailman

2011-01-21 Thread Antoine Pitrou
On Fri, 21 Jan 2011 22:59:33 + "McNutt Jr, William R" wrote: > I am attempting to install Mailman on a Sun Sunfire x4100 box running Solaris > ten. I keep running into brick walls that the Mailman group looks at, shrugs, > and says, that's a Python problem. > > Has ANYBODY actually made thi

Re: Short circuting

2011-01-21 Thread Alexander Kapps
On 22.01.2011 01:10, Alexander Kapps wrote: On 22.01.2011 00:33, Ed Connell wrote: Hi, Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.search(line); result4 = re_dat

Re: Short circuting

2011-01-21 Thread Alexander Kapps
On 22.01.2011 00:33, Ed Connell wrote: Hi, Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.se

Re: PEP8, line continuations and string formatting operations

2011-01-21 Thread Carl Banks
On Jan 21, 11:53 am, Gerald Britton wrote: > Sowhat's the general feeling about this? Adhere to the PEP 8 > binary operators style, or modify it for string formatting? Well, personally I ignore the "operator at end of first line" guideline altogether; I think it's much more readable with the

Short circuting

2011-01-21 Thread Ed Connell
Hi, Consider the following please: (re_section, re_name, etc are previously compiled patterns) result1 = re_section.search(line); result2 = re_name.search(line); result3 = re_data1.search(line); result4 =

Re: Best way to administer code updates to server daemon

2011-01-21 Thread MRAB
On 21/01/2011 22:41, Daniel da Silva wrote: Hi, I am writing a custom IRC server, and I was wondering would be the best way to administer code updates to the daemon. Am I doomed to have to restart the server every time I want to do an update (which would disconnect all clients)? I don't mind doi

Python, Solaris 10, and Mailman

2011-01-21 Thread McNutt Jr, William R
I am attempting to install Mailman on a Sun Sunfire x4100 box running Solaris ten. I keep running into brick walls that the Mailman group looks at, shrugs, and says, that's a Python problem. Has ANYBODY actually made this work? Currently, I'm attempting to compile Python 2.4.4, which is the rec

Best way to administer code updates to server daemon

2011-01-21 Thread Daniel da Silva
Hi, I am writing a custom IRC server, and I was wondering would be the best way to administer code updates to the daemon. Am I doomed to have to restart the server every time I want to do an update (which would disconnect all clients)? I don't mind doing something a little more advanced if it mean

HTSQL 2.0 RC1 -- a Query Language for the Accidental Programmer

2011-01-21 Thread Clark C. Evans
Kirill Simonov and myself would like to introduce HTSQL, a novel approach to relational database access which is neither an ORM nor raw SQL. HTSQL is a URI-based high-level query language for relational databases. It's implemented as a Python WSGI application. Currently it supports PostgreSQL an

Re: examples of realistic multiprocessing usage?

2011-01-21 Thread Dan Stromberg
On Fri, Jan 21, 2011 at 12:57 PM, Philip Semanchuk wrote: > On Jan 21, 2011, at 3:36 PM, Dan Stromberg wrote: >> On Fri, Jan 21, 2011 at 3:20 AM, Adam Skutt wrote: >>> On Jan 20, 11:51 pm, Albert van der Horst >>> wrote: This is what some people want you to believe. Arm twisting by GPL

Re: is it a bug in exec?

2011-01-21 Thread long
I see now. Thank you so much. I think namespace is really a confusing part in Python. On Friday, January 21, 2011 11:00:32 AM UTC-6, Peter Otten wrote: > There are only two cases that matter: identical local/global namespaces and > distinct local/global namespaces: > > >>> code = """\ > ... x =

Re: Line breaks in list causing a small formatting problem while joining the list

2011-01-21 Thread GrayShark
On Fri, 21 Jan 2011 07:39:26 -0800, Oltmans wrote: > Hi Python gurus, hope you're doing well. I've a small problem. > > When I run the following code > ___ names = ['oltmans','abramhovic','\n','sal','lee'] print '| ' + ' | '.join(names) >

Re: examples of realistic multiprocessing usage?

2011-01-21 Thread Philip Semanchuk
On Jan 21, 2011, at 3:36 PM, Dan Stromberg wrote: > On Fri, Jan 21, 2011 at 3:20 AM, Adam Skutt wrote: >> On Jan 20, 11:51 pm, Albert van der Horst >> wrote: >>> This is what some people want you to believe. Arm twisting by >>> GPL-ers when you borrow their ideas? That is really unheard of. >>

Re: PEP8, line continuations and string formatting operations

2011-01-21 Thread Tim Chase
On 01/21/2011 01:53 PM, Gerald Britton wrote: What about string formatting operations (old style) though? The % symbols is a binary operator between a string and the substitution values. Strictly reading PEP 8 leads to: my_string = ("A long string with %s substitutions that %s the line should

Re: PEP8, line continuations and string formatting operations

2011-01-21 Thread Chris Rebert
On Fri, Jan 21, 2011 at 11:53 AM, Gerald Britton wrote: > Style question: > > PEP 8 suggests that line continuations be done by enclosing > expressions in parentheses rather than using the line continuation > character.  In the same paragraph, it states a preference to put > binary operators at th

Re: examples of realistic multiprocessing usage?

2011-01-21 Thread Dan Stromberg
On Fri, Jan 21, 2011 at 3:20 AM, Adam Skutt wrote: > On Jan 20, 11:51 pm, Albert van der Horst > wrote: >> This is what some people want you to believe. Arm twisting by >> GPL-ers when you borrow their ideas? That is really unheard of. > > Doesn't matter, you're still legally liable if your work

Re: Problems with FTP

2011-01-21 Thread RizlaJ
Thanks Giampaolo, Benjamin for your responses. You are correct, if I can connect to the ftp site from home and you can connect too then the problem (as you state) lies at the firewall or some security issue. Thanks for your detailed responses, they've been very helpful to me. Kind Regards -- http

Re: Problems with FTP

2011-01-21 Thread Giampaolo Rodolà
The standard FTP protocol does not supporty any kind of proxy-ing feature natively. The only closest thing to the concept of a "proxy" we can find in the FTP protocol is the site-to-site transfer feature: http://code.google.com/p/pyftpdlib/wiki/FAQ#What_is_FXP? ...but it's something different. By

Re: Problems with FTP

2011-01-21 Thread Benjamin Kaplan
On Fri, Jan 21, 2011 at 3:01 PM, RizlaJ wrote: > Hi Tom, Giampaolo, > > Thank you both for your swift replies. I have asked our IT dept to see > if it is the firewall that is blocking the FTP. They are working on > that side of things. > > However I would have thought that the following or some ve

Re: Problems with FTP

2011-01-21 Thread RizlaJ
Hi Tom, Giampaolo, Thank you both for your swift replies. I have asked our IT dept to see if it is the firewall that is blocking the FTP. They are working on that side of things. However I would have thought that the following or some version of it would have worked:- >>> import urllib >>> proxi

PEP8, line continuations and string formatting operations

2011-01-21 Thread Gerald Britton
Style question: PEP 8 suggests that line continuations be done by enclosing expressions in parentheses rather than using the line continuation character. In the same paragraph, it states a preference to put binary operators at the end of the line to be continued, so: x = (a + b) is prefe

Re: Problems with FTP

2011-01-21 Thread Giampaolo Rodolà
The solution proposed on stackoverflow: from ftplib import FTP site = FTP('my_proxy') site.set_debuglevel(1) msg = site.login('anonymous at ftp.download.com', 'password') site.cwd('/pub') ...can not work. The "anonymous at ftp.download.com" part is pure fiction. Nothing like that has ever been me

Re: Line breaks in list causing a small formatting problem while joining the list

2011-01-21 Thread MRAB
On 21/01/2011 16:25, Peter Otten wrote: Oltmans wrote: Hi Python gurus, hope you're doing well. I've a small problem. When I run the following code ___ names = ['oltmans','abramhovic','\n','sal','lee'] print '| ' + ' | '.join(names) | oltmans |

Re: Printing RTF file under win32

2011-01-21 Thread Michel Claveau - MVP
Hi! Try this line: "C:\Program Files\Windows NT\Accessories\wordpad.exe" /p D:\data\fil.rtf (change the path if you have a windows 64 bits) @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: difference between python and matlab

2011-01-21 Thread Andrea Ambu
On 20 January 2011 15:16, lakshmi wrote: > Is the programming related to image processing in python is advantageous or > else in MATLAB > Matlab comes with a lot of builtins for image processing, pattern recognition and many other engineering-related things. If it's just a quick hack and you're

Re: Printing RTF file under win32

2011-01-21 Thread Chris Rebert
On Fri, Jan 21, 2011 at 2:12 AM, Mark Carter wrote: > I'm using Python 2.6.5 on win32. I would like to print a batch of RTF > files on a printer. I don't want to use the win32api.ShellExecute > command because that invokes Word, and Word has been configured in a > strange way by one of our admins,

Re: Tkinter: The good, the bad, and the ugly!

2011-01-21 Thread rantingrick
On Jan 20, 8:34 pm, Neil Hodgson wrote: This is exactly what Aristotle meant when he said... """ Tolerance and Apathy are the last virtues of a dying society! """ Specifically no one here has the nerve to question/argue Guido when he offers such weak arguments like the "tag" argument. Can you

Re: difference between python and matlab

2011-01-21 Thread Thomas Jollans
On Thursday 20 January 2011, it occurred to lakshmi to exclaim: > Is the programming related to image processing in python is advantageous or > else in MATLAB Tell us what you want to do, and what you know about doing this in Python and in MATLAB, if possible, ask a specific question. Then, someb

Re: Problems with FTP

2011-01-21 Thread Thomas Jollans
On Friday 21 January 2011, it occurred to RizlaJ to exclaim: > Hi all, I'm very new to python. I'm using Python 2.7, in a corporate > environment, therefore am behind a proxy server, firewalls etc. > > I can ftp to a barclays capital ftp site ok in internet explorer, but > I can't get the FTP from

Re: is it a bug in exec?

2011-01-21 Thread Peter Otten
longqian9...@gmail.com wrote: > In pyhton 3.1, I found the following code will succeed with argument 1 > to 4 and fail with argument 5 to 9. It is really strange to me. I > suspect it may be a buy in exec() function. Does anyone have some idea > about it? Thanks. > > > t1=""" > class foo: > def

Re: getdefaultencoding - how to change this?

2011-01-21 Thread Robert Kern
On 1/21/11 5:43 AM, John Pinner wrote: On Jan 20, 4:46 pm, Robert Kern wrote: Instead, you want to use an encoding declaration in each file: http://docs.python.org/reference/lexical_analysis.html#encoding-decla... All that this does is tell the interpreter how the source file is encoded,

Re: Line breaks in list causing a small formatting problem while joining the list

2011-01-21 Thread Peter Otten
Oltmans wrote: > Hi Python gurus, hope you're doing well. I've a small problem. > > When I run the following code > ___ names = ['oltmans','abramhovic','\n','sal','lee'] print '| ' + ' | '.join(names) > | oltmans | abramhovic | > | sal |

Line breaks in list causing a small formatting problem while joining the list

2011-01-21 Thread Oltmans
Hi Python gurus, hope you're doing well. I've a small problem. When I run the following code ___ >>> names = ['oltmans','abramhovic','\n','sal','lee'] >>> print '| ' + ' | '.join(names) | oltmans | abramhovic | | sal | lee __

Re: is it a bug in exec?

2011-01-21 Thread long
Of cause your code runs well. But if you remove the "global foo" in main(), it will fail. And it will succeed again if you call exec(t1) directly. I think this behavior is strange. Even I pass a shadow copy of globals and locals to exec, it still fails. So perhaps there is a basic difference betwee

Re: Screen readers for Tkinter (was Re: Tkinter: The good, the bad, and the ugly!

2011-01-21 Thread Arndt Roger Schneider
Littlefield, Tyler schrieb: >And of course, it should also offer support for Windows, since most of the computer users use Windows, especially those who need accessibility features. uh. no, and no. Plenty of those utilizing screen readers are using macs nowadays, as well as vinux or some deri

Dealing with xml namespaces with ElementTree

2011-01-21 Thread Neil Cerutti
I have to parse many xml documents that senselessly(?) specify a single namespace for the whole document. After a couple of years, my approach has boiled down to the following three little helpers, for use with ElementTree: def insert_namespace(xpath): # Enable *simple* xpath searches by inser

Re: Need advices for mysqldb connection best practice

2011-01-21 Thread Romaric DEFAUX
Le 20/01/2011 18:58, Dennis Lee Bieber a écrit : On Thu, 20 Jan 2011 10:04:12 +0100, Romaric DEFAUX declaimed the following in gmane.comp.python.general: So , I thought about some solutions : - restarting the server every sometimes (but it's the worst solution in my mind) - creating a connecti

Problems with FTP

2011-01-21 Thread RizlaJ
Hi all, I'm very new to python. I'm using Python 2.7, in a corporate environment, therefore am behind a proxy server, firewalls etc. I can ftp to a barclays capital ftp site ok in internet explorer, but I can't get the FTP from ftplib to work for me. Can someone please help! I've tried the follow

Re: examples of realistic multiprocessing usage?

2011-01-21 Thread Adam Tauno Williams
On Fri, 2011-01-21 at 03:20 -0800, Adam Skutt wrote: > On Jan 20, 11:51 pm, Albert van der Horst > wrote: > > This is what some people want you to believe. Arm twisting by > > GPL-ers when you borrow their ideas? That is really unheard of. > Doesn't matter, you're still legally liable if your wor

Re: Namespaces

2011-01-21 Thread Michael Sparks
On Jan 21, 10:39 am, sl33k_ wrote: > What is namespace? And what is built-in namespace? tl;dr - Namespaces are sets that contain names. You can think of namespaces as being /like/ boxes. A namespace is therefore an organisational tool, forming a similar purpose to human names & surnames - to iden

Re: Namespaces

2011-01-21 Thread Dave Angel
On 01/-10/-28163 02:59 PM, sl33k_ wrote: What is namespace? And what is built-in namespace? A namespace is a mapping from names to objects. When you write a statement xyz = 42 the system looks up "xyz" in some namespace and associates that "variable" with the object int(42). The key i

Re: statement level resumable exception

2011-01-21 Thread Jon Clements
On Jan 21, 8:41 am, ilejn wrote: > Arnaud, > > it looks like a solution. > Perhaps it is better than plain try/accept and than proxy class with > __getattr__. > It is not for free, e.g. because syntax check such as parentheses > matching is lazy too, though looks > very interesting. > > Thanks a l

Re: getdefaultencoding - how to change this?

2011-01-21 Thread John Pinner
To answer the OP's original question: On Jan 20, 2:31 pm, Helmut Jarausch wrote: > Hi, > I've searched the net but didn't find the information I need. > Using Python-2.7.1, I know, I can't modify defaultencoding at run time. I think you can. There is a function setdefaultencoding in the sys modu

Re: Screen readers for Tkinter (was Re: Tkinter: The good, the bad, and the ugly!

2011-01-21 Thread Littlefield, Tyler
>And of course, it should also offer support for Windows, since most of the computer users use Windows, especially those who need accessibility features. uh. no, and no. Plenty of those utilizing screen readers are using macs nowadays, as well as vinux or some derivitave there of. -- Thanks,

Re: Namespaces

2011-01-21 Thread Alex Willmer
On Jan 21, 10:39 am, sl33k_ wrote: > What is namespace? And what is built-in namespace? A namespace is a container for names, like a directory is a container for files. Names are the labels we use to refer to python objects (e.g. int, bool, sys), and each Python object - particularly modules and

Re: getdefaultencoding - how to change this?

2011-01-21 Thread John Pinner
On Jan 20, 4:46 pm, Robert Kern wrote: > > Instead, you want to use an encoding declaration in each file: > > http://docs.python.org/reference/lexical_analysis.html#encoding-decla... All that this does is tell the interpreter how the source file is encoded, it does not affect default encodings

Re: examples of realistic multiprocessing usage?

2011-01-21 Thread Adam Skutt
On Jan 20, 11:51 pm, Albert van der Horst wrote: > This is what some people want you to believe. Arm twisting by > GPL-ers when you borrow their ideas? That is really unheard of. Doesn't matter, you're still legally liable if your work is found to be derivative and lacking a fair use defense. It

Namespaces

2011-01-21 Thread sl33k_
What is namespace? And what is built-in namespace? -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending changed parameters into nested generators

2011-01-21 Thread John O'Hagan
On Fri, 21 Jan 2011, cbrown wrote: > On Nov 12, 10:52 pm, "John O'Hagan" wrote: > > On Sat, 13 Nov 2010, Steven D'Aprano wrote: > > > On Fri, 12 Nov 2010 09:47:26 +, John O'Hagan wrote: > > > > I have a generator function which takes as arguments another > > > > generator and a dictionary of o

Printing RTF file under win32

2011-01-21 Thread Mark Carter
I'm using Python 2.6.5 on win32. I would like to print a batch of RTF files on a printer. I don't want to use the win32api.ShellExecute command because that invokes Word, and Word has been configured in a strange way by one of our admins, making it inconvenient to use. What should I do? -- http:/

Re: statement level resumable exception

2011-01-21 Thread ilejn
Arnaud, it looks like a solution. Perhaps it is better than plain try/accept and than proxy class with __getattr__. It is not for free, e.g. because syntax check such as parentheses matching is lazy too, though looks very interesting. Thanks a lot! On Jan 21, 10:41 am, Arnaud Delobelle wrote: >

Re: Part of RFC 822 ignored by email module

2011-01-21 Thread Tim Roberts
Bob Kline wrote: > >I just noticed that the following passage in RFC 822: For future interest, RFC 822 has LONG since been replaced, first by RFC 2822, then by RFC 5322. I believe the white space folding requirement is still there, but something that violates 822 but not 5322 (and there are seve

Re: is it a bug in exec?

2011-01-21 Thread Steven D'Aprano
On Thu, 20 Jan 2011 20:52:15 -0800, longqian9...@gmail.com wrote: > In pyhton 3.1, I found the following code will succeed with argument 1 > to 4 and fail with argument 5 to 9. It is really strange to me. I > suspect it may be a buy in exec() function. Does anyone have some idea > about it? Thanks

Re: Tkinter: The good, the bad, and the ugly!

2011-01-21 Thread Octavian Rasnita
From: "Adam Skutt" > Yet, for some unfathomable reason, you keep promoting I would be glad if you could tell me about a portable solution which is accessible with JAWS and Window Eyes, the most used screen readers under Windows (real glad). I did, Qt. I'm not yournanny and I'm not going to go

Re: __pycache__, one more good reason to stck with Python 2?

2011-01-21 Thread Steven D'Aprano
On Wed, 19 Jan 2011 14:31:15 -0800, Alice Bevan–McGregor wrote: > On 2011-01-19 13:01:04 -0800, Steven D'Aprano said: >> I know I've seen problems executing .pyc files from the shell in the >> past... perhaps I was conflating details of something else. Ah, I know! >> >> [steve@sylar ~]$ chmod u+x