Re: GUI automation tool (windows)

2010-08-10 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > ... nobody's talking about using automated testing to figure out > what users think. That’s the trouble. What’s the point of a GUI, then? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-10 Thread Ulrich Eckhardt
Martin v. Loewis wrote: > Am 10.08.2010 09:06, schrieb Ulrich Eckhardt: >> When asked on the developers' list, it was said that this was >> intended for compatibility with C++, e.g. in cases where people >> want to embed Python into their C++ projects. Of course, this >> contradicts Christian's sta

Re: python interview quuestions

2010-08-10 Thread Terry Reedy
On 8/10/2010 8:08 PM, Roy Smith wrote: In any case, if the candidate were to submit somebody else's work, it would come out pretty quickly as we discussed their code. I suppose one question I might ask would be, "Can you explain why, when I copy-paste one of your comments into a google search b

Re: GUI automation tool (windows)

2010-08-10 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro wrote: > In message , Grant Edwards wrote: > >> Automated GUI intended to uncover problems in the underlying program >> functionality ... > > That ???underlying??? functionality has nothing to do with the GUI, > then. Why not test it directly, rather than go thro

Re: GUI automation tool (windows)

2010-08-10 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro wrote: > In message , Robert > Kern wrote: > >> On 2010-08-10 21:57 , Lawrence D'Oliveiro wrote: >> >>> In message >>> , Alex >>> Barna wrote: >>> On Aug 10, 10:05 am, Lawrence D'Oliveiro > Can???t understand the point to it. ???GUI automation??? i

Re: GUI automation tool (windows)

2010-08-10 Thread Ben Finney
Lawrence D'Oliveiro writes: > In message , Grant Edwards wrote: > > > Automated GUI intended to uncover problems in the underlying program > > functionality ... > > That “underlying” functionality has nothing to do with the GUI, then. Why > not test it directly, rather than go through the GUI?

Re: GUI automation tool (windows)

2010-08-10 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > Automated GUI intended to uncover problems in the underlying program > functionality ... That “underlying” functionality has nothing to do with the GUI, then. Why not test it directly, rather than go through the GUI? > Automated GUI testing often isn't even b

Re: GUI automation tool (windows)

2010-08-10 Thread Lawrence D'Oliveiro
In message , Robert Kern wrote: > On 2010-08-10 21:57 , Lawrence D'Oliveiro wrote: > >> In message >> , Alex >> Barna wrote: >> >>> On Aug 10, 10:05 am, Lawrence D'Oliveiro >>> Can’t understand the point to it. “GUI automation” is a contradiction in terms, because a GUI is designed for

Re: GUI automation tool (windows)

2010-08-10 Thread Ben Finney
Lawrence D'Oliveiro writes: > Alex Barna wrote: > > > On Aug 10, 10:05 am, Lawrence D'Oliveiro > > > >> Can’t understand the point to it. “GUI automation” is a > >> contradiction in terms, because a GUI is designed for use by humans > >> to do manual tasks, not ones that can be automated. > > >

Re: How to capture all the environment variables from shell?

2010-08-10 Thread Cameron Simpson
On 11Aug2010 13:08, I wrote: | On 10Aug2010 10:07, Steven W. Orr wrote: [...] | | After that, and again, be aware that the .bashrc alone is executed for login | | shells *which are not interactive*. for example: | | | | ssh somemachine 'echo Hello' | | | | This command will *not* go through the

Re: GUI automation tool (windows)

2010-08-10 Thread Robert Kern
On 2010-08-10 21:59 , Lawrence D'Oliveiro wrote: In message<4c61a4f5$0$5804$426a3...@news.free.fr>, News123 wrote: On 08/10/2010 12:25 PM, Alex Barna wrote: On Aug 10, 10:05 am, Lawrence D'Oliveiro Can’t understand the point to it. “GUI automation” is a contradiction in terms, because a GUI

Re: GUI automation tool (windows)

2010-08-10 Thread Robert Kern
On 2010-08-10 21:57 , Lawrence D'Oliveiro wrote: In message , Alex Barna wrote: On Aug 10, 10:05 am, Lawrence D'Oliveiro Can’t understand the point to it. “GUI automation” is a contradiction in terms, because a GUI is designed for use by humans to do manual tasks, not ones that can be automat

Re: GUI automation tool (windows)

