Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Randal L. Schwartz
ak project (Alan Kay, Dan Ingalls, and I'm leaving someone out, I know it...). So please remove Smalltalk from that list. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Com

Re: installing numpy

2006-05-09 Thread Raymond L. Buvel
Robert Kern wrote: > Gary Wessle wrote: > >>"Raymond L. Buvel" <[EMAIL PROTECTED]> writes: > > >>>When installing from source on a Debian system, you want the installed >>>package to wind up in /usr/local/lib/python2.x/site-packages (where x

Re: installing numpy

2006-05-10 Thread Raymond L. Buvel
Gary Wessle wrote: > Robert Kern <[EMAIL PROTECTED]> writes: > > >>Raymond L. Buvel wrote: >> >> >>>Since you are a new Linux user, you should definitely follow Robert's >>>advice about building as an ordinary user separately from the

Re: Decimal and Exponentiation

2006-05-20 Thread Raymond L. Buvel
elventear wrote: > Hi, > > I am the in the need to do some numerical calculations that involve > real numbers that are larger than what the native float can handle. > > I've tried to use Decimal, but I've found one main obstacle that I > don't know how to sort. I need to do exponentiation with re

Re: Decimal and Exponentiation

2006-05-20 Thread Raymond L. Buvel
Tim Peters wrote: > The GNU GMP library (for which Python bindings are available) also > supports "big floats", but their power operation is also restricted to > integer powers and/or exact roots. This can be painful even to try; > e.g., > >>>> from gmpy import mpf >>>> mpf("1e1") *

Re: Decimal and Exponentiation

2006-05-20 Thread Raymond L. Buvel
Tim Peters wrote: > [Raymond L. Buvel, on >http://calcrpnpy.sourceforge.net/clnumManual.html > ] > >> The clnum module handles this calculation very quickly: >> >> >>> from clnum import mpf >> >>> mpf("1e1") ** mpf("3.

chop() and empty() functions

2006-05-26 Thread Jeremy L. Moles
I've been using the following lambda/function for a number of months now (I got the idea from someone in #python, though I don't remember who): def chop(s, n): """Chops a sequence, s, into n smaller tuples.""" return zip(*[iter(s)] * n) ...or... chop = lambda s, n: zip(*[iter(s)

Re: chop() and empty() functions

2006-05-26 Thread Jeremy L. Moles
On Sat, 2006-05-27 at 06:22 +1000, John Machin wrote: > On 27/05/2006 2:54 AM, Jeremy L. Moles wrote: > > ["chop" snipped] > > > > > Furthermore, what do people think about the idea of adding a truly > > empty, no-op global lambda somewhere in Python? I

Re: Mix different C source files into a single one

2007-12-29 Thread Michael L Torrie
Horacius ReX wrote: > Hi, > > I have a C program split into different source files. I am trying a > new compiler and for some reason it only accepts a single source file. > So I need to "mix" all my different C source files into a single one. > > Do you know about some type of python script able

Re: Linux/Win32 func. to get Python instdir (not exedir) + site-packages => extensions mgmt

2008-01-20 Thread Michael L Torrie
pythonewbie wrote: > Hi all, > > I am newbie in Python, my wish would be to create python applications > for both Linux/Win32. > > I am stucked on creating a function to get the Python install > directory (and site-packages directory) with a 100% reliable method... > > My goal is to verify if an

Re: Client side GUI-like web framework ?

2008-02-04 Thread Michael L Torrie
USCode wrote: > [EMAIL PROTECTED] wrote: >> You just described what XUL aims to be >> http://developer.mozilla.org/en/docs/The_Joy_of_XUL >> http://developer.mozilla.org/en/docs/XULRunner >> >> At present it lacks for sure documentation (or maybe it isn't >> organized really well) > > Just took a

Re: Client side GUI-like web framework ?

2008-02-04 Thread Michael L Torrie
USCode wrote: > Michael L Torrie wrote: >> But it is served up in the firefox web browser. A good example is: >> >> http://www.faser.net/mab/chrome/content/mab.xul >> > That's pretty slick, but unfortunately then you're locked into only the > Fire

Re: Last 4 Letters of String

2008-02-21 Thread Michael L Torrie
Robert Rawlins - Think Blue wrote: > Hello Guys, > > > > I'm looking for a function which will give me the last 4 characters of a > given string. I'm sure it's a very simple task but I couldn't find anything > of it. Use the same technique as you'd use slicing a list. http://www.diveintopytho

Re: Professional Grant Proposal Writing Workshop (April 2008: Vancouver, British Columbia)

2008-02-22 Thread Michael L Torrie
Anthony Jones wrote: > The Grant Institute's Grants 101: Professional Grant Proposal Writing > Workshop > will be held in Vancouver, British Columbia, April 14 - 16, 2008. Interested > development professionals, researchers, faculty, and graduate students should > register as soon as possible,

Re: Hi

2008-03-06 Thread Michael L Torrie
[EMAIL PROTECTED] wrote: > Hello > > can u plz tell how to send and read msg from device(telit-863-GPS) and > the coding is in python. > > if this can happen then plz send the source code to my mail account Sounds like a new development model. You should patent this. Just e-mail lists with cry

Re: math module for Decimals

2008-12-29 Thread Raymond L. Buvel
Since the interest is more in extended precision than in decimal representation, there is another module that may be of interest. http://calcrpnpy.sourceforge.net/clnum.html It interfaces to the Class Library for Numbers (CLN) library to provide both arbitrary precision floating point and comp

Re: Why not Ruby?

2009-01-01 Thread Randal L. Schwartz
at will grow to much more after this post), most are r> from my supposed "brothers" here at c.l.py. Just letting you know r> there are open minded people out here. I would hate to live in a world r> that did not contain an Xah lee. Since Usenet has neither "stars" n

PythonWin --> drwatson

2008-10-17 Thread Frank L. Thiel
I have installed PythonWin from the distribution. When I try to open it, the message "PyWin32 has encountered a problem ..." appears, and a drwatson error report is generated. Python 2.6 itself, from a cmd window or using IDLE, works without problem. I cannot find any reports of similar beh

Re: PythonWin --> drwatson

2008-10-18 Thread Frank L. Thiel
On 18-Oct-08 01:39, this message was sent by Allan: "Frank L. Thiel" <[EMAIL PROTECTED]> writes: I have installed PythonWin from the distribution. When I try to open it, the message "PyWin32 has encountered a problem ..." appears, and a drwatson error report is gen

Re: PythonWin --> drwatson

2008-10-18 Thread Frank L. Thiel
On 18-Oct-08 16:31, this message was sent by Dennis Lee Bieber: On Sat, 18 Oct 2008 15:00:03 GMT, "Frank L. Thiel" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: Thanks for your reply, Allan. I am not sure what you mean by "the Windows installer pac

Re: PythonWin --> drwatson

2008-10-21 Thread Frank L. Thiel
On 21-Oct-08 03:22, this message was sent by Gabriel Genellina: En Sat, 18 Oct 2008 18:14:46 -0300, Frank L. Thiel <[EMAIL PROTECTED]> escribió: On 18-Oct-08 16:31, this message was sent by Dennis Lee Bieber: Do you have a version of python 2.6 installed? (I'm surprised the

Re: how to arrange classes in .py files?

2009-03-27 Thread David L. Jones
On Mar 26, 8:51 pm, Kent wrote: > ... Is > there any convention how to manage python classes into .py files? > > ... > In above packages, each .py file contains one python class. And > ClassName = Filename > > ... > Can anyone give some hint on it? would be great with reason. > Overall, I don't t

sqlite3, qmarks, and NULL values

2009-05-19 Thread Mitchell L Model
Suppose I have a simple query in sqlite3 in a function: def lookupxy(x, y): conn.execute("SELECT * FROM table WHERE COL1 = ? AND COL2 = ?", (x, y)) However, COL2 might be NULL. I can't figure out a value for y that would retrieve rows for which COL2 is NULL. It s

Re: Code correctness, and testing strategies

2008-05-24 Thread Michael L Torrie
David wrote: > Seriously, 10 hours of testing for code developed in 10 hours? What > kind of environment do you write code for? This may be practical for > large companies with hordes of full-time testing & QA staff, but not > for small companies with just a handful of developers (and where you > n

Re: Zope/DTML Infuriating...

2008-05-01 Thread Michael L Torrie
Michael Torrie wrote: > The second example, x = Integer.fromString('5') demonstrates a huge > weakness in Java. Ahem. Javascript. Sorry. -- Michael Torrie Assistant CSR, System Administrator Chemistry and Biochemistry Department Brigham Young University Provo, UT 84602 +1.801.422.5771 A: Be

Having to "print" before method invocation?

2006-03-08 Thread Jeremy L. Moles
I have an object (written as part C extension, part pure Python) called foo that I've been using without much fuss for a few months now. However, in my latest project (a rather large one involving multi-threading, pygtk, etc.), I'm seeing some really strange behavior with a particular instance of m

Re: Having to "print" before method invocation?

2006-03-08 Thread Jeremy L. Moles
Hey Fredrik, thanks for responding. :) Your posts are always helpful and informative! On Wed, 2006-03-08 at 15:41 +0100, Fredrik Lundh wrote: > Jeremy L. Moles wrote: > > >I have an object (written as part C extension, part pure Python) called > > foo that I've been using

grayscale pixel based graphics with pygame

2006-03-08 Thread Brian L. Troutwine
I've recently begun to teach myself pygame by making a bunch of small toys. My current toy is cellular automata displayer and I've gotten a bit stuck on the displaying bit. (If automata isn't the plural of automaton please forgive me.) The current automata are only binary and are calculated using 2

Re: grayscale pixel based graphics with pygame

2006-03-09 Thread Brian L. Troutwine
Thank you, but that wasn't quite what I was looking for. I do admit, however, that my post wasn't very clear (writting while exceptionally tired is not a very clever thing to do.) As Terry mentioned below this should be a question for the pygame mailing lists, so I'll take it there. Thanks again t

Re: grayscale pixel based graphics with pygame

2006-03-09 Thread Brian L. Troutwine
Geez, I apologize for my post being so vague. I was terribly tired when I wrote that, and should have known better than to post. I was not aware of the pygame mailing list. I will take this question there. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python has a new Logo

2006-03-26 Thread Randal L. Schwartz
ants, and it still works. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! **

Pylint-like source code reformatter

2006-03-30 Thread Brian L. Troutwine
I've recently developed a need for a python source code re-formatter, ideally conforming to the sort of style that pylint enforces. I don't know of any, and my googling wasn't very productive. Does anyone know of anything? Stand-alone or vim based both work for me, though stand-alone would be prefe

Re: symbolic links, aliases, cls clear

2006-04-12 Thread Floyd L. Davidson
he proper sequence should be obtained from the appropriate database (TERMINFO or TERMCAP), and the easy way to do that is, tput clear -- Floyd L. Davidson<http://www.apaflo.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) [EMAIL PROTECTED] -- http://m

Re: symbolic links, aliases, cls clear

2006-04-12 Thread Floyd L. Davidson
for your Python program. Note that if /clear/ does work, but you want this script to use /cls/ so that it is portable to some silly OS where a /cls/ exists... You can define a shell function (which will be inherited by sub-shells) to look like this, function cls () { clear; } And p

Re: symbolic links, aliases, cls clear

2006-04-12 Thread Floyd L. Davidson
Keith Thompson <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Floyd L. Davidson) writes: >> [EMAIL PROTECTED] wrote: >>>If I may recommend an alternative, >>> >>>print "\033[H\033[J" >>> >>>the ansi sequence to clear the sc

Re: symbolic links, aliases, cls clear

2006-04-12 Thread Floyd L. Davidson
"Chris F.A. Johnson" <[EMAIL PROTECTED]> wrote: >On 2006-04-12, Floyd L. Davidson wrote: >> Keith Thompson <[EMAIL PROTECTED]> wrote: >>>>tput clear >>> >>>(Or "clear".) >> >> But /clear/ merely uses "tpu

One function calling another defined in the same file being exec'd

2010-01-07 Thread Mitchell L Model
[Python 3.1] I thought I thoroughly understood eval, exec, globals, and locals, but I encountered something bewildering today. I have some short files I want to exec. (Users of my application write them, and the application gives them a command that opens a file dialog box and execs the chose

Re: One function calling another defined in the same file being exec'd

2010-01-07 Thread Mitchell L Model
I forgot to offer one answer for question [3] in what I just posted: I can define all the secondary functions inside one main one and just call the main one. That provides a separate local scope within the main function, with the secondary functions defined inside it when (each time) the ma

Re: One function calling another defined in the same file being exec'd

2010-01-08 Thread Mitchell L Model
On Jan 7, 2010, at 10:45 PM, Steven D'Aprano > wrote an extensive answer to my questions about one function calling another in the same file being exec'd. His suggestion about printing out locals() and globals() in the various possible places provided the clues to explain what was going on.

Re: One function calling another defined in the same file being exec'd

2010-01-08 Thread Mitchell L Model
On Jan 8, 2010, at 9:55 AM, "Gabriel Genellina" p...@yahoo.com.ar> wrote: Ok - short answer or long answer? Short answer: Emulate how modules work. Make globals() same as locals(). (BTW, are you sure you want the file to run with the *same* globals as the caller? It sees the dofile() fun

Re: Append to an Excel file

2010-01-09 Thread Niels L. Ellegaard
pp writes: > On Jan 9, 1:47 am, Jason Scheirer wrote: >> On Jan 9, 12:30 am, pp wrote: >> >> > Hi All, >> >> > How do I add a line to an existing file. This should append to the >> > existing data in the excel file, which was saved previously. >> >> > Thanks, >> > PP >> >> http://pypi.python.or

Re: Python-list Digest, Vol 76, Issue 97

2010-01-09 Thread Mitchell L Model
On Jan 8, 2010, at 7:35:39 PM EST, Terry Reedy wrote: On 1/8/2010 12:02 PM, Mitchell L Model wrote: On further reflection, I will add that what appears to be happening is that during import both the global and local dictionaries are set to a copy of the globals() from the importing

sys.stdout vs. sys.stderr

2010-01-10 Thread Mitchell L Model
In Python 3.1 is there any difference in the buffering behavior of the initial sys.stdout and sys.stderr streams? They are both line_buffered and stdout doesn't seem to use a larger-grain buffering, so they seem to be identical with respect to buffering. Were they different at some earlier

Re: I really need webbrowser.open('file://') to open a web browser

2010-01-27 Thread Mitchell L Model
On Jan 15, 2010, at 3:59 PM, Timur Tabi After reading several web pages and mailing list threads, I've learned that the webbrowser module does not really support opening local files, even if I use a file:// URL designator. In most cases, webbrowser.open() will indeed open the default web brow

Re: I really need webbrowser.open('file://') to open a web browser

2010-01-27 Thread Mitchell L Model
On Jan 27, 2010, at 3:31 PM, Timur Tabi wrote: On Wed, Jan 27, 2010 at 12:29 PM, Mitchell L Model wrote: I had some discussions with the Python documentation writers that led to the following note being included in the Python 3.1 library documentation for webbrowser.open: "Note th

Re: python 3's adoption

2010-01-28 Thread Mitchell L Model
I have been working with Python 3 for over a year. I used it in writing my book "Bioinformatics Programming Using Python" (http://oreilly.com/catalog/9780596154509 ). I didn't see any point in teaching an incompatible earlier version of a language in transition. In preparing the book and its e

Re: python 3's adoption

2010-01-28 Thread Mitchell L Model
On Jan 28, 2010, at 12:00 PM, python-list-requ...@python.org wrote: From: Roy Smith Date: January 28, 2010 11:09:58 AM EST To: python-list@python.org Subject: Re: python 3's adoption In article , Mitchell L Model wrote: I use the sep and end keywords all the time. What are 

Re: python 3's adoption

2010-01-28 Thread Mitchell L Model
On Jan 28, 2010, at 1:40 PM, Terry Reedy wrote ... On 1/28/2010 11:03 AM, Mitchell L Model wrote: I have been working with Python 3 for over a year. ... I agree completely. Such sweet words to read! Conversion of old code is greatly facilitied by the 2to3 tool that comes with

Copying a ZipExtFile

2009-10-23 Thread Moore, Mathew L
Hello all, A newbie here. I was wondering why the following fails on Python 2.6.2 (r262:71605) on win32. Am I doing something inappropriate? Interestingly, it works in 3.1, but would like to also get it working in 2.6. Thanks in advance, --Matt import io import shutil import tempfile import

RE: Copying a ZipExtFile

2009-10-26 Thread Moore, Mathew L
> En Fri, 23 Oct 2009 14:15:33 -0300, Moore, Mathew L > > escribió: > > > with io.BytesIO() as memio: > > shutil.copyfileobj(f, memio) > > zip = zipfile.ZipFile(file=memio) > > # Can't use zip.extract(), because I want to

RE: Copying a ZipExtFile

2009-10-29 Thread Moore, Mathew L
> On October 28, 2009 8:33 PM, "ryles" wrote: > > > with io.BytesIO() as memio: > > shutil.copyfileobj(f, memio) > > zip = zipfile.ZipFile(file=memio) > > # Can't use zip.extract(), because I want to ignore paths > > # within archive. > > src = zip.open(

lists as an efficient implementation of large two-dimensional arrays(!)

2010-02-02 Thread Mitchell L Model
An instructive lesson in YAGNI ("you aren't going to need it"), premature optimization, and not making assumptions about Python data structure implementations. I need a 1000 x 1000 two-dimensional array of objects. (Since they are instances of application classes it appears that the array m

Python won't run

2010-02-18 Thread Nardin, Cory L.
Quickly, I have a Mac Intel with Windows XP installed. Tried installing Python 2.6.4 from the binary and also ActivePython 2.6.4.10. Both installations acted the same. There seemed to be no problems during installation (used default options), but when I try to run Python I get an error message:

RE: Python won't run

2010-02-23 Thread Nardin, Cory L.
computer and the fact that it isn't there is the sign of some other problem? Thanks Cory From: Sridhar Ratnakumar [mailto:sridh...@activestate.com] Sent: Monday, February 22, 2010 11:54 AM To: Nardin, Cory L. Cc: python-list@python.org Subject: Re: P

CGI, POST, and file uploads

2010-03-02 Thread Mitchell L Model
Can someone tell me how to upload the contents of a (relatively small) file using an HTML form and CGI in Python 3.1? As far as I can tell from a half-day of experimenting, browsing, and searching the Python issue tracker, this is broken. Very simple example: http://localhost

CGI, POST, and file uploads

2010-03-03 Thread Mitchell L Model
On Mar 2, 2010, at 4:48 PM, I wrote: Can someone tell me how to upload the contents of a (relatively small) file using an HTML form and CGI in Python 3.1? As far as I can tell from a half-day of experimenting, browsing, and searching the Python issue tracker, this is broken. followed by

Re: sys.stdout vs. sys.stderr

2010-03-09 Thread Mitchell L Model
On Jan 11, 2010, at 1:47 PM Nobody wrote: On Mon, 11 Jan 2010 10:09:36 +0100, Martin v. Loewis wrote: In Python 3.1 is there any difference in the buffering behavior of the initial sys.stdout and sys.stderr streams? No. Were they different at some earlier point in Python's evolution?

Re: Some PyCon videos won't play

2010-03-14 Thread Niels L. Ellegaard
Lee Harr writes: > I am having a great time watching videos from PyCon. Thanks to > everyone who presented, and to those who did such a great job > putting the videos up at: http://pycon.blip.tv/ > > My trouble is that, although most of the videos play perfectly, > there are a few that refuse to

Re: Scheme as a virtual machine?

2010-11-26 Thread Benjamin L. Russell
ment. However, the odds of this happening are less likely in a single thread. The odds of this happening are even less likely for three people in the thread. The odds of this happening are even less likely for three *new* people in the same thread at the same time -- Benjamin L. Russell --

Re: Scheme as a virtual machine?

2010-11-26 Thread Benjamin L. Russell
dekudekup...@yahoo.com (Benjamin L. Russell) writes: > When I was a student at my college, one of the students once told me a > secret about how a computer program ran by a professor for a course in > introduction to systems programming checked to ensure that the students > who wer

Re: Google AI challenge: planet war. Lisp won.

2010-12-04 Thread Benjamin L. Russell
t; games <- > pornography > adulteries > sex Yeah, riiight. So it's a crime to have any fun in life, right? Go get a life. -- Benjamin L. Russell -- http://mail.python.org/mailman/listinfo/python-list

Re: OSError: [Errno 26] Text file busy during subprocess.check_call() :seems os dependent

2010-12-30 Thread Thomas L. Shinnick
At 03:46 PM 12/30/2010, harijay wrote: Hi, I am writing some multithreaded code which aims to automate three sequential data processing applications and distribute the processing on my 16GB RAM, 64 bit Ubuntu box running Python 2.6.5 The basic class that orchestrates these jobs use Queue.Queue()

What INI config file module allows lists of duplicate same-named options?

2011-01-09 Thread Thomas L. Shinnick
Having (possibly) surveyed all the available pypi config file modules, I still haven't seen one that allows an obvious and familiar extension of the strict Windows INI format. Each INI-style config module seems to enforce the strict rule: each option in a section must have a different name - n

Re: What INI config file module allows lists of duplicate same-named options?

2011-01-09 Thread Thomas L. Shinnick
At 02:47 PM 1/9/2011, Corey Richardson wrote: On 01/09/2011 03:43 PM, Thomas L. Shinnick wrote: > Having (possibly) surveyed all the available pypi config file modules, I > still haven't seen one that allows an obvious and familiar extension of > the strict Windows INI format. >

Re: What INI config file module allows lists of duplicate same-named options?

2011-01-09 Thread Thomas L. Shinnick
At 02:52 PM 1/9/2011, Stefan Sonnenberg-Carstens wrote: Am 09.01.2011 21:43, schrieb Thomas L. Shinnick: Having (possibly) surveyed all the available pypi config file modules, I still haven't seen one that allows an obvious and familiar extension of the strict Windows INI format. Eac

Re: WxPython versus Tkinter.

2011-01-24 Thread Thomas L. Shinnick
At 10:39 PM 1/24/2011, Jason Swails wrote: [snip] Two valuable things I have taken away from this extended argument: 1) This being my first super-high volume mailing list with the occasional neurotically opinionated poster, MRAB introduced me to Godwin's law for the first time. Considering it

Re: Decorator question

2011-01-26 Thread Thomas L. Shinnick
At 08:17 PM 1/26/2011, Chris wrote: I have a class (A, for instance) that possesses a boolean (A.b, for instance) that is liable to change over an instance's lifetime. Many of the methods of this class (A.foo, for instance) should not execute as long as this boolean is false, but should instead

Re: os.path.join doubt

2011-02-03 Thread Thomas L. Shinnick
At 05:33 PM 2/3/2011, Westley Martínez wrote: On Thu, 2011-02-03 at 23:11 +, Steven D'Aprano wrote: On Thu, 03 Feb 2011 07:58:55 -0800, Ethan Furman wrote: > Steven D'Aprano wrote: [snip] Yes. Is there a problem? All those paths should be usable from Windows. If you find it ugly to see path

Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-09 Thread Thomas L. Shinnick
"grep"... and the last invocation was given only one arg!! IT FOUND THE PATTERN, BUT DIDN'T TELL ME WHAT !@^%!$@#@! FILE IT WAS IN!! :-{ The trailing "/dev/null" fixes that. ;-} I find that I need periodic review of the grep -l -L -h and -H options . I'm surpr

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-13 Thread Thomas L. Shinnick
At 01:18 PM 2/13/2011, rantingrick wrote: If any tutorial owners refuse to cooperate we need to remove their tutorials (and/or links to their tutorials) from the official Python website forever. How many tutorials have you written? In a city I used to live in, a long while ago, ... You would

invoking a method from two superclasses

2009-06-30 Thread Mitchell L Model
In Python 3, how should super() be used to invoke a method defined in C that overrides its two superclasses A and B, in particular __init__? class A: def __init__(self): print('A') class B: def __init__(self): print('B') class C(A, B):

Re: invoking a method from two superclasses

2009-06-30 Thread Mitchell L Model
Allow me to add to my previous question that certainly the superclass methods can be called explicitly without resorting to super(), e.g.: class C(A, B): def __init__(self): A.__init__(self) B.__init__(self) My question is really whether there is any way of get

Re: invoking a method from two superclasses

2009-06-30 Thread Mitchell L Model
>From: Scott David Daniels >Date: Tue, 30 Jun 2009 16:49:18 -0700 >Message-ID: >Subject: Re: invoking a method from two superclasses > >Mitchell L Model wrote: >>In Python 3, how should super() be used to invoke a method defined in C > > that overrides its two super

Re: invoking a method from two superclasses

2009-07-01 Thread Mitchell L Model
[Continuing the discussion about super() and __init__] The documentation of super points out that good design of diamond patterns require the methods to have the same signature throughout the diamond. That's fine for non-mixin classes where the diamond captures different ways of handling the sa

Re: Help understanding the decisions *behind* python?

2009-07-20 Thread Niels L. Ellegaard
Phillip B Oldham writes: > We often find we need to do manipulations like the above without > changing the order of the original list, and languages like JS allow > this. We can't work out how to do this in python though, other than > duplicating the list, sorting, reversing, then discarding. If

GUI interface builder for python

2009-08-16 Thread l...@d@n
Which is the best GUI interface builder with drag and drop capabilities. I am using Ubuntu GNU/Linux. Please help me. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Strong typing vs. strong testing"

2010-09-27 Thread Scott L. Burson
Pascal J. Bourguignon wrote: On the other hand, with the dynamic typing mindset, you might even wrap your values (of whatever numerical type) in a symbolic expression mentionning the unit and perhaps other meta data, so that when the other module receives it, it may notice (dynamically) that two

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Scott L. Burson
Ian Collins wrote: On 09/30/10 05:57 PM, RG wrote: I'm not saying one should not use compile-time tools, only that one should not rely on them. "Compiling without errors" is not -- and cannot ever be -- be a synonym for "bug-free." We is why we all have run time tools called unit tests, don't

Re: "Strong typing vs. strong testing"

2010-09-30 Thread Scott L. Burson
Pascal J. Bourguignon wrote: Squeamizh writes: In short, static typing doesn't solve all conceivable problems. We are all aware that there is no perfect software development process or tool set. I'm interested in minimizing the number of problems I run into during development, and the number

RE: Regular Expressions, Speed, Python, and NFA

2017-04-14 Thread Joseph L. Casale
-Original Message- From: Python-list [mailto:python-list- bounces+jcasale=activenetwerx@python.org] On Behalf Of Malik Rumi Sent: Friday, April 14, 2017 9:12 AM To: python-list@python.org Subject: Regular Expressions, Speed, Python, and NFA > I am running some tests using the site rege

RE: Python DB API - commit() v. execute("commit transaction")?

2017-05-30 Thread Joseph L. Casale
-Original Message- From: Python-list [mailto:python-list- bounces+jcasale=activenetwerx@python.org] On Behalf Of Ian Kelly Sent: Tuesday, May 30, 2017 8:12 AM To: Python Subject: Re: Python DB API - commit() v. execute("commit transaction")? > There's no difference I'm aware of in the

PAMELA DAVID

2007-05-18 Thread g - a - l - l - e - r - y
PAMELA DAVID www.alphasearch.gr -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Paul L. Du Bois
Alex Martelli wrote: > We should have an Evilly Cool Hack of the Year, and I nominate > Paul Du Bois's one as the winner for 2004. Do I hear any second...? Oh bother, I just realized I sent my first reply using a good email address. Hope that cancel goes through quickly. Anyway, thank you! I'v

Re: OpenSource documentation problems

2005-09-01 Thread Fred L. Drake, Jr.
rtunately, not enough time was available from people with sufficient Roundup know-how to finish that effort. I still think that would be really nice. -Fred -- Fred L. Drake, Jr. -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2004-12-30 Thread Paul L. Du Bois
Jp Calderone wrote: > I'm not saying "boo hoo lambdas are crippled fix them waah". I'm saying > "Lambdas and generator comprehensions are not comparable in this sense and > arguments based on one should not be used to support positions about the > other". This post and Michael Spencer's post wh

Re: Python docs [was: function with a state]

2005-03-24 Thread Paul L. Du Bois
Xah Lee wrote: > I think i'll just post snippets of my comments as i find them. (and > feel like exposing) > [ snipped ] That is a very good analysis. Can you submit a documentation patch? I would, but I'm too lazy to contribute. That doesn't mean I'm not thankful for your efforts, though! p

Queue.Queue-like class without the busy-wait

2005-03-24 Thread Paul L. Du Bois
Has anyone written a Queue.Queue replacement that avoids busy-waiting? It doesn't matter if it uses os-specific APIs (eg WaitForMultipleObjects). I did some googling around and haven't found anything so far. Because I know someone will ask: no, the busy-waiting hasn't been a problem in my app. I

Re: Queue.Queue-like class without the busy-wait

2005-03-24 Thread Paul L. Du Bois
Peter Hansen wrote: > I don't believe the term "busy-wait" applies here. > [Explanation] Yes, well, you're right. I was thinking of calling it "slacker-waiting" but didn't want to come off too cute. p -- http://mail.python.org/mailman/listinfo/python-list

Re: Example Code - Named Pipes (Python 2.4 + ctypes on Windows)

2005-03-25 Thread Paul L. Du Bois
Srijit Kumar Bhadra wrote: > Hello, > Here is an example of Multithreaded Pipe Server and Client using the > excellent ctypes library (Windows). Coincidentally, the other day I just used named pipes in for the first time. I recommend using the excellent win32api extension; I believe it is includ

How do I stop Python IDLE (GUI) from immediately exiting when I enter it?

2006-11-18 Thread John (Z R) L
Hi all, I am very new to programming, and I chose to study the Python language before C++. I am currently using the Wikibooks "Non-Programmer's Tutorial for Python", and am up to the section "Who goes there"? http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python/Who_Goes_There%3F Bu

Re: How do I stop Python IDLE (GUI) from immediately exiting when I enter it?

2006-11-19 Thread John (Z R) L
Thanks for the replies so far. I do exactly what that website says, and on the old computer (Windows 98), I click run module and nothing happens. No text gets displayed on my IDLE. It contained that firewall message at the top. Back on the new computer, I deleted all of my .py files and I could go

Trouble opening files

2006-01-28 Thread Westbrook, Christopher L (WESTBCL04)
I am having some trouble, and I can't figure out why. I'm trying to use the simple keylogger project from source forge, and then create a web interface to open the resulting files, so people from the outside can see the keys logged on a server. I've got the keylogger script working fine, and I ha

Your confirmation is required to join the TECHWR-L mailing list

2007-09-17 Thread techwr-l-confirm+22d099e2f3d881b010eaeb38c05837f62bbf60ad
Mailing list subscription confirmation notice for mailing list TECHWR-L We have received a request from python-list@python.org for subscription of your email address, "python-list@python.org", to the [EMAIL PROTECTED] mailing list. To confirm that you want to be added to this ma

Re: How to use time.clock() function in python

2007-01-22 Thread samuel . y . l . cheung
Thanks. I have a fuction called 'func1'. def func1: # logic of the function When my script just call 'func1()' it works. func1() But when put it under timerit.Timer, like this: t = timeit.Timer("func1()","") t.repeat(1, 10) # want to time how long it takes to run 'func1' 10 times, I get a

Re: How to use cmp() function to compare 2 files?

2007-02-27 Thread samuel . y . l . cheung
On Feb 27, 12:07 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > wrote: > > > File "./scripts/regressionTest.py", line 30, in getSnapShot > > if (difflib.context_diff(f1.readlines(), f2.readlines()).len() == > > 0): > > # no diffe

Re: Modifying the value of a float-like object

2009-04-24 Thread C or L Smith
I happened across the recent discussion and found it very interesting as I have been dusting off and trying to get ready a module that I had made that created a number class that handled numeric values and uncertainties in computations by computing (via overloaded operators) a new value and unce

Re: Parsing text

2009-05-06 Thread C or L Smith
> Hi, > I'm trying to write a fairly basic text parser to split up scenes and > acts in plays to put them into XML. I've managed to get the text split > into the blocks of scenes and acts and returned correctly but I'm > trying to refine this and get the relevant scene number when the split > is ma

Re: Deformed Form

2010-06-10 Thread Stephen Hansen (L/P)
On 6/10/10 7:14 AM, Victor Subervi wrote: > Hi; > I have a script that calls values from the form that calls it. This script > imports another script: > > from New_Passenger import New_Passenger > > def create_edit_passengers3(): > ... > new_passengers_curr_customers = New_Passengers_Curr_Cus

PyWin editor modification

2009-09-12 Thread C or L Smith
The PyWin editor that comes with the Windows distribution is a great little workhorse. If you have used it you perhaps notice how it intelligently works with spaces and indentation, e.g. after typing the word 'pass' and pressing enter it dedents one level as you would probably desire. It also st

where is ctrl+newline handled in pywin editor?

2009-09-21 Thread C or L Smith
I use the pywin environment on Windows for python code editing and interactive environment. I've been able to find the place in the editor files where the enter key is handled and where the whitespace is stripped from a line and I've been able to get it to not leave any white space when a doub

<    1   2   3   4   5   6   7   >