naming and binding (subtle Python 3 change)

2009-01-29 Thread Alan G Isaac
syntax. Should the example be changed to make that clear? Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: naming and binding (subtle Python 3 change)

2009-01-30 Thread Alan G Isaac
On 1/29/2009 10:50 PM Terry Reedy apparently wrote: http://bugs.python.org/issue5106 Thanks! Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: what IDE is the best to write python?

2009-02-03 Thread Alan G Isaac
On 2/1/2009 2:42 AM mcheun...@hotmail.com apparently wrote: Hi all what IDE is the best to write python? http://blog.sontek.net/2008/05/11/python-with-a-modular-ide-vim/ Alan Isaac PS Also maybe see: http://vim.sourceforge.net/scripts/script.php?script_id=30 http://www.builderau.com.au

Re: Creating custom formatter function

2009-02-16 Thread Alan G Isaac
-formatting As for the last: "values must be a tuple with exactly the number of items specified by the format string, or a single mapping object (for example, a dictionary)" unless you need only a single argument in your format string. hth, Alan Isaac -- http://mail.python.org/mailma

get descriptor from instance

2009-02-18 Thread Alan G Isaac
e property object. But this will not work if the property is inherited. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: block dynamic attribute creation (was: get descriptor from instance)

2009-02-18 Thread Alan G Isaac
On 2/18/2009 6:15 PM Gabriel Genellina apparently wrote: type(a).x OK, that's good. I'd like to sometimes lock attribute creation on instances of a class but still allow properties to function correctly. Will something like below be satisfactory? Thanks, Alan def __setattr__(

Re: block dynamic attribute creation

2009-02-19 Thread Alan G Isaac
if hasattr(self, attr): #update val self.__dict__[attr] = val On 2/19/2009 3:54 AM Gabriel Genellina apparently wrote: In particular, your code prevents using class attributes as a default value for instance attributes Doesn't the above allow that? Thanks, Alan --

Re: block dynamic attribute creation

2009-02-19 Thread Alan G Isaac
On 2/19/2009 3:47 AM Bruno Desthuilliers apparently wrote: if not hasattr(self, attr) and getattr(self, '_attrlock', False): raise AttributeError(yadda yadda) # NB: assume newstyle class super(YourClass, self).__setattr__(attr, val) Thanks. Alan PS Thanks a

Re: end of print = lower productivity ?

2008-12-01 Thread Alan G Isaac
., the new `print` function). Presumably many would find this a repulsive redundancy and a needless maintenance headache. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: New Book: Programming in Python 3

2008-12-04 Thread Alan G Isaac
d to using e.g., LaTeX or reStructuredText). Anyway, congrats on the book! I've asked my library to order it. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: simplest way to strip a comment from the end of a line?

2008-12-04 Thread Alan G Isaac
s is a test #with a comment", comments=True) ['this', 'is', 'a', 'test'] >>> split("this is a '#gnarlier' test #with a comment", comments=True) ['this', 'is', 'a', '#gnarlier', 'test'] http://docs.python.org/library/shlex.html It would be nice to have this example included in the module docs... Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: "as" keyword woes

2008-12-04 Thread Alan G Isaac
d why anyone would object to this perfectly cogent complaint of Warren's. Even if the deprecation warnings had not been invisible, the complaint would be valid. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: OOP books?

2008-10-15 Thread Alan G Isaac
Mike Driscoll wrote: I have yet to read a Python book that only focuses on the OOP part, http://www.amazon.com/Scripting-Objects-Comparative-Presentation-Object-Oriented/dp/047039725X fwiw, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

read zipfile sequentially?

2008-10-15 Thread Alan G Isaac
, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: read zipfile sequentially?

2008-10-15 Thread Alan G Isaac
On 10/15/2008 3:13 PM Tim Chase apparently wrote: http://mail.python.org/pipermail/python-list/2007-December/469320.html Ask and ye shall receive... Thank you! Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: OOP books?

2008-10-15 Thread Alan G Isaac
ation-Object-Oriented/dp/B00179EUEA/ref=sr_1_2?ie=UTF8&s=books&qid=1224105582&sr=1-2> and found it very good. (However, I am not in CS, so caveat emptor.) Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