2010-08-10 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro wrote: > In message <4c61a4f5$0$5804$426a3...@news.free.fr>, News123 wrote: >> On 08/10/2010 12:25 PM, Alex Barna wrote: >>> On Aug 10, 10:05 am, Lawrence D'Oliveiro >>> Can???t understand the point to it. ???GUI automation??? is a contradiction in term

Re: GUI automation tool (windows)

2010-08-10 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro wrote: > In message >, Alex > Barna wrote: > >> On Aug 10, 10:05 am, Lawrence D'Oliveiro >> >>> Can???t understand the point to it. ???GUI automation??? is a contradiction >>> in >>> terms, because a GUI is designed for use by humans to do manual tasks, >>> not

Re: How to capture all the environment variables from shell?

2010-08-10 Thread Cameron Simpson
On 10Aug2010 10:07, Steven W. Orr wrote: | On 8/2/2010 4:33 AM, Thorsten Kampe wrote: | > * Tim Chase (Mon, 26 Jul 2010 21:42:24 -0500) | >> On 07/26/10 21:26, Steven W. Orr wrote: | >>> Please! Never export anything from your .bashrc unless you | >>> really know what you're doing. Almost all expo

Re: GUI automation tool (windows)

2010-08-10 Thread Lawrence D'Oliveiro
In message <4c61a4f5$0$5804$426a3...@news.free.fr>, News123 wrote: > On 08/10/2010 12:25 PM, Alex Barna wrote: > >> On Aug 10, 10:05 am, Lawrence D'Oliveiro >> >>> Can’t understand the point to it. “GUI automation” is a contradiction in >>> terms, because a GUI is designed for use by humans to do

Re: GUI automation tool (windows)

2010-08-10 Thread Lawrence D'Oliveiro
In message , Alex Barna wrote: > On Aug 10, 10:05 am, Lawrence D'Oliveiro > >> Can’t understand the point to it. “GUI automation” is a contradiction in >> terms, because a GUI is designed for use by humans to do manual tasks, >> not ones that can be automated. > > Automating GUI is for testing.

Re: Splitting a sequence into pieces with identical elements

2010-08-10 Thread Tim Chase
On 08/10/10 20:30, MRAB wrote: Tim Chase wrote: r = re.compile(r'((.)\1*)') #r = re.compile(r'((\w)\1*)') That should be \2, not \1. Alternatively: r = re.compile(r'(.)\1*') Doh, I had played with both and mis-transcribed the combination of them into one malfunctioning regexp.

Re: python interview quuestions

2010-08-10 Thread Rolando Espinoza La Fuente
On Fri, Aug 6, 2010 at 10:31 PM, Tim Chase wrote: [...] >> More over, it can be done in just a single line of Python. >> >> 7 if you're not very familiar with Python. > > While it *can* be done in one line, I'm not sure it's the most legible > solution.  Though I must say I like this one-line pyth

Re: How to implement a pipeline...??? Please help

2010-08-10 Thread Ritchy lelis
On 7 Ago, 07:30, Dennis Lee Bieber wrote: > On Fri, 6 Aug 2010 16:47:58 -0700 (PDT), Ritchy lelis > declaimed the following in > gmane.comp.python.general: > > > Guys i'm asking if it's possible for a generic function for a > > pipeline, all the suggestions ideas are welcome. > >         I've not

Re: Splitting a sequence into pieces with identical elements

2010-08-10 Thread MRAB
Tim Chase wrote: On 08/10/10 19:37, candide wrote: Suppose you have a sequence s , a string for say, for instance this one : spppaeggg We want to split s into the following parts : ['s', 'ppp', 'a', '', 'e', 'ggg', ''] ie each part is a single repeated character word. Whi

Re: Splitting a sequence into pieces with identical elements

2010-08-10 Thread Tim Chase
On 08/10/10 19:37, candide wrote: Suppose you have a sequence s , a string for say, for instance this one : spppaeggg We want to split s into the following parts : ['s', 'ppp', 'a', '', 'e', 'ggg', ''] ie each part is a single repeated character word. While I'm not sure it'

Re: Splitting a sequence into pieces with identical elements

