Re: an enumerate question

2007-03-21 Thread Terry Hancock
in enumerate(open(file)): if n1: print n,curr print m,prev m,prev = n,curr Of course, if the file isn't so big, then you could use readlines as you mention. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http

Re: Project organization and import

2007-03-06 Thread Terry Hancock
creating my own mock objects from scratch). HTH, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: imagemagick

2007-03-01 Thread Terry Hancock
own wrapper (perhaps using ctypes, now that it is included in the standard library). I have used 'popen' to run it as a separate process in the past. The 'subprocess' module would be the smart way to do that today, and that might be your fastest solution. Cheers, Terry -- Terry Hancock ([EMAIL

Re: Thoughts on using isinstance

2007-01-26 Thread Terry Hancock
specific inheritence. Using isinstance is one of those practices that can really help in quick testbed code or in a prototype, but you usually want to take it out later. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org

Re: Clarify Regex in Python.

2006-09-12 Thread Terry Hancock
match functions to match the pattern any location in the subject. i.e I want to turn off before said behaviour. re.match = re.search perhaps? Stupid thing to do, but it meets the spec. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com

Re: Can I make unicode in a repr() print readably?

2006-09-11 Thread Terry Hancock
Martin v. Löwis wrote: Terry Hancock schrieb: Or, put another way, what exactly does 'print' do when it gets a class instance to print? It seems to do the right thing if given a unicode or string object, but I cant' figure out how to make it do the same thing for a class instance

Re: Unable to make python work properly

2006-09-09 Thread Terry Hancock
I'm guessing this from knowing Debian, which Ubuntu is based on, and guessing that no one would go out of their way to *remove* readline support. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo

Can I make unicode in a repr() print readably?

2006-09-09 Thread Terry Hancock
? Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: audio with graphics

2006-08-30 Thread Terry Hancock
(like PyGame, for example). The platform you are running on may matter too (Windows, Mac, Linux, etc). Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good idea or a waste of time?

2006-08-28 Thread Terry Hancock
not just let it fail there?). So be more minimal and throw in checks for specific problems -- especially the ones that would cause a wrong result rather than an exception. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http

Re: don't need dictionary's keys - hash table?

2006-07-12 Thread Terry Hancock
. I am a little surprised that hash(hash(s)) == hash(s), is that actually true? Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Out of the box database support

2006-07-04 Thread Terry Hancock
Alex Martelli wrote: Terry Hancock [EMAIL PROTECTED] wrote: ... Although, I confess to ignorance on what a snark is or whether http://www.gutenberg.org/etext/13 The Hunting of the Snark by Lewis Caroll Of course! I've heard of it, but never read it. Thanks, Alex. :-) Not sure if it's

Re: Next Generation Artificial Intelligence, Artificial Mind - Part One - Basic Architecture and Cognitive Structure

2006-07-04 Thread Terry Hancock
think it's actually a 'phish'. Sigh. Too bad. I like reading crackpot AI theories now and then. Cheers, Terry *By which I really just mean an unreviewed crackpot theory, since, with the state of the art being what it is, pretty much ALL AI theories are crackpot ;-) -- Terry Hancock ([EMAIL

Re: For a fast implementation of Python

2006-07-04 Thread Terry Hancock
in Javascript, then use the PyPy project to fill in the rest? That way, you don't even have to maintain most of it. http://codespeak.net/pypy/dist/pypy/doc/news.html Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman

Re: style question

2006-07-04 Thread Terry Hancock
( This is line1. This is line2 This is line3 ) The dedent function strips out leading whitespace shared by all lines in the string. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http

Re: Out of the box database support

2006-07-03 Thread Terry Hancock
-- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehension

2006-07-03 Thread Terry Hancock
data -- you can just see what it does by trying it. Some people have even made clever obfuscated email signatures this way. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions about OSS projects.

2006-06-28 Thread Terry Hancock
the material is. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Verify PyProtocols interfaces?

2006-06-27 Thread Terry Hancock
all the relevant words are too common. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is fun (useless social thread) ;-)

2006-06-21 Thread Terry Hancock
for programming. Once again, though, Python's ease of readability really helps me to pick up where I left off when I have to do that (which is a lot). Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple question regarding module initialization

2006-06-21 Thread Terry Hancock
, I'd still recommend __import__ for clarity. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: An oddity in list comparison and element assignment

2006-06-02 Thread Terry Hancock
on in order to avoid confusion. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: An oddity in list comparison and element assignment