iter with stepsize

2008-10-15 Thread Alan G Isaac
If I have a sequence, I can get every other or every fifth element by slicing. Is there an equivalent for iterators? More specifically, I want every fifth line of a big file. What is the most efficient way to get them? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: iter with stepsize

2008-10-15 Thread Alan G Isaac
Alan G Isaac <[EMAIL PROTECTED]> writes: If I have a sequence, I can get every other or every fifth element by slicing. Is there an equivalent for iterators? On 10/15/2008 11:12 PM Paul Rubin apparently wrote: itertools.islice Oh, of course. I'm a bit embarrassed not to have

bibtex parsing

2008-10-17 Thread Alan G Isaac
with PyParsing? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: bibtex parsing

2008-10-17 Thread Alan G Isaac
ately. Thanks! Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: [SciPy-user] ANN: Python programs for epidemic modelling

2008-10-25 Thread Alan G Isaac
On 10/25/2008 4:14 PM I. Soumpasis apparently wrote: http://blog.deductivethinking.com/?p=29 This is cool. But I do not see a license. May I hope this is released under the new BSD license, like the packages it depends on? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python

Re: [Numpy-discussion] [SciPy-user] ANN: Python programs for epidemic modelling

2008-10-25 Thread Alan G Isaac
license s/he prefers. But a GPL license means that some people will avoid your code, so you make wish to make sure you thought the licensing issue for this code carefully. As a point of comparison, note that all your package dependencies have a new BSD license. Alan Isaac -- http://mail.pytho

Re: Replacing cmp with key for sorting

2008-11-03 Thread Alan G Isaac
s ['a', 'bc', 'bd', 'bcb', 'ba', 'ab'] >>> maxlen = max(len(si) for si in s) >>> def k(si): return si+'z'*(maxlen-len(si)) ... >>> sorted(s,key=k) ['ab', 'a', 'ba', 'bcb', 'bc', 'bd'] Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Free Python Training: Washington, DC (3/3-5)

2009-02-25 Thread Alan G Isaac
Great idea, but if you do it again, a bit more lead time would be helpful. Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Chandler, Python, speed

2009-03-03 Thread Alan G Isaac
unctionalities is it slow, and what evidence if any is there that Python is causing this? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Python parser

2009-03-03 Thread Alan G Isaac
This reminds me: the SimpleParse developers ran into some troubles porting to Python 2.6. It would be great if someone could give them a hand. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Python parser

2009-03-04 Thread Alan G Isaac
2.6 is quite unfortunate. Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python alternatives to Text::SimpleTable?

2009-03-09 Thread Alan G Isaac
http://code.google.com/p/econpy/source/browse/trunk/utilities/text.py -- http://mail.python.org/mailman/listinfo/python-list

Re: Set & Frozenset?

2009-03-09 Thread Alan G Isaac
ak is the most efficient way to get one result. Is this right? (It seems nearly the same.) Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python 3 for scripting?

2009-03-23 Thread Alan G Isaac
yntax. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: script files with python (instead of tcsh/bash)?

2009-03-23 Thread Alan G Isaac
On 3/21/2009 9:26 AM Esmail apparently wrote: I also write out some gnuplot scripts that later get executed to generate .jpg images. See Gnuplot.py Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the difference between generating a value and returning a value?

2009-03-23 Thread Alan G Isaac
would not be a standard way of making that distinction. Alan Isaac (*not* a CS type) -- http://mail.python.org/mailman/listinfo/python-list

tkinter questions: behavior of StringVar, etc