2010-08-10 Thread Chris Rebert
On Tue, Aug 10, 2010 at 5:37 PM, candide wrote: > Suppose you have a sequence s , a string  for say, for instance this one : > > spppaeggg > > We want to split s into the following parts : > > ['s', 'ppp', 'a', '', 'e', 'ggg', ''] > > ie each part is a single repeated character wor

Splitting a sequence into pieces with identical elements

2010-08-10 Thread candide
Suppose you have a sequence s , a string for say, for instance this one : spppaeggg We want to split s into the following parts : ['s', 'ppp', 'a', '', 'e', 'ggg', ''] ie each part is a single repeated character word. What is the pythonic way to answer this question? A naive

Re: python interview quuestions

2010-08-10 Thread Roy Smith
In article <507f1970-9c15-4200-a90b-6ebc018c0...@a4g2000prm.googlegroups.com>, Peter wrote: > Agreed. Although anything that involves "take home" or reading of > "their" code runs the risk of the candidate presenting somebody else's > work... I expect a candidate to emphasize their positive qu

Re: Why is python not written in C++ ?

2010-08-10 Thread Martin v. Loewis
Am 10.08.2010 09:06, schrieb Ulrich Eckhardt: > Carl Banks wrote: >> I highly doubt the Python source would build with a C++ compiler. > > As Christian showed, it doesn't. However, look around the sources a bit. > There are lots of places where e.g. the returnvalue of malloc() (or, > rather, the m

Re: python interview quuestions

2010-08-10 Thread Peter
Agreed. Although anything that involves "take home" or reading of "their" code runs the risk of the candidate presenting somebody else's work... It was never a good experience being responsible for the hiring of somebody based on how well they sell themselves in an interview - some people are hope

Re: File Manager in Tkinter

2010-08-10 Thread John
On Tue, 10 Aug 2010 14:51:14 -0700 (PDT), Jeff Hobbs wrote: >On Aug 10, 9:43 am, John wrote: >> On Tue, 10 Aug 2010 09:20:31 -0700 (PDT), Jeff  Hobbs >> >> >> >> wrote: >> >On Aug 9, 9:53 pm, John wrote: >> >> As a learning exercise in Tkinter I htought about making a very simple >> >> and basi

Re: File Manager in Tkinter

2010-08-10 Thread Jeff Hobbs
On Aug 10, 9:43 am, John wrote: > On Tue, 10 Aug 2010 09:20:31 -0700 (PDT), Jeff  Hobbs > > > > wrote: > >On Aug 9, 9:53 pm, John wrote: > >> As a learning exercise in Tkinter I htought about making a very simple > >> and basic file manager for my own use. I tried searching google for > >> any sam

Re: Image histogram

2010-08-10 Thread Anahita Yazdi
Yes, my question is regarding PIL. And basically I need to reload an image given a new histogram. The new histogram has still the same amount of overall pixels however I have only switched a couple of picks. Another thing I have tried was using a function that could be given to the "point" module b

Re: python interview quuestions

2010-08-10 Thread Benjamin Kaplan
On Tue, Aug 10, 2010 at 1:44 PM, J Kenneth King wrote: > James Mills writes: > >> On Sat, Aug 7, 2010 at 4:32 AM, Tim Chase >> wrote: I would like to aquint myself with Python Interview questions >>> >>> This came up a while ago: >>> >>> http://www.mail-archive.com/python-list@python.org/m

a article on does lang influence thought

2010-08-10 Thread Xah Lee
Great article. 〈Lost in Translation〉 (2010-07-23), by By Lera Boroditsky. From The Wall Street Journal. “New cognitive research suggests that language profoundly influences the way people see the world; a different sense of blame in Japanese and Spanish” http://online.wsj.com/article/SB100014240

Re: python interview quuestions

2010-08-10 Thread J Kenneth King
James Mills writes: > On Sat, Aug 7, 2010 at 4:32 AM, Tim Chase > wrote: >>> I would like to aquint myself with Python Interview questions >> >> This came up a while ago: >> >> http://www.mail-archive.com/python-list@python.org/msg168961.html >> >> Most of that thread is still relevant (perhaps

Re: GUI automation tool (windows)

2010-08-10 Thread Martin P. Hellwig
On 08/10/10 20:13, News123 wrote: On 08/10/2010 12:25 PM, Alex Barna wrote: On Aug 10, 10:05 am, Lawrence D'Oliveiro> Can’t understand the point to it. “GUI automation” is a contradiction in terms, because a GUI is designed for use by humans to do manual tasks, not ones that can be automated.

