Re: How to show percentage

2005-09-22 Thread Terry Hancock
to needing a floating point value as other posters have noted, you're going to need a format string, e.g.: >>> print "%5.2f%%" % (100.0/3) 33.33% Note the need to escape "%" as it is normally the format specifier character. Cheers, Terry -- Terry Hancock ( ha

Re: Question About Logic In Python

2005-09-22 Thread Terry Hancock
ens, both can be coerced to 1, so the result is 1*1. This makes perfect sense to me. >>> True and True True Also makes sense (and this is indeed what happens). Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Question About Logic In Python

2005-09-23 Thread Terry Hancock
On Thursday 22 September 2005 07:09 pm, Ron Adam wrote: > Terry Hancock wrote: > > On Thursday 22 September 2005 12:26 pm, Ron Adam wrote: > >>>>True and True > > > > True > > > > Also makes sense (and this is indeed what happens). > > Only

Re: What is "self"?

2005-09-23 Thread Terry Hancock
for anything other than an innermost loop index is a sick and twisted code sadist. You'd prefer what? "count" or "kount" or "i_am_an_innermost_loop_index_counter". I mean "explicit is better than implicit", right? Maybe Fortran warped my brain, but I

Re: What is "self"?

2005-09-23 Thread Terry Hancock
On Friday 23 September 2005 10:42 am, Peter wrote: > Terry Hancock wrote: > >How exactly is that? Anybody who uses "i" as a variable name for > >anything other than an innermost loop index is a sick and twisted > >code sadist. > > > Agreed, though to say

Re: What is "self"?

2005-09-23 Thread Terry Hancock
to grep for it, your loop is TOO DARNED LARGE, USE A FUNCTION CALL! -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I compile Python for the web?

2005-09-23 Thread Terry Hancock
the results were. But I'd recommend search the zope-user mailing list archives or just google for "psyco site:zope.org" Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 350: Codetags

2005-09-27 Thread Terry Hancock
red text). By having a PEP convention for this sort of thing, it becomes easier for such applications to be written. Doesn't that qualify as "non-strict enforcement"? -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 350: Codetags

2005-09-27 Thread Terry Hancock
* #=== I.e. a comment mark followed by a line composed of repeating characters as an alternative separator. These are also pretty in pretty common use. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: What tools are used to write and generate Python Library documentation.

2005-09-27 Thread Terry Hancock
d more information at the web pages for the above tools. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 350: Codetags

2005-09-27 Thread Terry Hancock
a central catalog of such conventions makes it possible for checking software to be consistent. If PyChecker were going to check for such things, it would do so only because a standard convention had been established. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Spoiler to Python Challenge (help!!!)

2005-09-27 Thread Terry Hancock
ch I take it is what your sample data encoded -- though I can't help but notice it is actually much shorter than the "compressed" version. ;-)). This may have some security issues, though, since it evaluates essentially any expression given for user. I'd be interested

Re: Spoiler to Python Challenge (help!!!)

2005-09-28 Thread Terry Hancock
On Tuesday 27 September 2005 10:42 am, Terry Hancock wrote: > >>> bz2.decompress(eval(repr(user))) > 'huge' Actually, it doesn't -- I sent you the wrong version of the email. THIS works (and is what actually produced the output above). >>> bz2.decompre

Re: What tools are used to write and generate Python Library documentation.

2005-09-28 Thread Terry Hancock
On Tuesday 27 September 2005 07:22 pm, Robert Kern wrote: > Terry Hancock wrote: > > On Monday 26 September 2005 10:24 pm, Kenneth McDonald wrote: > > > >>I have a module I'd like to document using the same style... > > > > Google for "epydoc"

Re: Will python never intend to support private, protected and public?

2005-09-28 Thread Terry Hancock
've got to consider that this private and protected stuff might be bunk", too. ;-) "never", "always", "-free" are very dangerous concepts. :-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to find python c-sources

2005-10-06 Thread Terry Hancock
are looking for, and not elsewhere. This also shows where Google fails and newsgroups succeed: when you know what you want, but don't know what it's called. Often, all a poster really needs is the right keyword to use. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to find python c-sources