2009-03-28 Thread Alan G Isaac
alue? More generally, why does a StringVar not behave more like a string? Thanks for any insights, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-28 Thread Alan G Isaac
On Mar 28, 2:15 pm, Alan G Isaac wrote: I'm a complete newbie to GUI. I have a couple questions about tkinter. 1. Where is the list of changes in Python 3's tkinter? 2. What exactly is the role of the root object, traditionally created as ``root=tk.Tk()``? What is

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
ot deny the answers might well be in there somewhere. Let's try just these two: - Why does a Variable need a master? - If s is a StringVar instance, why is str(s) its name rather than its value? Thank you, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
t some active user had made a list of changes, which I had overlooked, but that someone on this list would be aware of. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
Alan asked: - Why does a Variable need a master? - If s is a StringVar instance, why is str(s) its name rather than its value? On 3/29/2009 2:46 PM Scott David Daniels apparently wrote: The answer to that, grasshopper, lies in the answer to the question, "What are StringVars designed

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
ohn has since used it: as suggesting something not obvious (to me) was taking place. I had no intent to communicate indignation with this term and indeed am startled that it could be so construed. Is this nuance really universal on this list? Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
7;m inclined to treat you as a "no" vote. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
iscussion. Your willingness to converse with someone whose initial "tone" irritated you has helped me to improve my understanding, and hopefully some future user will find this thread of some use. Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Alan G Isaac
On Mon, 30 Mar 2009 00:13:46 +0100, Alan G Isaac wrote: Since you did not address my question about the nuance of "magic", I'm inclined to treat you as a "no" vote. On 3/29/2009 7:19 PM Rhodri James apparently wrote: And you'd be wrong. So seriously, you&#

Re: email from windows

2009-03-29 Thread Alan G Isaac
://docs.python.org/library/smtplib.html http://docs.python.org/library/email.html Also see: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/67083 Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-30 Thread Alan G Isaac
;s just a guess. Yes, I am making that same guess. Thanks! Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-30 Thread Alan G Isaac
This is a helpful answer: it "feels" right and can be explored further. Thanks, Alan -- http://mail.python.org/mailman/listinfo/python-list

tkFileDialog -> ImportError: No module named shell

2009-04-13 Thread Alan G Isaac
Why do I get the ImportError below? What is the right way to do this? Thanks, Alan Isaac Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

Re: tkFileDialog -> ImportError: No module named shell

2009-04-13 Thread Alan G Isaac
On Apr 13, 11:26 am, Alan G Isaac wrote: Why do I get the ImportError below? What is the right way to do this? Thanks, Alan Isaac Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or

Re: possible pairings in a set

2009-04-13 Thread Alan G Isaac
, 3), (2, 3)] hth, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: DVCSs wreck tkFileDialog

2009-04-14 Thread Alan G Isaac
More info: http://sourceforge.net/mailarchive/forum.php?thread_name=A46CBF978138744AAC019E6FF055EAB70F30AE%40apatlelsmail08.elsys.gtri.org&forum_name=tortoisehg-develop> Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python after a few years of Ruby