Re: GUI automation tool (windows)

2010-08-10 Thread News123
On 08/10/2010 12:25 PM, Alex Barna wrote: > On Aug 10, 10:05 am, Lawrence D'Oliveiro > Can’t understand the point > to it. “GUI automation” is a contradiction in >> terms, because a GUI is designed for use by humans to do manual tasks, not >> ones that can be automated. > > Automating GUI is for t

Re: Why is python not written in C++ ?

2010-08-10 Thread Carl Banks
On Aug 10, 12:06 am, Ulrich Eckhardt wrote: > Carl Banks wrote: > > I highly doubt the Python source would build with a C++ compiler. > > As Christian showed, it doesn't. However, look around the sources a bit. > There are lots of places where e.g. the returnvalue of malloc() (or, > rather, the ma

Re: Weird Python behaviour

2010-08-10 Thread Francesco Bochicchio
On 10 Ago, 17:57, Stefan Schwarzer wrote: > Hi, > > On 2010-08-10 17:01, Francesco Bochicchio wrote: > > > There used to be a very nice (also graphic) explanationor this > > somewhere on the web, but my googling skills failed me this time, > > so instead I'll show you the concept using your own co

type enforcement in _ssl.sslwrap

2010-08-10 Thread Eric Snow
ssl.SSLSocket.__init__ makes a call to _ssl.sslwrap (in the C module). That in turn makes a call to PyArg_ParseTuple, which casts the first arg of _ssl.sslwrap into a PySocketModule.Sock_Type object. My problem is that I am trying to pass in an object that implements the Socket interface, but doe

Re: Weird Python behaviour

2010-08-10 Thread Jonas Nilsson
On 10 Ago, 13:58, Jonas Nilsson wrote: You stumbled in two python common pitfalls at once :-) One, the default arguments issue, was already pointed to you. The other one is that python variables are just names for objects. Assigning a variable never mean making a copy, it just means using

Re: File Manager in Tkinter

2010-08-10 Thread John
On Tue, 10 Aug 2010 09:20:31 -0700 (PDT), Jeff Hobbs wrote: >On Aug 9, 9:53 pm, John wrote: >> As a learning exercise in Tkinter I htought about making a very simple >> and basic file manager for my own use. I tried searching google for >> any sample project and could not find anything. Not exac

Re: File Manager in Tkinter

2010-08-10 Thread Nick Buchholz
On Tue, 10 Aug 2010 10:58:39 -0400 j...@mail.python.org wrote: >Thank you both for the suggestions. Have you ever tried to make one? >-- >http://mail.python.org/mailman/listinfo/python-list I don't know if my first reply went out so I'll repeat Here is a list box dialog written to allow selection

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Michael Torrie
On 08/10/2010 02:07 AM, Gregory Ewing wrote: > Tim Roberts wrote: > >> I'm not sure that's really fair. The .NET Common Language Runtime is a >> vast and very useful class library, including two complete GUI systems. The >> thought was that IronPython and IronRuby would let people who were >> com

Re: File Manager in Tkinter

2010-08-10 Thread Jeff Hobbs
On Aug 9, 9:53 pm, John wrote: > As a learning exercise in Tkinter I htought about making a very simple > and basic file manager for my own use. I tried searching google for > any sample project and could not find anything. Not exactly  sure how > to start I tought I could ask here? > > I thought a

Re: Weird Python behaviour

2010-08-10 Thread Stefan Schwarzer
Hi, On 2010-08-10 17:01, Francesco Bochicchio wrote: > There used to be a very nice (also graphic) explanationor this > somewhere on the web, but my googling skills failed me this time, > so instead I'll show you the concept using your own code: Probably this isn't the page you're referring to, b

Re: freeze function calls

2010-08-10 Thread Peter Otten
Santiago Caracol wrote: >> Run the above with >> >> $ python wsgi_demo.py >> Serving on port 8000... >> > > Thanks a lot for this code. The problem with it is that the whole > application IS a generator function. That means that if I run the code > at, say foo.org, then any user that visits the s

Re: Replace and inserting strings within .txt files with the use of regex