2006-06-02 Thread Terry Hancock
, because they're too far from the Earth's gravity. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Python Editor

2006-06-01 Thread Terry Hancock
Fredrik Lundh wrote: Manoj Kumar P wrote: Can anyone tell me a good python editor/IDE? emacs! [...] Fredrik Lundh wrote: Manoj Kumar P wrote: Can anyone tell me a good python editor/IDE? vim! There is much truth in this man's replies. ;-D Cheers, Terry -- Terry Hancock ([EMAIL

Re: graphs and charts

2006-05-23 Thread Terry Hancock
Yaron Butterfield wrote: What's the best way to on-the-fly graphs and charts using Python? Or is Python not really the best way to do this? I quite enjoyed using Biggles for this: http://biggles.sf.net There are many different choices, though. Cheers, Terry -- Terry Hancock ([EMAIL

Re: python vs perl lines of code

2006-05-19 Thread Terry Hancock
, no less. This is of course an extreme example, but there are *loads* of merely irritating behaviors like trolling. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: number of different lines in a file

2006-05-19 Thread Terry Hancock
above have helped me out, I wonder? Unfortunately, I deleted the file, so I can't really try it out. I suppose I could create synthetic data with the logging module to try it out. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http

Re: import woe

2006-05-19 Thread Terry Hancock
behavior: sys.path = ['.', '../', '../../', '../../../'] + sys.path I'm looking forward to the introduction of relative imports in 2.5, though. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python for a CAD program

2006-05-18 Thread Terry Hancock
granularity may be different, but the need to roll data back to an earlier revision is just as present in drawings as it is for code or financial transactions. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo

Re: python vs perl lines of code

2006-05-18 Thread Terry Hancock
the hostility, I think. Cheers, Terry *With apologies to anyone who's actually using assistive tech to type their code -- but I'm sure you already know how to use macros to get what you want typed. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Terry Hancock
is, unless you have set up your editor to syntax color spaces and tabs differently, you won't see the difference in the original editor. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Terry Hancock
-- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: basic python programing

2006-05-04 Thread Terry Hancock
smart there either, but that is likely where he learned it. Either that or it's yet another email virus. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python plug-in

2006-03-31 Thread Terry Hancock
toto wrote: I'm trying to find some howto, tutorial in order to create a python program that will allow plug-in programming. I've found various tutos on how to write a plug-in for soft A or soft B but none telling me how to do it in my own programs. Do you have any bookmarks ? There is more

Re: Find similar images using python

2006-03-31 Thread Terry Hancock
Thomas W wrote: How can I use python to find images that looks quite similar? Thought I'd scale the images down to 32x32 and convert it to use a standard palette of 256 colors then compare the result pixel for pixel etc, but it seems as if this would take a very long time to do when processing

Re: a hobbyist's dilemma

2006-03-30 Thread Terry Hancock
You may find the attached files of interest. I wrote this PyGame script in order to teach my sons (ages 8 10) about some programming concepts. I intentionally avoided any function or class definitions, and tried to use minimal Python concepts. I think it's quite impressive that you can do a

Re: Getting a loop to activate a loop above it

2006-03-22 Thread Terry Hancock
expectation, I am curious what led you to think that way. Do you have prior experience with inference engines or something? Jordan Greenberg has already answered your actual question, so I won't repeat. :-) Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http

Re: doctest, unittest, or if __name__='__main__'

2006-03-21 Thread Terry Hancock
programming, the formal structure of pyunit can be easier to adapt than something which is intrinsically based on string processing. Haven't seen py.test before, but I'm looking now -- thanks for the link. :-) Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http

No module named glade?

2006-03-17 Thread Terry Hancock
). It is the unstable branch, though. I hope I've provided enough information -- like I said, it looks to me like it should work now, but it doesn't. Any suggestions welcome. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http

Re: Importing an output from another function

2006-03-17 Thread Terry Hancock
it to: x, y = y, x instead of being a dumb mistake like this is: x = y y = x which of course should be temp = y x = y y = temp But ewww that's ugly. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo

Re: Is it better to use class variables or pass parameters?

2006-03-16 Thread Terry Hancock
yourself why? Is there a compelling reason you need *two* objects that have to communicate over an interface when one will do? (Sometimes there are). -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Cheese Shop: some history for the new-comers

2006-03-16 Thread Terry Hancock
Core Developer. It seems a little redundant to me, but perhaps it would be less ambiguous? -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Cheese Shop: some history for the new-comers