2009-04-14 Thread Alan G Isaac
. Is there anything like a Python build tool? (Or do I even need something like that? I haven't worked with any large Python systems, just little things here and there.) http://www.scons.org/wiki/SconsVsOtherBuildTools Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

color propagation in tkinter

2009-04-20 Thread Alan G Isaac
I'm a tkinter novice. If I want to propagate changes to a font, I can just use a named font. What if I want to propagate color changes? (E.g., a change in background color for a number of widgets.) Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: color propagation in tkinter

2009-04-20 Thread Alan G Isaac
On Apr 20, 12:35 pm, Alan G Isaac wrote: If I want to propagate changes to a font, I can just use a named font. What if I want to propagate color changes? (E.g., a change in background color for a number of widgets.) On 4/20/2009 1:59 PM Mike Driscoll apparently wrote: One way would be to

rectangles, or cavases, or ... ?

2009-04-20 Thread Alan G Isaac
on a canvas. Other? Are there obvious considerations in the choice? (Right now I do not need to interact with the squares, but in the future I may need to.) Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: rectangles, or cavases, or ... ?

2009-04-20 Thread Alan G Isaac
eeing into what the trade-offs are. That's my question: what's the basis of your choice? Thanks, Alan PS Am I right that Tkinter does not offer the ability to draw many rectangles in one go (along the lines of the PostScript rectfill operator)? -- http://mail.python.org/mailman/listinfo/python-list

Re: rectangles, or cavases, or ... ?

2009-04-20 Thread Alan G Isaac
implications of this is that your memory usage increases with the more items you draw. Great summary, and you clued me into a bunch of methods I had not explored. Thanks! Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: rectangles, or cavases, or ... ? under Tkinter

2009-04-20 Thread Alan G Isaac
On Apr 20, 5:29 pm, Alan G Isaac wrote: I need to display many (e.e., 2000) small squares whose colors are udpated each time a computation is complete. One approach is to put rectangles on a single canvas. Another approach is to put many canvases in a single frame. Another approach is to

Re: 2d barcode library?

2009-05-20 Thread Alan G Isaac
Christian Heimes wrote: https://cybernetics.hudora.biz/projects/wiki/huBarcode Cool. I have to mention a pure PostScript writer as well: http://www.terryburton.co.uk/barcodewriter/ Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: LaTeXing python programs

2009-05-20 Thread Alan G Isaac
/macros/latex/contrib/listings/ The listings package is great and highly configurable. Note that you can also input entire files of Python code or pieces of them based on markers. Really quite great. Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: reseting an iterator

2009-05-20 Thread Alan G Isaac
t for an iterator, and if you want one in that case, you should build it. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

define "generator" (glossary bug?)

2009-05-22 Thread Alan G Isaac
on.org/3.0/reference/simple_stmts.html#the-yield-statement Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: define "generator" (glossary bug?)

2009-05-22 Thread Alan G Isaac
On Fri, 22 May 2009 16:38:40 GMT, Alan G Isaac wrote: I believe the glossary http://wiki.python.org/moin/PythonGlossary is missing the definition for 'generator' and has used instead the definition for 'generator function', which term is missing from the glossary.

Re: define "generator" (glossary bug?)

2009-05-22 Thread Alan G Isaac
On 5/22/2009 1:44 PM s...@pobox.com apparently wrote: Note that the glossary page is on the wiki. Feel free to make corrections. Well, ok, I've done so: http://wiki.python.org/moin/PythonGlossary But I'm just a user. Someone should check it. Thanks, Alan Isaac -- http://mail.

Re: Running an interactive interpreter inside a python

2008-05-14 Thread Alan J. Salmoni
e this would be against a determined attack is another matter. Alan On May 15, 11:31 am, [EMAIL PROTECTED] (R. Bernstein) wrote: > The next release of pydb will have the ability to go into ipython from > inside the debugger. Sort of like how in ruby-debug you can go into > irb :-) > > For

Re: should I put old or new style classes in my book?

2008-05-30 Thread Alan G Isaac
Alan Isaac <[EMAIL PROTECTED]> writes: I take it from this thread that in Python 3 the following are equivalent: class Test: pass class Test(object): pass Arnaud Delobelle wrote: I don't know where it is stated, but how could they *not* be equivalent? The m

Re: How to get all the variables in a python shell

2008-05-31 Thread Alan J. Salmoni
ded to the __main__.__dict__, just grab it and send it to this function. Make sure that you send the object and not just its name because the name is only a string. Sorry if this is not what you were after. Alan On May 29, 2:47 pm, [EMAIL PROTECTED] wrote: > Hi! > > I'm currently

Notify of change to list

2008-06-12 Thread Alan J. Salmoni
ith the interpreter to catch element-wise reassignments (possible, but I'd rather avoid), can anyone suggest a way to do this? Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Notify of change to list

2008-06-16 Thread Alan J. Salmoni
= 99 which comes up with: setting one element only At getx rebinding the attribute At setx Does anyone know why it works like this? I would guess that to "set" one element, the attribute needs to be retrieved which means the get method is called. I also guess that only rebinding calls the

sys.stderr.write returns string length in Python 3

2008-07-22 Thread Alan G Isaac
OWrapper instance Thank you, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.stderr.write returns string length in Python 3

2008-07-22 Thread Alan G Isaac
Benjamin wrote: http://www.python.org/dev/peps/pep-3116/. Thanks. Can you give me an example of using the returned value? Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Mutability, copying lists but not sharing?

2008-08-25 Thread Alan G Isaac
; a = range(3) >>> b = a + range(3) >>> b [0, 1, 2, 0, 1, 2] >>> a [0, 1, 2] >>> a.extend(range(3)) >>> a [0, 1, 2, 0, 1, 2] hth, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing to ms excel

2008-09-01 Thread Alan G Isaac
http://docs.python.org/lib/module-csv.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Py 2.6 changes

2008-09-01 Thread Alan G Isaac
with Gosper's modification of Stirling's formula)? Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Numeric literal syntax