2010-08-10 Thread MRAB
Νίκος wrote: [snip] The ID number of each php page was contained in the old php code within this string PageID = some_number So instead of create a new ID number for eaqch page i have to pull out this number to store to the beginnign to the file as comment line, because it has direct relations

Re: Weird Python behaviour

2010-08-10 Thread Francesco Bochicchio
On 10 Ago, 13:58, Jonas Nilsson wrote: > Hello, > > Lets say that I want to feed an optional list to class constructor: > > class Family(): >         def __init__(self, fName, members = []): >                 self.fName = fName >                 self.members = members > > Now, lets add members to

Re: how to save a whole web page with something block

2010-08-10 Thread Daniel Fetchinson
> I want to save a web page. I use urllib to parse the web page. But I > find the saved file, where some content is missing. The missing part > is block from the original web page, such as this part style="display: block;" id="GeneInts">I don't know how to > parse a whole page without someth

Re: File Manager in Tkinter

2010-08-10 Thread John
On Tue, 10 Aug 2010 10:40:53 +0200, Eric Brunel wrote: >In article , John wrote: > >> As a learning exercise in Tkinter I htought about making a very simple >> and basic file manager for my own use. I tried searching google for >> any sample project and could not find anything. Not exactly sure

Re: Weird Python behaviour

2010-08-10 Thread Benjamin Kaplan
On Tue, Aug 10, 2010 at 4:58 AM, Jonas Nilsson wrote: > Hello, > > Lets say that I want to feed an optional list to class constructor: > > class Family(): >        def __init__(self, fName, members = []): >                self.fName = fName >                self.members = members > > Now, lets add

Re: How to capture all the environment variables from shell?

2010-08-10 Thread Steven W. Orr
On 8/2/2010 4:33 AM, Thorsten Kampe wrote: > * Tim Chase (Mon, 26 Jul 2010 21:42:24 -0500) >> On 07/26/10 21:26, Steven W. Orr wrote: >>> Please! Never export anything from your .bashrc unless you >>> really know what you're doing. Almost all exports should be >>> done in your .bash_profile >> >> C

how to save a whole web page with something block

2010-08-10 Thread Herta
Hi everyone, I want to save a web page. I use urllib to parse the web page. But I find the saved file, where some content is missing. The missing part is block from the original web page, such as this part I don't know how to parse a whole page without something block in it. Could you help m

Re: freeze function calls

2010-08-10 Thread Santiago Caracol
> Run the above with > > $ python wsgi_demo.py > Serving on port 8000... > Thanks a lot for this code. The problem with it is that the whole application IS a generator function. That means that if I run the code at, say foo.org, then any user that visits the site will augment the answer number of

Re: Python "why" questions

2010-08-10 Thread D'Arcy J.M. Cain
On Tue, 10 Aug 2010 13:51:17 +0200 Jean-Michel Pichavant wrote: Pardon the response to the response. I missed Ben's message. > Ben Finney wrote: > > "D'Arcy J.M. Cain" writes: > >> No. You are giving me math and logic but the subject was common > >> sense. > > > > Common sense is often unhelp

Re: Newbie question - calculating prime numbers

2010-08-10 Thread Dave Angel
Matty Sarro wrote: Hey Dave, Thank you for the heads up. I actually bashed my head against the desk a few times and eventually I realized what I was doing wrong. Here's my final code (slightly optimized) that's verified and working. Out of curiousity, what other optimizations could I throw at it

Re: Newbie question - calculating prime numbers

2010-08-10 Thread Peter Otten
Matty Sarro wrote: > Hey Dave, > Thank you for the heads up. I actually bashed my head against the desk a > few times and eventually I realized what I was doing wrong. Here's my > final code (slightly optimized) that's verified and working. Out of > curiousity, what other optimizations could I thr

Re: Newbie question - calculating prime numbers

2010-08-10 Thread Ian
On 10/08/2010 12:57, Matty Sarro wrote: Hey Everyone, I'm currently trying to work through MIT's opencourseware and am using python. The second assignment they offer is to determine the 1000th prime number. Below is the code I am using: #Assignment 1a #Determine the 1000th prime number candid

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Ben Finney
Steven D'Aprano writes: > On Tue, 10 Aug 2010 20:07:06 +1200, Gregory Ewing wrote: > > Is there any way for a non-.NET program to access a .NET library? Or > > is it necessary to drink the entire bottle of .NET kool-aid? > > http://www.mono-project.com/Main_Page Anyone thinking of using Mono nee

