ANN: DirectPython 11 0.1

2010-08-10 Thread Heikki Salo
The first alpha release of DirectPython 11 is ready for testing. DirectPython 11 is an extension to the Python programming langugage which provides access to the Microsoft Windows Direct3D 11 API. Home page: http://directpython11.sourceforge.net/ Downloads:

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

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

ANN: Chicago Python User Group August meeting this Thursday 7pm ITA

2010-08-10 Thread bray
ChiPy = 7 PM Thursday Aug 12, 2010 (This Thursday in the loop) RSVP here - https://spreadsheets.google.com/viewform?formkey=dHVLOTNTU3oxTzJKYjB3RmV4eVZkMEE6MA Get ready for the best ChiPy meeting ever! We will head over to ITA in the loop for this free and informative (not to mention

Re: Using the print command in Python3

2010-08-10 Thread Navkirat Singh
On 10-Aug-2010, at 11:04 AM, Benjamin Kaplan wrote: On Mon, Aug 9, 2010 at 10:17 PM, Grady Knotts gradykno...@gmail.com 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

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Tim Roberts
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: Frankly I never understood the point of IronPython and IronRuby. They seemed like a desperate attempt to keep Dotnet relevant in the modern world of dynamic languages. Looks like it was a failure. Yawn. I'm not sure that's really fair.

Re: mailbox.mbox not locking mbox properly

2010-08-10 Thread Tim Roberts
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 calling unlock afterwards the locking

Re: Python parsing XML file problem with SAX

2010-08-10 Thread Stefan Behnel
Christian Heimes, 10.08.2010 01:39: Am 10.08.2010 01:20, schrieb Aahz: The docs say, Parses an XML section into an element tree incrementally. Sure sounds like it retains the entire parsed tree in RAM. Not good. Again, how do you parse an XML file larger than your available memory using

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Lawrence D'Oliveiro
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 thing which was ever done in Dotnet. --

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Stefan Behnel
Lawrence D'Oliveiro, 10.08.2010 08:42: In message7fr16650meigqgmj8rh0n3a66q9r4j4...@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

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

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

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('B') and

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-cutter

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

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 who were

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: File Manager in Tkinter

2010-08-10 Thread Eric Brunel
In article d4m1661blus6baj1lrd37j5vk4dau35...@4ax.com, 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

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 contradiction in

Re: GUI automation tool (windows)

2010-08-10 Thread Chien
On Aug 10, 5:56 am, alex23 wuwe...@gmail.com wrote: Alex Barna alex.lavoro.pro...@gmail.com 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

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

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

Re: mailbox.mbox not locking mbox properly

2010-08-10 Thread tinnews
Tim Roberts t...@probo.com 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

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: Circular imports (again)

2010-08-10 Thread Frank Millman
Frank Millman fr...@chagford.com 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

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 =

Re: delegate functions to member

2010-08-10 Thread Chris Rebert
On Tue, Aug 10, 2010 at 2:01 AM, Ulrich Eckhardt eckha...@satorlaser.com 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

Re: easy question on parsing python: is not None

2010-08-10 Thread Jean-Michel Pichavant
Ben Finney wrote: Peter Pearson ppear...@nowhere.invalid 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

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: mailbox.mbox not locking mbox properly

2010-08-10 Thread Chris Rebert
On Tue, Aug 10, 2010 at 2:01 AM, tinn...@isbd.co.uk wrote: Tim Roberts t...@probo.com 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

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

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. --

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

2010-08-10 Thread Lawrence D'Oliveiro
In message mailman.1863.1281378450.1673.python-l...@python.org, 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: 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 thought OK,

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 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, thanks! :)

Re: Python why questions

2010-08-10 Thread Jean-Michel Pichavant
Ben Finney wrote: D'Arcy J.M. Cain da...@druid.net 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

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

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)

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? | - Submit (2) The web server gives the user N answers and a button saying More

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 a

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 the

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 missing

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 the yield

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 for pointing this out. I

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

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

Re: Microsoft lessening commitment to IronPython and IronRuby

2010-08-10 Thread Ben Finney
Steven D'Aprano steve-remove-t...@cybersource.com.au 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

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

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 throw

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: Python why questions

2010-08-10 Thread D'Arcy J.M. Cain
On Tue, 10 Aug 2010 13:51:17 +0200 Jean-Michel Pichavant jeanmic...@sequans.com wrote: Pardon the response to the response. I missed Ben's message. Ben Finney wrote: D'Arcy J.M. Cain da...@druid.net writes: No. You are giving me math and logic but the subject was common sense.

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 the

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 div style=display: block; id=GeneInts.../div.I don't know how to parse a whole page

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 Could you

Re: Weird Python behaviour

2010-08-10 Thread Benjamin Kaplan
On Tue, Aug 10, 2010 at 4:58 AM, Jonas Nilsson j...@spray.se 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

Re: File Manager in Tkinter

2010-08-10 Thread John
On Tue, 10 Aug 2010 10:40:53 +0200, Eric Brunel eric.bru...@pragmadev.com wrote: In article d4m1661blus6baj1lrd37j5vk4dau35...@4ax.com, 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

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 div style=display: block; id=GeneInts.../div.I don't know how to parse a whole page without