2005-10-06 Thread Terry Hancock
librarians are the "search engine". They don't respond to the same type of search terms as machines do. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-06 Thread Terry Hancock
feature .../ > > That's also my opinion, but OTOH, Guido's syntax is more close to the syntax > of list comprehensions. GvR's syntax has the advantage of making grammatical sense in English (i.e. reading it as written pretty much makes sense). -- Terry Hancock (

Re: non descriptive error

2005-10-07 Thread Terry Hancock
ptive > message then just "error". anyidea where i need to start looking? By looking at the source code for DutyShift.py? -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
, although I interpret the neologism as meaning something like "execrable utterance": dict.org said: > No definitions found for 'execresence'! Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
s like "thou are" -- if you're going to use "thou", at least conjugate correctly! It's "thou art". Of course, just to keep y'all on your toes, we Texans have not only construed "their" to singular, but also "you", and added a new plural "y'all". As in "Why can't y'all get y'all's selves together and understand that how a person talks is their own business." "Innit?" Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-07 Thread Terry Hancock
On Friday 07 October 2005 10:52 am, Fredrik Lundh wrote: > Terry Hancock wrote: > > GvR's syntax has the advantage of making grammatical sense in English (i.e. > > reading it as written pretty much makes sense). > > as a native Python speaker, I find that argu

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
gon". I am not kidding. This actually happened. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
; or "If I buy a $100 gumball for $80, I have achieved a savings of 20%." (Although, you lose points for style with "achieved", and those are awfully expensive gumballs). ;-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispacework

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Terry Hancock
On Friday 07 October 2005 04:21 pm, Grant Edwards wrote: > On 2005-10-07, Terry Hancock <[EMAIL PROTECTED]> wrote: > > > Well, there's your problem. He learned from engineers. Engineers > > can't speak English. I was instructed in my "Engineering Stat

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-10 Thread Terry Hancock
Sorry for the digression, but the real story behind things like that is kind of interesting, IMHO. ;-) And I think the original joke is pretty dead by now. ;-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: non descriptive error

2005-10-10 Thread Terry Hancock
On Sunday 09 October 2005 06:12 pm, Timothy Smith wrote: > Terry Hancock wrote: > >By looking at the source code for DutyShift.py? > > > well DUH thank you captain obvious! Well, since you apparently missed the subtlety, you DID NOT GIVE ADEQUATE INFORMATION if you expected t

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-10 Thread Terry Hancock
ously haven't been everywhere (;-)), but in my experience, "All y'all" is used only to explicitly include a larger group, rather than a smaller one. In other words, it's just as you would use "all of you" in "proper" English. ;-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's Performance

2005-10-10 Thread Terry Hancock
pam') etc. I'm pretty sure this is what string "internment" is for, though, and that such lookups are optimized out pretty much whenever possible. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-10-10 Thread Terry Hancock
being the other. But I only report what has been told to me. :-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-10 Thread Terry Hancock
On Sunday 09 October 2005 07:50 am, phil hunt wrote: > On Fri, 7 Oct 2005 01:05:12 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: > >GvR's syntax has the advantage of making grammatical sense in English (i.e. > >reading it as written pretty much makes sense). > >

Re: Learning Python

2005-10-10 Thread Terry Hancock
n, Pascal, C, and a bit of C++ later, so I think you probably have a similar PoV to what I had. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's Performance

2005-10-10 Thread Terry Hancock
oks up an attribute is assuming the dumbest possible interpreter design! (One which works directly from the source text). I think *that* was the point. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-11 Thread Terry Hancock
On Tuesday 11 October 2005 09:37 am, Grant Edwards wrote: > On 2005-10-10, Terry Hancock <[EMAIL PROTECTED]> wrote: > >> Likewise, "dude" is often used when addressing a female but > >> almost never when speaking about one in the third person. > > >

Re: Python name lookups / Interning strings

2005-10-11 Thread Terry Hancock
ng: >>> a = "I don't think Python will intern this string." >>> b = "I don't think Python will intern this string." >>> >>> a==b True >>> a is b False Now, however, 'a==b' must do an actual string comparison, and is therefore somewhat slower. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [PIL]: Question On Changing Colour