Re: Newbie question - calculating prime numbers

2010-08-10 Thread Matty Sarro
Hey Dave, Thank you for the heads up. I actually bashed my head against the desk a few times and eventually I realized what I was doing wrong. Here's my final code (slightly optimized) that's verified and working. Out of curiousity, what other optimizations could I throw at it (without diving too d

Re: Newbie question - calculating prime numbers

2010-08-10 Thread Dave Angel
Matty Sarro wrote: Hey Everyone, I'm currently trying to work through MIT's opencourseware and am using python. The second assignment they offer is to determine the 1000th prime number. Below is the code I am using: #Assignment 1a #Determine the 1000th prime number candidate=3 #Already know that

Re: freeze function calls

2010-08-10 Thread Peter Otten
Santiago Caracol wrote: >> Python offers an elegant mechanism to calculate values on demand: the >> generator function: >> >> >>> def calculate_answers(): >> >> ... for i in range(100): >> ... print "calculating answer #%d" % i >> ... yield i * i >> ... >> > > Thanks f

Re: freeze function calls

2010-08-10 Thread Santiago Caracol
> Python offers an elegant mechanism to calculate values on demand: the > generator function: > > >>> def calculate_answers(): > > ...     for i in range(100): > ...             print "calculating answer #%d" % i > ...             yield i * i > ... > Thanks for pointing this out. I was aware of th

Re: delegate functions to member

2010-08-10 Thread Ulrich Eckhardt
Peter Otten wrote: > Ulrich Eckhardt wrote: >> So, short follow-up question: Why does this work? > > __getattr__() is a fallback that is only tried when the normal lookup > fails. If you need to intercept every attribute lookup use > __getattribute__() instead: Thank you Peter, that was the missi

Re: Weird Python behaviour

2010-08-10 Thread Peter Otten
Jonas Nilsson wrote: > Lets say that I want to feed an optional list to class constructor: > > class Family(): > def __init__(self, fName, members = []): > Why on earth is the output ['Bill', 'Joe']!? Is there a simple > solution that separates f1 and f2 without forcing me to write code for

shelf-like list?

2010-08-10 Thread kj
I'm looking for a module that implements "persistent lists": objects that behave like lists except that all their elements are stored on disk. IOW, the equivalent of "shelves", but for lists rather than a dictionaries. Does anyone know of such a module? (I suppose that I could slap together

Re: freeze function calls

2010-08-10 Thread Peter Otten
Santiago Caracol wrote: > Hello, > > I want to write a web application that does this: > > (1) The user submits a query: > > - > | What is the answer? | > - > > > (2) The web server gives the user N answers and a button saying "M

Weird Python behaviour

2010-08-10 Thread Jonas Nilsson
Hello, Lets say that I want to feed an optional list to class constructor: class Family(): def __init__(self, fName, members = []): self.fName = fName self.members = members Now, lets add members to two different instances of Family: f1 = Family("Smith")

Newbie question - calculating prime numbers

2010-08-10 Thread Matty Sarro
Hey Everyone, I'm currently trying to work through MIT's opencourseware and am using python. The second assignment they offer is to determine the 1000th prime number. Below is the code I am using: #Assignment 1a #Determine the 1000th prime number candidate=3 #Already know that 2 is prime primeCoun

Re: Python "why" questions

2010-08-10 Thread Jean-Michel Pichavant
Ben Finney wrote: "D'Arcy J.M. Cain" writes: No. You are giving me math and logic but the subject was common sense. Common sense is often unhelpful, and in such cases the best way to teach something is to plainly contradict that common sense. Common sense, for example, would have t

Re: delegate functions to member

2010-08-10 Thread Peter Otten
Ulrich Eckhardt wrote: > Peter Otten wrote: >> Use getattr() >> > class W(object): >> ... def __init__(self, wrapped): self._wrapped = wrapped >> ... def __getattr__(self, name): >> ... return getattr(self._wrapped, name) >> ... > > I thought there was something like this

Re: Replace and inserting strings within .txt files with the use of regex

2010-08-10 Thread Νίκος
Please help me with these last changes before i try to perform an overall change. its almost done! -- http://mail.python.org/mailman/listinfo/python-list

Re: delegate functions to member

2010-08-10 Thread Ulrich Eckhardt
Peter Otten wrote: > Use getattr() > class W(object): > ... def __init__(self, wrapped): self._wrapped = wrapped > ... def __getattr__(self, name): > ... return getattr(self._wrapped, name) > ... I thought there was something like this, thanks! :) When I read this, I tho