Re: Weird Python behaviour

2010-08-10 Thread Francesco Bochicchio
On 10 Ago, 13:58, Jonas Nilsson j...@spray.se 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

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

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 site will

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, but

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 about

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 comfortable

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: File Manager in Tkinter

2010-08-10 Thread John
On Tue, 10 Aug 2010 09:20:31 -0700 (PDT), Jeff Hobbs jeff.ho...@gmail.com 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

Re: Weird Python behaviour

2010-08-10 Thread Jonas Nilsson
On 10 Ago, 13:58, Jonas Nilsson j...@spray.se 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

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

Re: Weird Python behaviour

2010-08-10 Thread Francesco Bochicchio
On 10 Ago, 17:57, Stefan Schwarzer sschwar...@sschwarzer.net 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

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

2010-08-10 Thread Carl Banks
On Aug 10, 12:06 am, Ulrich Eckhardt eckha...@satorlaser.com 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()

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 testing.

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: python interview quuestions

2010-08-10 Thread J Kenneth King
James Mills prolo...@shortcircuit.net.au writes: On Sat, Aug 7, 2010 at 4:32 AM, Tim Chase python.l...@tim.thechases.com 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

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”

Re: python interview quuestions

2010-08-10 Thread Benjamin Kaplan
On Tue, Aug 10, 2010 at 1:44 PM, J Kenneth King ja...@agentultra.com wrote: James Mills prolo...@shortcircuit.net.au writes: On Sat, Aug 7, 2010 at 4:32 AM, Tim Chase python.l...@tim.thechases.com wrote: I would like to aquint myself with Python Interview questions This came up a while

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

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 jeff.ho...@gmail.com 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

Re: File Manager in Tkinter

2010-08-10 Thread John
On Tue, 10 Aug 2010 14:51:14 -0700 (PDT), Jeff Hobbs jeff.ho...@gmail.com wrote: On Aug 10, 9:43 am, John wrote: On Tue, 10 Aug 2010 09:20:31 -0700 (PDT), Jeff  Hobbs jeff.ho...@gmail.com wrote: On Aug 9, 9:53 pm, John wrote: As a learning exercise in Tkinter I htought about making a

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

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 macro

Re: python interview quuestions

2010-08-10 Thread Roy Smith
In article 507f1970-9c15-4200-a90b-6ebc018c0...@a4g2000prm.googlegroups.com, Peter peter.milli...@gmail.com 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

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

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 cand...@free.invalid 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

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

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.

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

2010-08-10 Thread Ritchy lelis
On 7 Ago, 07:30, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Fri, 6 Aug 2010 16:47:58 -0700 (PDT), Ritchy lelis ritchy_g...@hotmail.com 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

Re: python interview quuestions

2010-08-10 Thread Rolando Espinoza La Fuente
On Fri, Aug 6, 2010 at 10:31 PM, Tim Chase python.l...@tim.thechases.com 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

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

Re: GUI automation tool (windows)

2010-08-10 Thread Lawrence D'Oliveiro
In message abe9b308-db83-4ca8-a71a-12d2025a7...@i31g2000yqm.googlegroups.com, 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

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 manual tasks,

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

2010-08-10 Thread Cameron Simpson
On 10Aug2010 10:07, Steven W. Orr ste...@syslang.net 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.

Re: GUI automation tool (windows)

2010-08-10 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message abe9b308-db83-4ca8-a71a-12d2025a7...@i31g2000yqm.googlegroups.com, Alex Barna wrote: On Aug 10, 10:05 am, Lawrence D'Oliveiro Can???t understand the point to it. ???GUI automation??? is a contradiction

Re: GUI automation tool (windows)

2010-08-10 Thread Grant Edwards
On 2010-08-11, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand 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

Re: GUI automation tool (windows)

2010-08-10 Thread Robert Kern
On 2010-08-10 21:57 , Lawrence D'Oliveiro wrote: In message abe9b308-db83-4ca8-a71a-12d2025a7...@i31g2000yqm.googlegroups.com, 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

Re: GUI automation tool (windows)

2010-08-10 Thread Robert Kern
On 2010-08-10 21:59 , Lawrence D'Oliveiro wrote: In message4c61a4f5$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: 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 ste...@syslang.net 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

Re: GUI automation tool (windows)

2010-08-10 Thread Ben Finney
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand 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

Re: GUI automation tool (windows)

2010-08-10 Thread Lawrence D'Oliveiro
In message mailman.1936.1281496277.1673.python-l...@python.org, Robert Kern wrote: On 2010-08-10 21:57 , Lawrence D'Oliveiro wrote: In message abe9b308-db83-4ca8-a71a-12d2025a7...@i31g2000yqm.googlegroups.com, Alex Barna wrote: On Aug 10, 10:05 am, Lawrence D'Oliveiro Can’t understand

Re: GUI automation tool (windows)

2010-08-10 Thread Lawrence D'Oliveiro
In message i3t449$7c...@reader1.panix.com, 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

Re: GUI automation tool (windows)

2010-08-10 Thread Ben Finney
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message i3t449$7c...@reader1.panix.com, 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

  1   2   3   >