2005-10-11 Thread Terry Hancock
from the basic button image rgb_new # the new color you want to replace rgb_base with rgb_new = hsv_to_rgb( (new_hue,) + rgb_to_hsv(rgb_base)[1:]) Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-10-13 Thread Terry Hancock
sion of what Zaep does where the sender is > not consciously aware of the permission-getting step. Well, this is already happening at the level of my mail client. I gather you have something more centralized in mind? -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http

Re: PyGame & Web hosts

2005-10-14 Thread Terry Hancock
hat is saved is the hassle of installing the software once it's downloaded. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [PIL]: Question On Changing Colour

2005-10-17 Thread Terry Hancock
rgb_new = hsv_to_rgb(*hsv_new) >>> rgb_new (0.0, 0.0, 0.69996) (You might get a more aesthetically pleasing outcome with a less pure color, by setting the saturation lower). Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: bizarro world (was Re: Python Doc Problem Example: sort() (reprise))

2005-10-17 Thread Terry Hancock
; person... > > > > thanks. > > I'd be delight to. > > My requirements are: 1 cup of fat-free milk, free, and free pizza. """.replace('crowd', 'angry mob') ;-D -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-17 Thread Terry Hancock
en is a factory-direct Dell laptop with a pre-installed Windows XP which had all of the problems I described above. OTOH, the Linux environment I describe is run-of-the-mill Debian Sarge with KDE. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Abstract Methods & Abstract Class

2005-10-21 Thread Terry Hancock
he same purpose. (Search for PyProtocols or Zope to follow up on that). -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs Ruby

2005-10-21 Thread Terry Hancock
e (a) extensive (and pretty much common) Javadoc/ > > docstrings and (b) implementing in the Python version a feature > > present in the standard Java library (scheduling a thread to run > > at specified intervals and time out). Strip the Javadoc/docstrings > > out and it

UI Design, XUL, Blender

2005-10-22 Thread Terry Hancock
ure out which would be easier. Any more informed comments from people who know the various GUI packages would be a lot of help. I assume it goes without saying that I'm looking at Python as an integration language. In my ideal design, the M,V, and C components are separate Python modules, s

Re: Zope and Persistence

2005-10-22 Thread Terry Hancock
pposed to store an integer in Data.fs. Thanks. If you actually needed imports and access to the internal ZODB machinery, then you would need to write a "Product", not work in the ZMI at all. But you don't. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-24 Thread Terry Hancock
o several different lists and topic-related sites. The two lists I happened to check are years out of date (one was from 1994!) and do not even list Microsoft. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman

Re: Microsoft Hatred FAQ

2005-10-24 Thread Terry Hancock
uot; with "ZERO". The absence of an external system of evaluating law, does not mean that all laws must be negated. It equates to having no basis for prefering them to exist or not, and thus abdicating all right to change them. People who believe this really need, therefore, to shut up. ;-D -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: output from external commands

2005-10-24 Thread Terry Hancock
y to make such changes. Note also that for those who count, "str(f)" is exactly as long (in keystrokes) as "'%s'%f", making the "just" a matter of opinion. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Re: output from external commands

2005-10-25 Thread Terry Hancock
pointing out that at the time it was the > only one that actually included code that did what the OP wanted. I think Mr. Lundh's point was only that the output from glob.glob is already guaranteed to be strings, so using either '%s'%f or str(f) is superfluous. -- Terry Hanco

Re: Math markup in code documentation?

2005-10-25 Thread Terry Hancock
t; system that'll do the job... MathML or LaTeX possible? epydoc has some capacity for rendering equations and math symbols. I'm not sure if it supports the full range of TeX expressions. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.ana

Re: Microsoft Hatred FAQ

2005-10-28 Thread Terry Hancock
't really expect you to absorb this information, because you are so obviously opposed to facing this reality, but I also think it's dangerous to let extremists go unchallenged, lest they be believed to lack opposition. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's website does a great disservice to the language

2005-11-01 Thread Terry Hancock
g list. ;-) Seriously, though, what would you change about it? It's not flashy, but works extremely well. You can say the same for Python itself -- I think that may be its best quality. So how better to show that than by having a site with the same character? -- Terry Hancock ( hancock at anansispa