Re: Why is python not written in C++ ?

2010-08-10 Thread Lawrence D'Oliveiro
In message , Christian Heimes wrote: > There isn't really a point in cluttering the source with type casts. Makes you wonder why they bothered using a typed language at all. -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI automation tool (windows)

2010-08-10 Thread Alex Barna
On Aug 10, 10:05 am, Lawrence D'Oliveiro > Can’t understand the point to it. “GUI automation” is a contradiction in > terms, because a GUI is designed for use by humans to do manual tasks, not > ones that can be automated. Automating GUI is for testing. -- http://mail.python.org/mailman/listinfo/

Checker 1.3 Released!

2010-08-10 Thread Chris Withers
I'm pleased to announce a new release of Checker. This is a cross-platform, pluggable tool for comparing the configuration of a machine with a known configuration stored in text files in a source control system all written in Python. This release and the previous release fix ordering issues in f

Re: mailbox.mbox not locking mbox properly

2010-08-10 Thread Chris Rebert
On Tue, Aug 10, 2010 at 2:01 AM, wrote: > Tim Roberts wrote: >> tinn...@isbd.co.uk wrote: >> > >> >I'm using the python mailbox class in a script that processes incoming >> >mail and delivers it to various mbox format mailboxes.  It appears >> >that, although I am calling the lock method on the

Execute 1.2 Released!

2010-08-10 Thread Chris Withers
I'm pleased to announce the first public release of Execute. This is a collection of common patterns for executing commands as sub processes. It supports executing a simple command that requires no input in a sub process and can return: - text sent to the standard error and output streams

Re: easy question on parsing python: "is not None"

2010-08-10 Thread Jean-Michel Pichavant
Ben Finney wrote: Peter Pearson writes: Hey, that's a cute example, but . . . what a trap! Is it possible to document the use-the-object-not-the-string requirement loudly enough that people won't get caught? Don't use strings for such values. The data isn't going to be used, so there

Re: delegate functions to member

2010-08-10 Thread Chris Rebert
On Tue, Aug 10, 2010 at 2:01 AM, Ulrich Eckhardt wrote: > Hi! > > I have an extension module (a plugin written with Boost.Python) and around > that a wrapper class that adapts a few things. Since the module is a > plugin, there are multiple implementations of this. What I'm currently > doing is th

Re: delegate functions to member

2010-08-10 Thread Peter Otten
Ulrich Eckhardt wrote: > Hi! > > I have an extension module (a plugin written with Boost.Python) and around > that a wrapper class that adapts a few things. Since the module is a > plugin, there are multiple implementations of this. What I'm currently > doing is this: > > plugin = __import__(pl

Re: Circular imports (again)

2010-08-10 Thread Frank Millman
"Frank Millman" wrote in message news:i3ov9e$du...@dough.gmane.org... Hi all I know the problems related to circular imports, and I know some of the techniques to get around them. However, I find that I bump my head into them from time to time, which means, I guess, that I have not fully u

Re: Subprocess Problem (Wait and while)

2010-08-10 Thread Tim Golden
On 09/08/2010 17:08, Alban Nona wrote: Hi, I have some problem with my actual code. In fact, the script is done to work within nuke from the foundry which is a compositing software. Homever, I have some code difficulties as I quite new in the area. Here the deal: Im using subprocess command to

Re: mailbox.mbox not locking mbox properly

2010-08-10 Thread tinnews
Tim Roberts wrote: > tinn...@isbd.co.uk wrote: > > > >I'm using the python mailbox class in a script that processes incoming > >mail and delivers it to various mbox format mailboxes. It appears > >that, although I am calling the lock method on the destination before > >writing to the mbox and cal

delegate functions to member

2010-08-10 Thread Ulrich Eckhardt
Hi! I have an extension module (a plugin written with Boost.Python) and around that a wrapper class that adapts a few things. Since the module is a plugin, there are multiple implementations of this. What I'm currently doing is this: plugin = __import__(plugin_name) class PluginWrapper(plugin.