2008-09-02 Thread Alan G Isaac
h the allusion? It is pretty common geek speek: http://en.wikipedia.org/wiki/Color_of_the_bikeshed Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Numeric literal syntax

2008-09-06 Thread Alan G Isaac
less the use of nobreak spaces, since any decent editor can reveal them. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: formatting a string with thousands separators

2008-09-07 Thread Alan G Isaac
On 9/7/2008 12:22 PM SimonPalmer apparently wrote: anyone recommend a way of formatting floats with comma separators? http://code.activestate.com/recipes/498181/ Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python

2008-09-08 Thread Alan G Isaac
meant to be more general. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Raw string substitution problem

2009-12-17 Thread Alan G Isaac
tting the raw string via a function produces a different result than providing it directly. If this is really the way things ought to be, I'd appreciate a clear explanation of why. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Raw string substitution problem

2009-12-17 Thread Alan G Isaac
51, in sub return _compile(pattern, 0).sub(repl, string, count) File "C:\Python26\lib\re.py", line 273, in _subx template = _compile_repl(template, pattern) File "C:\Python26\lib\re.py", line 260, in _compile_repl raise error, v # invalid expression sre_constants.error: bogus escape (end of line) Why is this the proper handling of what one might think would be an obvious substitution? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Raw string substitution problem

2009-12-17 Thread Alan G Isaac
Alan G Isaac wrote: >>> re.sub('abc', r'a\nb\n.c\a','123abcdefg') == re.sub('abc', 'a\\nb\\n.c\\a','123abcdefg') == re.sub('abc', 'a\nb\n.c\a','123abcdefg') True Why are the

Re: Raw string substitution problem

2009-12-17 Thread Alan G Isaac
wing? A string replacement is not just "converted" as described in the documentation, essentially it is compiled? But that cannot quite be right. E.g., \b will be a back space not a word boundary. So then the question arises again, why isn't '\\' a backslash? Just becau

Re: Raw string substitution problem

2009-12-18 Thread Alan G Isaac
;\' flags an escape which combined with 'n' produces the newline character (0x0a), and 'c' passes through as is. I got that from MRAB's posts. (Thanks.) What I'm not getting is why the replacement string gets this particular interpretation. What is the payoff? (Contrast e.g. Vim's substitution syntax.) Thanks, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Raw string substitution problem

2009-12-18 Thread Alan G Isaac
ons handle this fine without the odd (to non perlers) handling of backslashes in replacement. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Sys.path entries

2009-12-30 Thread Alan Harris-Reid
P) Also, regarding PyConfig.h - is this read every time I start Python.exe? Many thanks, Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Re: Sys.path entries