Re: Importing Modules

2005-11-02 Thread Terry Hancock
omeone other than the author of the main program). In such a situation you should also take reasonable precautions to prevent major collisions, even if you expect it to be the plugin author's responsibility to avoid them (e.g. establish interface rules for plugins and a formal API for intera

Re: An FAQ Please Respond

2005-11-02 Thread Terry Hancock
llation problem). http://www.blender.org/ -- blender site and developers' forum Since Blender embeds its own Python interpreter, there is some question as to what exactly it means by "recognizing" an installed Python. I'm guessing it only uses the library. Cheers, Terry -- Terry Hancock

[no subject]

2005-11-04 Thread Terry Hancock
on't know how other countries characterize offenses. For example, one of the big points about so-called "software piracy" is that the recording and movie industry has been trying very hard to conflate "copyright violation" with "theft" -- but the former is only a

[no subject]

2005-11-04 Thread Terry Hancock
n the "copyright infringement"="piracy" bandwagon, so if they are called criminals by the conflation of the two concepts, then they are merely being hoisted by their own petard, so I can't feel any sympathy there. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Which Version of Linux

2005-11-06 Thread Terry Hancock
you were criticizing FHS, but now I don't think so. If you're talking about the KDE/Gnome menus, that may be interesting. I've seen a lot of conflicting and inconsistent layouts, and I'm not sure how I would do it, given the chance. -- Terry Hancock ([EMAIL PROTECTED]) Ana

XUL behavior in Python via XPCOM, Mozilla

2005-11-12 Thread Terry Hancock
g able to do this in Python, including a claim that a release was targeted for early November (2005), to provide this. Now I can't find it again. Anyway, I was hoping someone on c.l.p / python.org would have a reliable reference on this. Thanks, Terry -- Terry Hancock ([EMAIL PROTECTED

Re: XUL behavior in Python via XPCOM, Mozilla

2005-11-12 Thread Terry Hancock
On Sat, 12 Nov 2005 15:27:01 -0500 Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Sat, 12 Nov 2005 14:25:51 -0600, Terry Hancock > <[EMAIL PROTECTED]> wrote: > >I recently saw a claim that Mozilla XUL behaviors > >(normally scripted in Javascript) can (or per

Re: XUL behavior in Python via XPCOM, Mozilla

2005-11-12 Thread Terry Hancock
he record). Thanks for the replies, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: how to organize a module that requires a data file

2005-11-17 Thread Terry Hancock
s approach, because an individual user might want to shadow the system install with his own version of the data. That's pretty typical behavior for configuration files on any Posix system. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Can you set a class instance's attributes to zero by setting the instance to zero?

2005-11-19 Thread Terry Hancock
or(0,0) Or if you want to be shorter, more poetic, and make future maintainers curse you, you can call it "O": O = Vector(0,0) ;-) -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Any royal road to Bezier curves...?

2005-11-21 Thread Terry Hancock
space. 3D space would be wonderful, but I could > jimmy-rig something if I could just get 2D... Are bezier > curves really what I want after all? Or NURBS, yeah, probably. -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeout for regular expression

2005-11-23 Thread Terry Hancock
ink I have an application for that. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython Licence vs GPL

2005-11-23 Thread Terry Hancock
he fact by itself that you started with the original work in your editor does not, by the letter of the law, make it a derivative work. The "clean-room implementation" concept is based on alleviating a fear of litigation -- it forms the basis of a defense. It is *not* a legal requirem

Re: Syntax

2005-11-26 Thread Terry Hancock
ity" in the usual sense, but the first syntax imports a lot of stuff into the current namespace, increasing the risk of unintentionally clobbering local names. So it's certainly "riskier" in the sense of "likely to cause bugs". -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation suggestions

2005-12-06 Thread Terry Hancock
ho needs the Reference Guide? (not a rhetorical question). Maybe it should be optimized for those users. > Dumping the RefGuide means there isn't a more formal-style > description of Python's semantics. I'm not a language implementor, so my vote shouldn't count

Re: PythonMagick on Windows