2006-03-16 Thread Terry Hancock
this is the best option.) Development Team? +1 on Core Development. It's still ambiguous, but less so. And I can't think of anything better. ;) Since I just said almost that independently on an earlier thread, I guess that makes me +1 on Core Development (or Core Developers) myself. -- Terry

Re: Tried Ruby (or, what Python *really* needs or perldoc!)

2006-03-16 Thread Terry Hancock
pretty well for me. Maybe it's just stable? -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Please, I Have A Question before I get started

2006-03-14 Thread Terry Hancock
there: if not target: return self.parent else: return self.target This is far from working code, but maybe it'll give you an idea of how you might approach the problem. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com

Re: Tried Ruby (or, what Python *really* needs or perldoc!)

2006-03-14 Thread Terry Hancock
be cool is if some of happydoc's unique features were ported to epydoc (such as getting information from comments as well as docstrings). -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross Module Command Useage

2006-03-13 Thread Terry Hancock
, and then there's usually a top or main module which drives everything else. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 example of 'Function and method arguments'

2006-03-13 Thread Terry Hancock
encountered this is with the __new__ method, which, being a classmethod, needs cls (which gets loaded with the *class* not the *instance*). -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Very, Very Green Python User

2006-03-13 Thread Terry Hancock
compiler directives to defeat C++/Java private variables anyday, so it doesn't accomplish anything that isn't easier to do by putting __ in front of it to tell the client programmer not to use it. Then we all go back to coding. Cheers and good luck with your project, ;-) Terry -- Terry

Re: put multiple condition in if statement

2006-03-11 Thread Terry Hancock
style: if s not in (' ', ''): -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Evangelism

2006-03-10 Thread Terry Hancock
On Thu, 9 Mar 2006 19:33:38 -0500 Thomas G. Willis [EMAIL PROTECTED] wrote: On 3/9/06, Terry Hancock [EMAIL PROTECTED] wrote: On Thu, 9 Mar 2006 10:33:12 -0500 Thomas G. Willis [EMAIL PROTECTED] wrote: I get particulalry annoyed now with linux when I start up synaptic and my choices

Re: Best way to have a for-loop index?

2006-03-10 Thread Terry Hancock
-- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Why python doesn't use syntax like function(, , x) for default parameters?

2006-03-10 Thread Terry Hancock
: a = [] ... -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Evangelism

2006-03-10 Thread Terry Hancock
to be in Texas next year? I wasn't sure what would happen, since it was in Washington DC the last (first?) 3 years, according to the website. Would be great for me if true, since I live there. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http

Re: why no block comments in Python?

2006-03-10 Thread Terry Hancock
On Sat, 11 Mar 2006 10:23:56 +1100 Steven D'Aprano [EMAIL PROTECTED] wrote: On Thu, 09 Mar 2006 18:02:27 -0600, Terry Hancock wrote: On 9 Mar 2006 07:21:00 -0800 msoulier [EMAIL PROTECTED] wrote: (and if you don't, you can quickly comment out regions by putting them inside a triple

Re: Speed of data structures in python

2006-03-10 Thread Terry Hancock
to PyOpenGL. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: why no block comments in Python?

2006-03-09 Thread Terry Hancock
of block-commenting code out is to temporarily delete it without having to use your version control system to get it back. You only do that when you have strong feeling you're going to need to put it back in. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com

Re: Python Evangelism

2006-03-09 Thread Terry Hancock
theoretically apply the bad=good marketing, although something venomous would probably be more effective. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Interfacing with the command line

2006-03-08 Thread Terry Hancock
several options, depending on how you want to communicate with it, and what version of Python you are using. Keywords: os.system popen subprocess Search the Library Reference. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com

Re: why no block comments in Python?

2006-03-08 Thread Terry Hancock
several of them in a module docstring, and it gets to be a 100+ lines or so of doctest plus explanations. I'm thinking this might be a use-case for the new support for doctests in a separate file. Or maybe I just need to see if I can move the tests into individual object docstrings. -- Terry Hancock

Re: setting PYTHONPATH

2006-03-07 Thread Terry Hancock
, they are not closely related, and you haven't really said what your problem is, so I don't know which is going to be helpful to you. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python as an extension language

2006-03-07 Thread Terry Hancock
, then maybe you should not embed a Python interpreter in it, but rather allow it to be compiled as a Python module. Just write a Pyrex or Python C/API wrapper for it, and include a build for the Python module. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com

Re: Any advantage in LISPs having simpler grammars than Python?