2009-12-31 Thread Alan Harris-Reid
Marco Salden wrote: On Dec 30, 8:13 pm, Alan Harris-Reid wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following strange entries... 'C:\\WINDOWS\\system32\\python31.zip'. This file does not exist anywhere (although python31.dll doe

Re: Sys.path entries

2009-12-31 Thread Alan Harris-Reid
Gabriel Genellina wrote: En Thu, 31 Dec 2009 04:31:06 -0300, Marco Salden escribió: On Dec 30, 8:13 pm, Alan Harris-Reid wrote: Hi there, In my sys.path (interpreter only, no application loaded), I have the following strange entries... 'C:\\WINDOWS\\system32\\python31.zip'.

Re: change an exception's message and re-raise it

2009-12-31 Thread Alan G Isaac
On 12/31/2009 7:30 PM, Steven D'Aprano wrote: The message attribute is deprecated from Python 2.6 and will print a warning if you try to use it. http://bugs.python.org/issue6844 fwiw, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Dynamic HTML controls

2010-01-11 Thread Alan Harris-Reid
x27;t mind writing my own classes (it will be good practice for me), but I don't want to re-invent the wheel if it can be avoided. TIA, Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic HTML controls

2010-01-12 Thread Alan Harris-Reid
alex23 wrote: On Jan 12, 1:26 pm, Alan Harris-Reid wrote: Does anyone know where I can find any decent dynamically-constructed HTML control classes (dropdown list, table, input field, checkbox, etc.) written in Python. There's pyWeb[1], which seems pretty close to what you'

Re: Dynamic HTML controls

2010-01-14 Thread Alan Harris-Reid
Pierre Quentel wrote: On 12 jan, 04:26, Alan Harris-Reid wrote: Hi, Does anyone know where I can find any decent dynamically-constructed HTML control classes (dropdown list, table, input field, checkbox, etc.) written in Python. For example, for a HTML table I would like something like

Re: Dynamic HTML controls

2010-01-21 Thread Alan Harris-Reid
Aahz wrote: In article , Alan Harris-Reid wrote: Does anyone know where I can find any decent dynamically-constructed HTML control classes (dropdown list, table, input field, checkbox, etc.) written in Python. For example, for a HTML table I would like something like... You might

Re: python 3's adoption

2010-01-26 Thread Alan Harris-Reid
no serious problems (yet). I would be interested to hear how other people are using Python 3, and with what compatible packages. Regards, Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Threading issue with SQLite

2010-01-29 Thread Alan Harris-Reid
should I forget that idea completely?) 3. When a method returns to the calling method, is the connection automatically closed (assuming the object is local, of course) or does it have to be done explicitly using connection.close()? TIA, Alan Harris-Reid -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a better way to code variable number of return arguments?

2009-10-08 Thread Alan G Isaac
same thing? The suggestions to return result or if needed tuple(result) are good, if a sequence is expected. But perhaps better if each element has separate meaning: return a defaultdict; document the keys. http://docs.python.org/library/collections.html#collections.defaultdict Cheers, Alan

restriction on sum: intentional bug?

2009-10-16 Thread Alan G Isaac
ould work, should it not? Naturally, '' + 'ab' + 'cd' 'abcd' Why doesn't duck typing apply to `sum`? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: restriction on sum: intentional bug?

2009-10-16 Thread Alan G Isaac
Alan G Isaac schrieb: I expected this to be fixed in Python 3: sum(['ab','cd'],'') Traceback (most recent call last): File "", line 1, in TypeError: sum() can't sum strings [use ''.join(seq) instead] Of course it is not a good

Re: restriction on sum: intentional bug?

2009-10-16 Thread Alan G Isaac
On 10/16/2009 3:40 PM, Tim Chase wrote: What's always wrong is giving me an *error* when the semantics are perfectly valid. Exactly. Which is why I expected this to be fixed in Python 3. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: restriction on sum: intentional bug?

2009-10-16 Thread Alan G Isaac
is a wart: an error is raised despite correct semantics. Ugly! Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: restriction on sum: intentional bug?

2009-10-16 Thread Alan G Isaac
language like Python. (As Tim and Peter make clear.) Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: restriction on sum: intentional bug?

2009-10-16 Thread Alan G Isaac
Alan G Isaac gmail.com> writes: So of course join is better, as originally noted, but that does not constitute a reason to intentionally violate duck typing. On 10/16/2009 1:03 PM, Benjamin Peterson wrote: As Stephen pointed out, duck typing is not an absolute. I do not recall any

Re: restriction on sum: intentional bug?

2009-10-17 Thread Alan G Isaac
is useful to to combine them: sum(pathlst,path()). Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: restriction on sum: intentional bug?

2009-10-17 Thread Alan G Isaac
On 10/16/2009 8:16 PM, Terry Reedy wrote: The fact that two or three people who agree on something agree on the thing that they agree on confirms nothing. On 10/17/2009 7:03 PM, Terry Reedy wrote: If you disagree with this, I think *you* are being silly. Well, ... Alan G Isaac wrote: Of

<    5   6   7   8   9   10   11   12   13   >