Decorator Pattern with Iterator

2012-06-11 Thread Tom Harris
Greetings, I have a class that implements the iterator protocol, and tokenises a string into a series of tokens. As well as the token, it keeps track of some information such as line number, source file, etc. for tokens in Tokeniser(): do_stuff(token) What I want is to be able to wrap the toke

Re: Why does this leak memory?

2012-06-11 Thread Ulrich Eckhardt
Am 08.06.2012 18:02, schrieb Steve: > Well, I guess I was confused by the terminology. I thought there were > leaked objects _after_ a garbage collection had been run (as it said > "collecting generation 2"). Also, "unreachable" actually appears to mean > "unreferenced". You live n learn... Actual

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread 88888 Dihedral
Yesterday Paid於 2012年6月10日星期日UTC+8上午6時44分44秒寫道: > I'm planning to learn one more language with my python. > Someone recommended to do Lisp or Clojure, but I don't think it's a > good idea(do you?) > So, I consider C# with ironpython or Java with Jython. > It's a hard choice...I like Visual studio(b

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Wolfgang Keller
> > What "GUI designer" would come the closest to the way that Cocoa's > > Interface Builder works? I.e. is there any one (cross-platform) that > > allows to actually "connect" the GUI created directly to the code > > and make it available "live" in an IDE? > > > > This whole cycle of "design GUI"-

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Wolfgang Keller
> > What "GUI designer" would come the closest to the way that Cocoa's > > Interface Builder works? I.e. is there any one (cross-platform) that > > allows to actually "connect" the GUI created directly to the code > > and make it available "live" in an IDE? > > If you're developing on the Mac, PyO

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Kevin Walzer
On 6/11/12 8:01 AM, Wolfgang Keller wrote: Tkinter is imho honestly the very best "argument" if you want to make potential new users turn their backs away from Python for good. Just show them one GUI implemented with it and, hey, wait, where are you running to... Yes, Tkinter GUI's are very ugl

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Mark Lawrence
On 11/06/2012 13:47, Kevin Walzer wrote: Yes, Tkinter GUI's are very ugly. http://www.codebykevin.com/phynchronicity-running.png http://www.codebykevin.com/quickwho-main.png At last we're getting to the crux of the matter. Provided that the GUI is pretty who cares about picking appropriate

Decorator Pattern with Iterator

2012-06-11 Thread Oscar Benjamin
On 11 June 2012 08:51, Tom Harris wrote: > Greetings, > > I have a class that implements the iterator protocol, and tokenises a > string into a series of tokens. As well as the token, it keeps track of > some information such as line number, source file, etc. > > for tokens in Tokeniser(): > do

Re: Pythonic cross-platform GUI desingers � la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Mark Roseman
Dietmar Schwertberger wrote: > But the fact that Tkinter is still the standard GUI toolkit tells a lot > about the situation... > ... > Sure, I know how to code GUIs. But the learning curve is too steep > for new users wanting to implement simple GUIs. As is obvious to everybody, the massive i

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Anssi Saari
Wolfgang Keller writes: > This whole cycle of "design GUI"->"generate code"->add own code to > generated code"->"run application with GUI" has always seemed very > un-pythonic to me. A dynamic, interpreted language should allow to work > in a more "lively", "direct" way to build a GUI. What abou

python with xl

2012-06-11 Thread chebrian
Hi, How to append the list of data in individual column of XL file, every time from python script . -- http://mail.python.org/mailman/listinfo/python-list

Re: python with xl

2012-06-11 Thread Karim
Le 11/06/2012 16:12, chebrian a écrit : Hi, How to append the list of data in individual column of XL file, every time from python script . In standard lib => module csv (ascii comma separated values) In non standard => binary xl => module xlrd for reading and module xlwt for writing (http:/

Re: Decorator Pattern with Iterator

2012-06-11 Thread Ian Kelly
On Mon, Jun 11, 2012 at 1:51 AM, Tom Harris wrote: > Greetings, > > I have a class that implements the iterator protocol, and tokenises a string > into a series of tokens. As well as the token, it keeps track of some > information such as line number, source file, etc. So each processor needs to

Ann: New Stackless Website

2012-06-11 Thread Christian Tismer
I'm very happy to announce == Stackless Python has a New Website == Due to a great effort of the Nagare people: http://www.nagare.org/ and namely by the tremendous work of Alain Pourier, Stackless Python has now a new website

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread Alexander Blinne
On 10.06.2012 23:27, Paul Rubin wrote: > Here is an exercise from the book that you might like to try in Python: > > http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-24.html#%_idx_3894 > > It's not easy ;-) I liked this exercize. At first I wrote my own merger. > def merge(*iterables): >

Where to set default data - where received, or where used

2012-06-11 Thread Dennis Carachiola
I'm programming a project which will use a file to save parameters needed by the program. There are already two previous file formats, each of which can only be run by the version of the program which created them. I'm trying to avoid that problem in the future. To do that, I intend to use a dic

RE: Where to set default data - where received, or where used

2012-06-11 Thread Nick Cash
This is really up to your programming style, but I'm of the opinion that defining all of the default values in one place keeps maintenance easier. Of course, if it's done differently elsewhere in your code base, I would aim for consistency instead. Thanks, Nick Cash -Original Message-

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread Tomasz Rola
On Sat, 9 Jun 2012, Yesterday Paid wrote: > I'm planning to learn one more language with my python. > Someone recommended to do Lisp or Clojure, but I don't think it's a > good idea(do you?) > So, I consider C# with ironpython or Java with Jython. > It's a hard choice...I like Visual studio(becaus

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread Tomasz Rola
On Mon, 11 Jun 2012, Tomasz Rola wrote: > If you want to delve into Java world, well, I consider Java an unbearably > ugly hog. When I was younger and fearless I programmed a bit in Java, but > nowadays, the only way I myself could swallow this would be to use some > other language on top of it

Sybase module 0.40 released

2012-06-11 Thread Robert Boehne
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. The module is available here: http://downloads.sourceforge.net/python-sybase/python-sybase-0.40.tar.gz The module home p

Re: Where to set default data - where received, or where used

2012-06-11 Thread Dave Angel
On 06/11/2012 02:37 PM, Dennis Carachiola wrote: > I'm programming a project which will use a file to save parameters > needed by the program. There are already two previous file formats, > each of which can only be run by the version of the program which > created them. I'm trying to avoid that

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread Matej Cepl
On 11/06/12 06:20, rusi wrote: Hi Matěj! If this question is politically incorrect please forgive me. Do you speak only one (natural) language -- English? And if this set is plural is your power of expression identical in each language? I have written about that later ... no, I am a native Czec

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Dietmar Schwertberger
Am 11.06.2012 06:05, schrieb rusi: If python is really a "language maven's" language then it does not do very well: - its not as object-oriented as Ruby (or other arcana like Eiffel) - its not as functional as Haskell - its not as integrable as Lua - its not as close-to-bare-metal as C - etc Dep

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Dietmar Schwertberger
Am 11.06.2012 14:01, schrieb Wolfgang Keller: * Domain experts in fact who would need to implement loads of software to help them get their work done but can't. And since there's no budget for external developers, nothing get's ever done about this. Well, typically or at least very often sooner

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Dietmar Schwertberger
Am 11.06.2012 16:14, schrieb Anssi Saari: Wolfgang Keller writes: This whole cycle of "design GUI"->"generate code"->add own code to generated code"->"run application with GUI" has always seemed very un-pythonic to me. A dynamic, interpreted language should allow to work in a more "lively", "d

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Dietmar Schwertberger
Am 11.06.2012 16:09, schrieb Mark Roseman: > On the Tkinter front, I just want to reiterate two important points that > are not nearly as well known as they should be. > > First, it is possible and in fact easy to do decent looking GUI's in > Tkinter, with the caveat that you do in fact have to do

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Dietmar Schwertberger
Am 11.06.2012 01:15, schrieb Chris Angelico: If you're a complete non-programmer, then of course that's an opaque block of text. But to a programmer, it ought to be fairly readable - Well, I can read the code. But still I would not be able (or interested) to write C++/GTK code. With my rusty C++

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Rick Johnson
On Jun 10, 11:05 pm, rusi wrote: > If python is really a "language maven's" language then it does not do > very well: > - its not as object-oriented as Ruby (or other arcana like Eiffel) if it were object-oreiented as Ruby, then why not use Ruby? > - its not as functional as Haskell if it were

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Rick Johnson
On Jun 11, 9:09 am, Mark Roseman wrote: > Second, there does exist at least one fairly good source of > documentation for new users wishing to do exactly this (according to > many, many comments I have received), though that documentation is > admittedly buried in a sea of out-of-date informatio