2005-12-06 Thread Terry Hancock
r, you will see that this is in fact how ImageMagick does it -- Postscript and PDF rendering is delegated to ghostscript. So naturally, calling it directly is faster. Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation suggestions

2005-12-08 Thread Terry Hancock
m that the Python > code is actually running on safe? Ruby may have a real > bastion mode, but Python doesn't. Should be able to use Jython and run on the visitor's machine, shouldn't you? -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Terry Hancock
uency of its periodic change in radial velocity was higher -- but I could've meant that it was receeding faster, had a higher amplitude of radial velocity change, etc.). I think "lambda" is fine. Basically if you find you need one, you probably ought to be using the CS term an

Re: Looking for Form Feeds

2005-01-24 Thread Terry Hancock
rs, I like to switch to hex. So you could just do something like: pages = open('myfile.dat', 'rb').read().split('\x0c\x0b') to load each page into a list, for example. HTH, Terry -- -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www

Re: What's so funny? WAS Re: rotor replacement

2005-01-24 Thread Terry Hancock
d still -- lately I've been using the Debian package though, so I don't have to worry about it). I know that you don't want PIL to go into the core, of course, but I'm pretty sure that problem would've needed fixing, if it were to be introduced. Small problem, trivial to

Re: One-Shot Property?

2005-01-28 Thread Terry Hancock
k (most recent call last): File "", line 1, in ? AttributeError: can't set attribute >>> Unfortunately this seems to break your technique, too: >>> setattr(c, 'x', c.x) Traceback (most recent call last): File "", line 1, in ? AttributeError: can't set attribute Too bad. I was kind of hoping it was just a typo. :-( Unless I'm missing something, anyway. Cheers, Terry -- -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: What's so funny? WAS Re: rotor replacement

2005-01-28 Thread Terry Hancock
either 1.1.3 or 1.1.4, and I'm pretty sure it was the latter. Now if you've actually fixed this, I look forward to trying it out the next time I have to do a complete from-source installation. I'll say "thank you", just in case. Cheers, Terry -- -- Terry Hancock

Re: Regex for repeated character?

2005-06-18 Thread Terry Hancock
> I think it's fantastic, but I'd be bound to say that given that it's the > same as what I posted almost two days ago :-) Guess there's only one obvious way to do it, then. ;-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Extensions on Linux: import without underscore?

2005-06-19 Thread Terry Hancock
, but you do at least know you can just give it a new name: import _bright bright = _bright right? You can attach a new name to any Python object trivially (this is akin to a pointer assignment in C, it does not copy any significant amount of data). -- Terry Hancock ( hancock

Re: references/addrresses in imperative languages

2005-06-19 Thread Terry Hancock
[j1]=l[n1*j+j1] > r.append( h[:] ) > return r Too bulky? How about: def parti(L, j): return [L[k*j:(k+1)*j] for k in range(len(L)/j)] e.g.: >>> >>> parti([1,2,3,4,5,6,7],3) [[1, 2, 3], [4, 5, 6]] >>> parti([1,2,3,4,5,6],2) [[1, 2], [3, 4], [5,

Re: Extensions on Linux: import without underscore?

2005-06-20 Thread Terry Hancock
On Monday 20 June 2005 06:39 am, Kent Johnson wrote: > Terry Hancock wrote: > > Okay, you may want a more elegant way to do this and other people > > have already responded to that point, but you do at least know you > > can just give it a new name: > > > > im

Re: references/addrresses in imperative languages

2005-06-21 Thread Terry Hancock
ky or underneath. Made me feel like an idiot, though. ;-) Seriously though, thanks for the correction. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: *Python* Power Tools

2005-06-21 Thread Terry Hancock
aste of effort since: > > +1 WOFTAM-of-the-year [...] > > Or would people really like to claim a pure Python set of UNIX > > utilities? > > Sorry, can't parse that last sentence. In other words, it'd be a purely aesthetic goal. Which is only a waste if art is

Re: A World Beyond Capitalism 2005, An Annual International Multiracial Alliance Building Peace Conference Is Accepting Proposals...

2005-06-22 Thread Terry Hancock
thout bothering to pay attention to netiquette. Seems like that would've been an obvious first step in making peace on Usenet, anyway. ;-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Package organization

2005-06-22 Thread Terry Hancock
. In tightly optimized loops, some folks recommend avoiding this. But then, so what? PDE_File = PDF.File and the problem goes away. This always seems cleaner to me than: PDF.PDFFile etc, which drives me crazy to read. Useless repetition just gets annoying. -- Terry Hancock ( hancock at anansis

Re: Avoiding deadlocks in concurrent programming

2005-06-23 Thread Terry Hancock
for using an *object DBMS*, such as ZODB: It certainly does support transactions, and "abstracting the data into tables" is a non-issue as ZODB stores Python objects more or less directly (you only have to worry about ensuring that objects are of "persistent" types -- meaning either i

Re: how to use more than 1 __init__ constructor in a class ?

2005-06-23 Thread Terry Hancock
es to mind. And it does make it easier to find help on problems, if you know what other people call them. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system(cmd) isn't working

2005-06-23 Thread Terry Hancock
edded space in the filename?). Need I mention that using filenames with spaces is a great evil? ;-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: key - key pairs

2005-06-23 Thread Terry Hancock
= dict([ (b,a) for a,b in string2time.items() ]) Note that if string2time has duplicate values, this will arbitrarily pick one (in a consistent, but implementation dependent way) to use as the key in the inverse mapping. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http:

Re: A tool for Python - request for some advice

2005-06-25 Thread Terry Hancock
embedded systems or "rescue disk" Linuxes (i.e. you might have to go back to 1.5). -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: a dictionary from a list

2005-06-25 Thread Terry Hancock
is still only 3 lines and will run in Python 1.5, IIRC. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-26 Thread Terry Hancock
reates them. I really think "=" ought to be accepted as well, and "==" deprecated. But, hey, nobody asked me, I guess. And it doesn't kill me to type the extra "=". ;-) Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-26 Thread Terry Hancock
expression as well as an assignment. But I don't think Python reads it that way -- it just has code to recognize multiple assignment as a statement. I think I remember reading that in the Language Reference or something. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.

Re: what is your opinion of zope?

2005-06-26 Thread Terry Hancock
he developer to understand your entire application in order to be able to contribute --- if you are hoping for contributions from user-developers on a free-software application, then this has to be a good idea). Without more specifics about what you are looking for, it would be hard to reply furth

Re: Favorite non-python language trick?

2005-06-26 Thread Terry Hancock
On Sunday 26 June 2005 06:11 am, Robert Kern wrote: > Terry Hancock wrote: > > On Sunday 26 June 2005 05:39 am, Torsten Bronger wrote: > >>However, then you must forbid a=b=1 for assigning to two variables > >>at the same time. > > You need to differentiate >

Re: Photo layout

2005-06-26 Thread Terry Hancock
do this with PIL + reportlab. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Life of Python

2005-06-27 Thread Terry Hancock
ide test code that the application programmer can use to check out their classes during development. Of course, one of the points of this is that Python *does* provide these abilities, in contrast to what the OP said. They may not look quite like they do in Java, and they may not seem as "tough". But, IMHO, they are "tough enough". -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Terry Hancock
to erase any distinction between the two concepts. Stylistically, dictionaries are the "right" thing to use when the elements are going to be very fluid, whereas objects are expected to have more or less fixed attribute and method interfaces. Making "access to attribute by s

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Terry Hancock
very similar to the kind of graphics interface that I had when I was learning on my TRS-80 Color Computer with BASIC. ;-) -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: what is your opinion of zope?

2005-06-28 Thread Terry Hancock
On Tuesday 28 June 2005 08:35 pm, Avery Warren wrote: > On Sun, 26 Jun 2005 23:14:48 -0500, Terry Hancock wrote: > > > However, I'm not sure why you want this information. If you are > > trying to import data into Zope, you are more likely going to be > > using Zope

Re: Modules for inclusion in standard library?

2005-06-29 Thread Terry Hancock
h, I didn't know or care about ctypes, but now I'm interested! ;-D -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-30 Thread Terry Hancock
tions, but I see now that the site does mention OZ/Mozart as comparables. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Terry Hancock
rs, No silly, it's "duck typing", not duct taping! -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   >