2006-03-07 Thread Terry Hancock
that really unhelpful, myself. Remember that you *can* represent your program with nothing but two characters, 0 and 1 -- even simpler than Lisp. That doesn't mean that that's the preferred form for editing it. ;-) Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi

Re: Learning different languages

2006-03-07 Thread Terry Hancock
). So, I don't think you'll have a real problem with it. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python advocacy in scientific computation

2006-03-04 Thread Terry Hancock
understand all that bit about seeing further because you're standing on the shoulders of giants. With proprietary software, the giants keep getting shot out from under you, which tends to make things a bit harder to keep up with. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks

Easy immutability in python?

2006-03-04 Thread Terry Hancock
so it overloads everything else with the null interfaces? -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy immutability in python?

2006-03-04 Thread Terry Hancock
Whoops I forgot to list the reference. Also, I just finished reading the old thread, so I see some damage-control may be needed. On Sat, 4 Mar 2006 11:52:59 -0600 Terry Hancock [EMAIL PROTECTED] wrote: [1] http://news.hping.org/comp.lang.python.archive/28916.html And more specifically, I'm

Re: Easy immutability in python?

2006-03-04 Thread Terry Hancock
, why? Shouldn't a simple idea to express in English be easy to express in Python? If it's really impossibly difficult, maybe Python should provide a means to implement it. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http

Re: Python advocacy in scientific computation

2006-03-04 Thread Terry Hancock
, of course, but who first coined the expression?). -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: do design patterns still apply with Python?

2006-03-02 Thread Terry Hancock
-- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Importing Files

2006-03-02 Thread Terry Hancock
stuff to the path. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it better to use class variables or pass parameters?

2006-03-01 Thread Terry Hancock
. It's funny, I've never actually had any doubts about which to use in practice, it always seems obvious, so it's hard to recall what my actual thought process is on the subject. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman

Re: PEP 354: Enumerations in Python

2006-03-01 Thread Terry Hancock
will think when they read it (it actually seems right to me, obviously). Label was what I first called these. But I realize that label describes a probably use of a symbol, not the symbol itself. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http

Re: PEP 354: Enumerations in Python

2006-03-01 Thread Terry Hancock
. Enumerations are most frequently used in module APIs, so they are important to document. Obviously, the point is so that documentation tools like epydoc can capture the enumeration documentation. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com

Re: Suggestions for documentation generation?

2006-03-01 Thread Terry Hancock
://happydoc.sourceforge.net/ and EpyDoc http://epydoc.sourceforge.net/ . Those are great, but I don't think they handle C++ ;-) Which makes me wonder -- will epydoc work on a pyrex or C-extension file if it defines the __doc__ strings? -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http

Re: PEP 354: Enumerations in Python

2006-02-28 Thread Terry Hancock
-in, though I'm +0 on it becoming a module (it's not that hard to type from enum import Enum). But I'm not sure it's the best enum, or even that one size fits all with enums (though having fewer implementations might improve clarity if they are really equivalent). Cheers, Terry -- Terry Hancock

Re: Python Indentation Problems

2006-02-28 Thread Terry Hancock
with the interpreter on the width of tabs). In any case, it's good practice not to mix tabs and spaces. I actually recommend using just tabs when playing with the interpreter (it's faster) -- but use spaces in your real source code files. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http

Re: PEP 354: Enumerations in Python

2006-02-28 Thread Terry Hancock
also think though that the characterization of the behavior of enumerated value instances is much more important than the behavior of the enumeration collection object, which is basically just a set, anyway. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http

Re: Use empty string for self

2006-02-28 Thread Terry Hancock
. Others have suggested _ instead of s. However, IMHO, it's less visible, takes up the same space as s, and requires the shift key, so I'd rather just use s. And yes, it's been discussed to death on the list. ;-) Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http

Re: Default Section Values in ConfigParser

2006-02-28 Thread Terry Hancock
}/varimage.cfg'), os.path.join(pkghome, 'varimage.cfg') ]) -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Temporary Variable

2006-02-25 Thread Terry Hancock
, Terry Hancock -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: make a class instance from a string ?

2006-02-23 Thread Terry Hancock
, but it seems basic enough that there ought to be a general approved method of doing that in Python -- you know, one obvious way. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: A C-like if statement

2006-02-23 Thread Terry Hancock
functions with side-effects. At least it is if you want them. ;-) -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser and unicode: a simple solution?

