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

2006-07-04 Thread Terry Hancock
the merits and be worth a look, but I 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 m

Re: For a fast implementation of Python

2006-07-04 Thread Terry Hancock
;RPython" part 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

Re: style question

2006-07-04 Thread Terry Hancock
the input and isn't aligned there. There's this approach, too: from textwrap import dedent message = dedent( """ This is line1. This is line2 This is line3 "

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

2006-08-28 Thread Terry Hancock
g an addition or by looking for th __add__ method. But then, if you need addition support, then your code probably already has an addition, so why 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 t

Re: audio with graphics

2006-08-30 Thread Terry Hancock
imedia library (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: Unable to make python work properly

2006-09-09 Thread Terry Hancock
package managers have probably done the work for you). I only say 'probably' because 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]) Anan

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

2006-09-09 Thread Terry Hancock
ried returning the same thing from __repr__, but the latter causes this unpleasant result: >>> print jp.concepts['adjectives']['BLUE'][0] Traceback (most recent call last): File "", line 1, in ? UnicodeEncodeError: 'ascii' c

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

Re: Clarify Regex in Python.

2006-09-12 Thread Terry Hancock
y Problem is, I want to know how can I force 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 Hancoc

Re: Dominant color & PIL

2006-01-22 Thread Terry Hancock
d get that pixel's value. ;-) Seriously, that ought to do it. Bear in mind that you need to use the right sampling mode (IIRC, you want ANTIALIAS). Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Who is www.python.org for? (was Re: New Python.org website ?)

2006-01-22 Thread Terry Hancock
is as a quick-reference to deeper documentation that I actually need in the process of writing Python code. I don't really know if I'm the "market" for this site. I'm already sold on Python, after all, I just want something useful that I can use to stay up-to-date, and

Re: Dominant color & PIL

2006-01-23 Thread Terry Hancock
rinting), use list(im.getdata()). > > So you could get them and count them in :) > Don't know if you should do that on a 1600x1200 wallpaper > tho :D I think he's thinking of how to get the values for the master image. > Terry Hancock wrote: > > On Sun, 22 Jan 2006 21:0

Re: Using non-ascii symbols

2006-01-25 Thread Terry Hancock
han character names might become very popular as they span several languages). But I bet it will remain underused so long as English remains the most popular international trade language. In the meantime, though, I predict many luddites will scream "But it doesn't work on my vintage VT-220 terminal!" (And I may even be one of them). Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ZODB and Zope on one Linux machine, how?

2006-01-25 Thread Terry Hancock
a little afraid of problems cropping up). > I'm using: > - Python 2.3.5 > - ZODB 3.2.10 (same as in Zope 2.7.8) > - Zope 2.7.8 > - Plone 2.1.1 > ... all built from source on Debian Woody. The first option, if it works, would require that the ZODB used by your application is the sa

Re: Using non-ascii symbols

2006-01-26 Thread Terry Hancock
wild" and use obscure characters, I suspect that I would have much better luck reading their programs with han characters, than with, say, the Chinese phonetic names! Possibly even better than what they thought were the correct English words, if their English isn't that good. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: beta.python.org content

2006-01-27 Thread Terry Hancock
o be more of a technical advertisement than the "buzzword sell" on the front page. This is the page someone reads who is imagining that *they* are going to have to learn this language (not pay someone else to). Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: beta.python.org content

2006-01-27 Thread Terry Hancock
t done somewhere before. > > You're probably thinking of PyPy: Huh. Seems like the PyPy logo should surely be an Ouroboros! -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: beta.python.org content

2006-01-27 Thread Terry Hancock
ny experience with high-speed, digital, electronic computers?" :-D For those who are too young, or weren't film students, the answer is "Yes, my aunt has one". Ironically, this is now funny for exactly the opposite reason from the way it was intended! -- Terry Hancock ([EMAIL

Re: Using non-ascii symbols

2006-01-27 Thread Terry Hancock
right when drawn wrong). And when you have the actual stroke sequence data as input, recognition is easier and more reliable (I think that was the point behind the "graffiti" system for the Palm Pilot). -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Using non-ascii symbols

2006-01-29 Thread Terry Hancock
assumed this would already be a solved problem by now. Maybe it was a lot harder than expected. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: beta.python.org content

2006-01-29 Thread Terry Hancock
On Sat, 28 Jan 2006 09:47:20 -0800 Scott David Daniels <[EMAIL PROTECTED]> wrote: > Terry Hancock wrote: > > On Fri, 27 Jan 2006 13:44:19 -0800 > > Scott David Daniels <[EMAIL PROTECTED]> wrote: > >> Paragraph 3 in "Why Python"

Re: Python module for LX200 telescope command set

2006-01-29 Thread Terry Hancock
atory scopes where you just punch in coordinates and make sure the counterweight doesn't smack you in the head. ;-)). Now that I'm out of it, though, I would like to be able to do some types of amateur observing for fun (and for my kids). Cheers, Terry -- Terry Hanc

Re: Have you any idea how to make window transparent using pygame?

2006-01-30 Thread Terry Hancock
ame-specific mailing list, which is really the best place to ask about this sort of thing. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: triple quoted strings as comments

2006-01-30 Thread Terry Hancock
x27;s not bound so it gets immediately garbage-collected. And it won't be there after the module is byte-compiled. So, you lose a little time the very first time the file is used (but that's technically true for a regular comment too -- I think this loses you a little more time). But it&#

Re: python-list@python.org

2006-01-31 Thread Terry Hancock
ny I do it for is migrating > to LINUX (slowly) by customer demand (!) and I guess > don't want to do new COM projects. FWIW, for me, "Windows only"="write off", so I'm glad you're not going this route. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks

Re: PIL and transparent GIFs

2006-02-01 Thread Terry Hancock
sting and not finding it to work perfectly, but I may have been doing something wrong. Can't recover it at the moment, but some search engine work might turn it up. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: OO conventions

2006-02-01 Thread Terry Hancock
quot;an object initialized by the string 'myfile.jpg'", but is rather a function loading data from a file called 'myfile.jpg' and creating a PIL Image object from *that*. Remember, programming is an art, not a science. "Object-oriented style" is a subjective and

Re: Another try at Python's selfishness

2006-02-02 Thread Terry Hancock
added, the less that will be true, though. I don't think we've busted the system yet, but I think there's some reason for caution against making things any *more* complicated. I still see "newbie-friendliness" as a MAJOR plus for Python -- it increases the chance that users o

Re: would it be feasable to write python DJing software

2006-02-02 Thread Terry Hancock
to turn up some other results. Note that pyogg/pyvorbis will also give you access to the embedded metadata in Ogg files, which sounds like it might be useful in your application. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling a string as a function.

2006-02-02 Thread Terry Hancock
given: func_table = { 'motd':motd,} then you can call func_table['motd']() and its the same as motd() Whatever motd() is. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I dynamically create functions without lambda?

2006-02-02 Thread Terry Hancock
e "Journal of Irreproducible Results" that somehow got accidentally submitted to a serious journal (of course, I don't know enough about psychology journals to know if that is really a "serious journal", but I'm taking it at face value). Of course, you *could* conclude tha

Re: How do I dynamically create functions without lambda?

2006-02-03 Thread Terry Hancock
On Fri, 3 Feb 2006 09:39:39 +0100 "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Terry Hancock wrote: > > Frankly this paper sounds like a bid for the "Journal of > > Irreproducible Results" that somehow got accidentally > > submitted to a seriou

Re: would it be feasable to write python DJing software

2006-02-03 Thread Terry Hancock
will be true whether he uses PyMedia, PyGame, Numeric or all three. Indeed, as an implementation matter only the "glue code" will be interpreted in Python -- but the OP will not have to write anything but such "glue code". For me, who no longer writes *any* C code, no

Re: A problem with some OO code.

2006-02-05 Thread Terry Hancock
s are "instance factories" in Python. It's almost as if a class is nothing more than a special category of functions that return instances. I don't know if I've helped at all, but I hope so. ;-) Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Another try at Python's selfishness

2006-02-05 Thread Terry Hancock
e a formal introduction to Javascript would explain these things -- but I note that many online "how to" type documents skip them, partly because OOP is not very popular with most casual Javascripters). I tend to think of Javascript as "almost Python, but stupidly designed", because

Re: Importing a class, please help...

2006-02-05 Thread Terry Hancock
n") rather than Python (a.k.a. "C Python"). Perhaps you have both Jython and Python 2.4 installed and you are launching the latter when you meant the former? In any case, C Python cannot load Java classes (that's the main raison d'etre for Jython). -- Terry Hancock ([E

Re: translating PHP to Python

2006-02-05 Thread Terry Hancock
. My impression is that people do things in PHP that are ordinarily split between templates (ZPT or DTML) and Python "scripts" in Zope. Of course, there are a dozen other ways to do web-programming in Python, too. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: apostrophe or double quote?

2006-02-08 Thread Terry Hancock
internationalize your code. But that's a matter of taste. It is interesting to note, however, that the Python repr() function prefers to use single quotes, using double quotes only when a single quote is embedded in the string. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

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: > &

Re: Legality of using Fonts

2006-02-10 Thread Terry Hancock
-licensed fonts can be a bit difficult because there are so-many "sort of" free fonts 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 fre

Re: installing python on a server?

2006-02-10 Thread Terry Hancock
lighter-weight package than Zope, and there's maybe a dozen different ones to choose from. Easier to learn, but probably more work in the long run if you have to do a lot of script work on your site. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- ht

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Terry Hancock
b, which is "kwintoopliKATE"). So what's a 1-element tuple, anyway? A "mople"? "monople"? It does seem like this lopsided pythonic creature (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.

Re: hard disk activity

2006-02-14 Thread Terry Hancock
cksums until they fail again. Actually, that will work just coming from the beginning, too. If instead, the region continues 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

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 ([EMA

Re: how do you pronounce 'tuple'?

2006-02-14 Thread Terry Hancock
gruesome enough a > > name to go 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: Python, Forms, Databases

2006-02-15 Thread Terry Hancock
on't want to do it the old-fashioned way -- after that though, it's just "throught-the-web" scripting). 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

PyProtocols, Components, and Inheritance

2006-02-17 Thread Terry Hancock
. I feel like there's something going on here that I just don't "get". Is there someone out there who can give me a PyProtocols advocate's PoV on this? Can you tell me why PP's approach is "better" than Zope's? (Or perhaps what you think it is mo

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

Re: ANN: FreeImagePy 1.2.2

2006-02-19 Thread Terry Hancock
I haven't checked in awhile. So, IMHO, there's still PLENTY of room for innovation in the application area of image-handling tools for Python. 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
for things that truly need optimization. If you use Pyrex, you can even still pretend you're programming in Python when you write those 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). --

Re: Multiple assignment and the expression on the right side

2006-02-21 Thread Terry Hancock
ght side is evaluated > once for each 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 evaluat

Re: Augmented assignment

2006-02-21 Thread Terry Hancock
, I think they are usually 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 Hancoc

Re: ConfigParser and unicode: a simple solution?

2006-02-22 Thread Terry Hancock
www.google.com/search?hl=en&q=ConfigParser+unicode&btnG=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 Han

Re: "configuring" a class

2006-02-22 Thread Terry Hancock
eeing the code, I can't guess how. > Can anyone give me a clue about this? If there is a better > way, please let me know. Thanks. Recommend you stick with the first idea, which as you see works fine. Cheers, Terry -- 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
like ZODB will already do that for you, 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
de-effects". Python is pretty good at making 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: "Temporary" Variable

2006-02-25 Thread Terry Hancock
ote, he consistently used "foo" and "bar" himself. My faith is so shaken. ;-) Cheers, Terry Hancock -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 354: Enumerations in Python

2006-02-28 Thread Terry Hancock
be a smart way to do this in another application, but it looks promising for this one (which is a kind of artificial locale-neutral language representation). I'm not sure that the enum described in the PEP would be as useful to me as this. So I'm -0 on it becoming a built-in, though I

Re: Python Indentation Problems

2006-02-28 Thread Terry Hancock
e been fixed, or else I'm just lucky to finally have a terminal that agrees 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 space

Re: PEP 354: Enumerations in Python

2006-02-28 Thread Terry Hancock
dded, should be "strong enums" without this kind of ambiguous behavior. I 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. Chee

Re: Use empty string for self

2006-02-28 Thread Terry Hancock
ill generally prefer to see "self", I still consider the above pretty readable, and it goes more than halfway towards your goal. Others have suggested "_" instead of "s". However, IMHO, it's less visible, takes up the same space as "s", and requir

Re: Default Section Values in ConfigParser

2006-02-28 Thread Terry Hancock
lt_cfg) config.read(['/etc/varimage.cfg', os.path.expandvars('${INSTANCE_HOME}/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: Is it better to use class variables or pass parameters?

2006-03-01 Thread Terry Hancock
ject, then they ought to be expressed as properties of the object. 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]) Anan

Re: PEP 354: Enumerations in Python

2006-03-01 Thread Terry Hancock
e) Symbol / Enum (what I used for "closed" case) Word / WordSet Label / LabelSet I'm sure there are others. Word has the disadvantage of also meaning "32-bit integer" to a lot of CS people. Or perhaps a string. Not immediately an indivisible symbol. Symbol

Re: PEP 354: Enumerations in Python

2006-03-01 Thread Terry Hancock
the main values of using enumerated values is as an aid to documentation, but "WED" is still vague. Could be "Wednesday", could be the "Western Education District" or short for "Wedding". Enumerations are most frequently used in module APIs, so

Re: Suggestions for documentation generation?

2006-03-01 Thread Terry Hancock
arship.python.net/crew/danilo/pythondoc/ > http://effbot.org/zone/pythondoc.htm > > There's also HappyDoc http://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

Re: do design patterns still apply with Python?

2006-03-02 Thread Terry Hancock
n article crying out to be written, "(Learning) Design Patterns with Python". Has it been written already? Cheers, Terry -- 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
different directory to the current file?. Typically you will need to modify sys.path to determine what's on the "PYTHONPATH". Of course, you can also modify the PYTHONPATH environment variable to add new 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: Python advocacy in scientific computation

2006-03-04 Thread Terry Hancock
one point, I was seriously thinking about trying to write some kind of translator to convert those IDL libs into python libs (quixotic of me?). So why rent when you can own? Scientists certainly do understand all that bit about "seeing further" because you're "standing on the

Easy immutability in python?

2006-03-04 Thread Terry Hancock
r maybe I should make an "Immutable" class, and just inherit from it last 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 speci

Re: Easy immutability in python?

2006-03-04 Thread Terry Hancock
x27;s the most practical solution for this problem). 3) Is there a "remarkably clever" way that I can tack on, even if it isn't exactly simple? and only in the unlikely event that answers 1-3 are all "no", would I ask: 4) And as a last resort, if it really i

Re: Python advocacy in scientific computation

2006-03-04 Thread Terry Hancock
In fact, this expression has so many echoes on the web, it would be difficult to ascertain where it actually came from (the derivation is obvious, 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: Reg strip_tags function in Python.

2005-05-07 Thread Terry Hancock
module called stripogram which provides functions both for completely stripping HTML and for allowing a subset of it (if, for example, you would like to keep bold and italic formatting, but nothing else). Just google for "stripogram", it's hosted at zope.org. -- Terry Hancock ( ha

Re: __brace__ (PEP?)

2005-05-11 Thread Terry Hancock
ike sequences or collections at other times. What would __brace__ make the class act like? I think it's just "something else", and that can be handled with methods. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Args By Reference

2005-05-11 Thread Terry Hancock
nts are the *three* most common > immutable objects you'll see... And floats. Floats, strings, tuples, and ints art the *four* most common immutable objects you'll see... Time to break out the comfy chair. ;-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spacework

Re: Python Documentation (should be better?)

2005-05-11 Thread Terry Hancock
this approach, it seems extremely practical to me. *But you do have to remember that strings are documented under "sequences" this is probably my biggest complaint about the Library Reference --- something as important as string methods should have its own heading in the top-level outline

Re: Python Documentation (should be better?)

2005-05-11 Thread Terry Hancock
own modules, too! I love that. ISTM, that Python is the best "Literate Programming" language yet available (much easier than cweb and whatnot that gave us the term). -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://ma

Re: Python Documentation (should be better?)

2005-05-12 Thread Terry Hancock
;Search Documentation" which did a search on http://docs.python.org/ , then? Though I see that "Browse Documentation" does indeed go to http://docs.python.org . Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Representing ambiguity in datetime?

2005-05-17 Thread Terry Hancock
iding how to handle datestamp math, but as this situation occurs frequently in real life, it seems like it shouldn't be avoided. How do other people deal with this kind of problem? Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Running a python program during idle time only

2005-05-22 Thread Terry Hancock
e logical solution for these types of machines. Someone's already mentioned checking the load average, which sounds like a good idea for your application. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Reverse engineer Object Oriented Python code

2005-05-22 Thread Terry Hancock
reate a dia file with UML formatting, IIRC. If it wasn't that, it had to be "pydoc", which is also quite useful. I wouldn't call this "reverse engineering" by the way, but rather "self documentation". Cheers, Terry -- Terry Hancock ( hancock at anansis

Re: Python Impact Analysis Tool ?

2005-05-25 Thread Terry Hancock
t know under another name. What *is* an "impact analysis tool". Something tells me it has little to do with the physics of craters, though that's the first thing that comes to mind. There are a lots of self-documentation tools for Python, though, starting with the interpreter itse

Re: Newbie learning OOP

2005-06-01 Thread Terry Hancock
NGUYEN Thi Thanh Van -> Thi T NGUYEN > # "Thi" means "female" and "Nguyen" is the "last" name of about 50% of > the Vietnamese population ... While I might say something snide about unnecessarily crucifying a piece of "toy

Re: Software licenses and releasing Python programs for review

2005-06-01 Thread Terry Hancock
mercial use: Surely other scholars, if they make use of your software will be using it to justify their salaries, won't they? Of course, you're *entitled* to use any twisted, snare-throwing license you like, but don't expect to be respected for it. -- Terry Hancock ( hancock at anans

Re: The need to put "self" in every method

2005-06-01 Thread Terry Hancock
a lot. ;-) I must say though, that as a newbie, I found this a lot easier to get my head around than learning all the implicit variables that Javascript introduces (e.g. "this", "prototype", etc). -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] SQL-records and OOP

2005-06-01 Thread Terry Hancock
data = select_rows_you_need() smart_data = [SmartRow(r) for r in dumb_data] I don't think there's really much overhead in creating Python classes. In any case, it's never been an issue for me. But I'd still recommend only wrapping the data after you've alre

Re: idiom for constructor?

2005-06-01 Thread Terry Hancock
elf.argspec, args[:expected]) for map in maps: setattr(self, map[0], map[1]) Using this, I get the following response to too many arguments: >>> g = Foo(1, '3', 4.0, 'spam', 'eggs') Traceback (most recent call last): File "",

Re: Software licenses and releasing Python programs for review

2005-06-09 Thread Terry Hancock
of the software. I think you will actually get what you want by just using a copyleft free-license like the GPL. This will prevent the software from being absorbed into a commercial proprietary product, which is what I consider the reasonable part of what you are asking for. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: (OT) lincense protection generator

2005-06-09 Thread Terry Hancock
ough to set this up as the standard way to contact tech support. Most likely you are working with Windows clients, so you'll need something other than "uname", but I'm sure there is something appropriate. You can do it by examining information in Python's sys module, too,

Re:

2005-06-09 Thread Terry Hancock
#x27;..', 'C', filename) f = open(filepath, 'r') etc.? It's really quite straightforward to walk up and down directory trees, please take a closer look at the documentation for os and os.path modules (see http://www.python.org to find documentation for your version).

Re: Any way to not create .pyc files?

2005-06-09 Thread Terry Hancock
e I'm not totally off-base here --- I've had relatively little experience with mixed versions and pyc files, so my assumptions may be a little off, but hopefully someone will correct me if that's so. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http:/

Re: Dealing with marketing types...

2005-06-10 Thread Terry Hancock
tects" "ryan tomayko" "astronaut architects" tomayko "astronaut architects" tomko "ryan tomayko" However, after a bit of brainstorming, I tried: "architecture astronauts" "ryan tomayko" and got this: http://naeblis.c

Re: Dealing with marketing types...

2005-06-10 Thread Terry Hancock
On Friday 10 June 2005 03:06 pm, Kay Schluehr wrote: > Python projects are submarines. You have to care not to go up to soon. Ooh, I like that. I'm going to file that under "useful excuses". Could come in handy! ;-D Cheers, Terry -- Terry Hancock ( hancock at anansispace

Re: without shell

2005-06-10 Thread Terry Hancock
the > answer you can get from my previous post. I haven't used it, but according to the Python 2.4 documentation, the subprocess module does not use any shell. Or the shell is python, as it were. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Any way to not create .pyc files?

2005-06-10 Thread Terry Hancock
-rw-rw-r--1 terryanansi 1701 Jun 10 22:46 pkgs.pyc samwise:/project/terry> It looks to me like Python just deleted a read-only file owned by root in order to replace it with a new pyc file. Can somebody explain that to me?! Isn't that supposed to be impossible? (I can

Re: circular import Module

2005-06-10 Thread Terry Hancock
y'd have to be in __init__.py or possibly in mod1 in order to work correctly), but it's pretty close. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Any way to not create .pyc files?

2005-06-11 Thread Terry Hancock
On Saturday 11 June 2005 06:14 am, Piet van Oostrum wrote: > >>>>> Terry Hancock <[EMAIL PROTECTED]> (TH) wrote: > >TH> It looks to me like Python just deleted a read-only file owned by > >TH> root in order to replace it with a new pyc file. Can somebo

<    1   2   3   4   5   >