MailingLogger 3.3.3 Released!

2010-08-10 Thread Chris Withers
I'm pleased to announce a new release of Mailinglogger. Mailinglogger provides two handlers for the standard python logging framework that enable log entries to be emailed either as the entries are logged or as a summary at the end of the running process. The handlers have the following features

Re: GUI automation tool (windows)

2010-08-10 Thread Chien
On Aug 10, 5:56 am, alex23 wrote: > Alex Barna wrote: > > So what happens to this field (Windows GUI automation) ? > > Either someone cares enough to do something about it, or everyone just > defaults to using AutoIT-like tools. There were a lot of development but then all ceased, except pywinau

Re: GUI automation tool (windows)

2010-08-10 Thread Steven D'Aprano
On Tue, 10 Aug 2010 20:05:12 +1200, Lawrence D'Oliveiro wrote: > In message > <56a18e2b-4967-4a63-852e-1eb53bb6e...@j8g2000yqd.googlegroups.com>, Alex > Barna wrote: > >> So what happens to this field (Windows GUI automation) ? > > Can’t understand the point to it. “GUI automation” is a contradi

Re: File Manager in Tkinter

2010-08-10 Thread Eric Brunel
In article , John wrote: > As a learning exercise in Tkinter I htought about making a very simple > and basic file manager for my own use. I tried searching google for > any sample project and could not find anything. Not exactly sure how > to start I tought I could ask here? > > I thought abou

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Stefan Behnel
Steven D'Aprano, 10.08.2010 10:04: On Tue, 10 Aug 2010 18:42:35 +1200, Lawrence D'Oliveiro wrote: Go on, name one creative thing which was ever done in Dotnet. Not just Dotnet, but Python on Dotnet. http://www.python.org/about/success/resolver/ At the very end of that article, I found this

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Steven D'Aprano
On Tue, 10 Aug 2010 20:07:06 +1200, Gregory Ewing wrote: > Tim Roberts wrote: > >> I'm not sure that's really fair. The .NET Common Language Runtime is a >> vast and very useful class library, including two complete GUI systems. >> The thought was that IronPython and IronRuby would let people wh

Re: GUI automation tool (windows)

2010-08-10 Thread Lawrence D'Oliveiro
In message <56a18e2b-4967-4a63-852e-1eb53bb6e...@j8g2000yqd.googlegroups.com>, Alex Barna wrote: > So what happens to this field (Windows GUI automation) ? Can’t understand the point to it. “GUI automation” is a contradiction in terms, because a GUI is designed for use by humans to do manual t

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Steven D'Aprano
On Tue, 10 Aug 2010 18:42:35 +1200, Lawrence D'Oliveiro wrote: > In message <7fr16650meigqgmj8rh0n3a66q9r4j4...@4ax.com>, Tim Roberts > wrote: > >> The .NET Common Language Runtime is a vast and very useful class >> library, including two complete GUI systems. > > Used only by corporate code-cut

Re: Using the print command in Python3

2010-08-10 Thread Steven D'Aprano
On Tue, 10 Aug 2010 00:17:03 -0500, Grady Knotts wrote: > In earlier versions of Python I can do: > print 'A', > print 'B' > to print everything on the same line: 'A B' > > But I don't know how to do this with Python3 I've been trying things > like: > print('A',) > print('

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Gregory Ewing
Tim Roberts wrote: I'm not sure that's really fair. The .NET Common Language Runtime is a vast and very useful class library, including two complete GUI systems. The thought was that IronPython and IronRuby would let people who were comfortable in those languages tap into the CLR. Is there an

Re: Why is python not written in C++ ?

2010-08-10 Thread Ulrich Eckhardt
Carl Banks wrote: > I highly doubt the Python source would build with a C++ compiler. As Christian showed, it doesn't. However, look around the sources a bit. There are lots of places where e.g. the returnvalue of malloc() (or, rather, the macro that resolves to something like it) is explicitly ty

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Stefan Behnel
Lawrence D'Oliveiro, 10.08.2010 08:42: In message<7fr16650meigqgmj8rh0n3a66q9r4j4...@4ax.com>, Tim Roberts wrote: The .NET Common Language Runtime is a vast and very useful class library, including two complete GUI systems. Used only by corporate code-cutter drones. Go on, name one creative