2006-02-22 Thread Terry Hancock
+unicodebtnG=Google+Search First hit identifies ConfigObj, and a few links later gets you the home page and Sourceforge project page: http://www.voidspace.org.uk/python/configobj.html http://sourceforge.net/projects/configobj -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http

Re: configuring a class

2006-02-22 Thread Terry Hancock
, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple assignment and the expression on the right side

2006-02-21 Thread Terry Hancock
assignment. [The wordings are mine. I am not sure if this is what he intended]. c = d = e = x() AFAIK, this is equivalent to this: e = x() d = e c = d So, in fact, what you say is true, but these, of course will not evaluate x multiple times. -- Terry Hancock ([EMAIL PROTECTED]) Anansi

Re: Augmented assignment

2006-02-21 Thread Terry Hancock
equivalent internally, at least for immutable objects. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: deriving from float or int

2006-02-21 Thread Terry Hancock
On Tue, 21 Feb 2006 15:01:22 -0600 Robert Kern [EMAIL PROTECTED] wrote: http://www.python.org/2.2.3/descrintro.html#__new__ Curiously, __new__ does not appear in the index of the Python 2.3 language reference! It is fixed in Python 2.4, though -- I just checked. -- Terry Hancock ([EMAIL

Re: ANN: FreeImagePy 1.2.2

2006-02-19 Thread Terry Hancock
. PIL is not a category-killer. At least not yet. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Terry Hancock
extensions. I'm sure that's why some 3D libraries have opted to write the fast code in Pyrex instead of C (even though either is possible). -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: PyProtocols, Components, and Inheritance

2006-02-18 Thread Terry Hancock
On Thu, 16 Feb 2006 23:53:51 -0600 Terry Hancock [EMAIL PROTECTED] wrote: I've been discussing PyProtocols with a a friend collaborating with me on a SF game project, about the benefits and design concept of component architecture, and I'm a little confused by what I'm learning

PyProtocols, Components, and Inheritance

2006-02-17 Thread Terry Hancock
on this? Can you tell me why PP's approach is better than Zope's? (Or perhaps what you think it is more appropriate for?). Anyway, c.l.python seemed like the (neutral) place to ask since this is comparing two major python packages. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks

Re: Python, Forms, Databases

2006-02-15 Thread Terry Hancock
). But Zope is kind of a culture onto itself, so you may not necessarily want to buy into it, if you don't do this kind of thing often. Just my two cents, of course, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman

Re: hard disk activity

2006-02-14 Thread Terry Hancock
to be unrecognizeable to the end of the frame, then you need the next frame anyway. Seems like it could get pretty close to optimal (but we probably are re-inventing rsync). Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman

Re: how do you pronounce 'tuple'?

2006-02-14 Thread Terry Hancock
On Tue, 14 Feb 2006 10:40:09 -0500 Tim Peters [EMAIL PROTECTED] wrote: the-acid-test-is-whether-you-say-xor-with-one-syllable- or-three-ly y'rs - tim -- Oh dear, I say it with two, am I just not cool, or what? ;-) ex-or -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http

Re: how do you pronounce 'tuple'?

2006-02-14 Thread Terry Hancock
with the special lopsided Pythonic creature mentioned above. I suggest we name it a hurgledink. +1 QOTW Yeah, +1, definitely. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Terry Hancock
(1,) ought to have a name to reflect its ugly, newbie-unfriendly nature. Are we having fun yet? ;-) Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Terry Hancock
On Mon, 13 Feb 2006 18:27:40 -0800 Erik Max Francis [EMAIL PROTECTED] wrote: Terry Hancock wrote: The only tuple I pronounce with the -uh- is couple, and I usually call that a two-tuple when dealing with Python. I prefer the name _pair_ :-). Yeah, that works too. So what's a 1

Re: apostrophe or double quote?

2006-02-10 Thread Terry Hancock
On 09 Feb 2006 12:54:04 + (GMT) Sion Arrowsmith [EMAIL PROTECTED] wrote: Terry Hancock [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Just to present a complete picture, not mentioned in this thread are triple-quoted strings: [ ... ] Also in the mode of beating a dead horse

Re: Legality of using Fonts

2006-02-10 Thread Terry Hancock
that it clutters the field. Several good fonts are included in the Debian Linux distribution, though, and of course, they had to get debian-legal's stamp of approval to get there, so they are indeed free. Otherwise, you have to look harder, and read carefully. Cheers, Terry -- Terry Hancock ([EMAIL

  1   2   3   4   5   >