Re: Using XML w/ Python...

2005-12-12 Thread Rick Wotnaz
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: > """ > Not wanting to hijack this thread, but it got me interested in > installing amara. I downloaded > Amara-allinone-1.0.win32-py2.4.exe and ran it. It professed that > the installation directory was to be > D:\Python24\Lib\site-packages\ ..

Re: IsString

2005-12-12 Thread Rick Wotnaz
"Tuvas" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > I need a function that will tell if a given variable is a > character or a number. Is there a way to do this? Thanks! > If you really need to, you can test for type: >>> for x in ['3',3,3.1,3j]: ... print type(x) >>> for x

Re: Using XML w/ Python...

2005-12-12 Thread Rick Wotnaz
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: > """ > Spoke too soon, i get this error when running amara in > ActivePython > import amara amara.parse("http://www.digg.com/rss/index.xml";) > > Traceback (most recent call last): > File "", line 1, in ? > File "C:\Python23\Lib

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-12 Thread Rick Wotnaz
Antoon Pardon <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Op 2005-12-11, Rick Wotnaz schreef <[EMAIL PROTECTED]>: >> >> Because you're accustomed to one set of conventions, you >> may find Python's set strange at first. Please try it, and

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-10 Thread Rick Wotnaz
Zeljko Vrba <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On 2005-12-10, Tom Anderson <[EMAIL PROTECTED]> wrote: >> >> ED IS THE STANDARD TEXT EDITOR. >> > And: > INDENTATION > SUCKS >BIG > TIME. > > Using indentation without block termination markers

Re: subset permutations

2005-12-08 Thread Rick Wotnaz
Jay Parlar <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > http://www.bigbold.com/snippets/posts/show/753 A string is also iterable, so whether s is the string (as shown) or list('ACDEFGHIKLMNPQRSTVWY'), as you have it above, this should generate the 16 permutations, as a list of 4-

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-05 Thread Rick Wotnaz
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: >> a decent description or tutorial... is better > > Sound good but... we're programmers, not documentation > specialist or motivational speakers. Why, when I suggest fixing > a design defect with code, do so many programmers want to > respon

Re: General question about Python design goals

2005-12-01 Thread Rick Wotnaz
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Rick Wotnaz wrote: > >> I'm sure Antoon wouldn't object if lists were to be allowed as >> dictionary keys, which would eliminate the multiple castings for >> that situation.

RE: Making immutable instances

2005-12-01 Thread Rick Wotnaz
"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Was it *really* necessary to send 4 separate emails to reply to > four sections of the same email? > > Good netiquette is to intersperse your comments with quoted > sections in a single email. > > Tim Delaney Good

Re: General question about Python design goals

2005-12-01 Thread Rick Wotnaz
"Donn Cave" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: [...] > Tuples and lists really are intended to serve two fundamentally > different purposes. We might guess that just from the fact that > both are included in Python, in fact we hear it from Guido van > Rossum, and one might ad

Re: Why I need to declare import as global in function

2005-11-30 Thread Rick Wotnaz
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On 30 Nov 2005 00:58:45 -0800, [EMAIL PROTECTED] > declaimed the following in comp.lang.python: > >> yes I have imported math in the file I want to use it. But the >> imported module "math" is not visible in function withou

Re: Why are there no ordered dictionaries?

2005-11-23 Thread Rick Wotnaz
"Fuzzyman" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > Christoph Zwerschke wrote: >> - the internal keys list should be hidden > > I disagree. It is exposed so that you can manually change the > order (e.g. to create a "sorted" dict, rather than one ordered > by key insertion). >

Re: about lambda

2005-11-20 Thread Rick Wotnaz
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > Shi Mu wrote: >> what does the following code mean? It is said to be used in the >> calculation of the overlaid area size between two polygons. >> map(lambda x:b.setdefault(x,[]),a) > > The equivalent of : > > def oh_

Re: is parameter an iterable?

2005-11-16 Thread Rick Wotnaz
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Rick Wotnaz wrote. > >> ... which leads me to belive that 'msg' is not type(str). It >> can be coerced (str(msg).find works as expected). But what >> exactly is msg? It

Re: is parameter an iterable?

2005-11-16 Thread Rick Wotnaz
Steven D'Aprano <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > def foo(inputVal): > try: > for val in inputVal: > # do stuff > except TypeError, msg: > if msg == "iteration over non-sequence": > # handle non-iterable case > else: >

Re: Python doc problem example: gzip module (reprise)

2005-11-05 Thread Rick Wotnaz
"Gerard Flanagan" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Xah Lee wrote: >> Python Doc Problem Example: gzip >> [...] >> A quality documentation should be clear, succinct, precise. >> And, the least it assumes reader's expertise to obtain these >> qualities, the better it is. >> >>

Re: convert char to byte representation

2005-10-10 Thread Rick Wotnaz
Scott David Daniels <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Philipp H. Mohr wrote: >> I am trying to xor the byte representation of every char in a >> string with its predecessor. But I don't know how to convert a >> char into its byte representation. > ord('a') == 97; chr(97) ==

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

2005-10-06 Thread Rick Wotnaz
Mike Meyer <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Grant Edwards <[EMAIL PROTECTED]> writes: >> On 2005-10-06, DaveM <[EMAIL PROTECTED]> wrote: Frankly, I can't watch Shakespeare or movies like "the full monty" or "trainspotting" because I can't understand a damn word t

Re: What is "self"?

2005-09-23 Thread Rick Wotnaz
Terry Hancock <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On Friday 23 September 2005 07:11 am, Rick Wotnaz wrote: >> I've long thought that Guido missed an opportunity by not >> choosing to use 'i' as the instance identifier, and making it a >&

Re: What is "self"?

2005-09-23 Thread Rick Wotnaz
Roy Smith <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Ron Adam <[EMAIL PROTECTED]> wrote: >> You can actually call it anything you want but "self" is sort >> of a tradition. > > That's true, but I think needs to be said a bit more > emphatically. There's no reason to call it anything

Re: Proposal: add sys to __builtins__

2005-09-06 Thread Rick Wotnaz
"Michael J. Fromberger" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > In article <[EMAIL PROTECTED]>, > Rick Wotnaz <[EMAIL PROTECTED]> wrote: > >> You're right that there is no necessity for such a change. I >> was not actually

Re: Proposal: add sys to __builtins__

2005-09-05 Thread Rick Wotnaz
"Michael J. Fromberger" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > In article <[EMAIL PROTECTED]>, > Rick Wotnaz <[EMAIL PROTECTED]> wrote: > >> Michael Hoffman <[EMAIL PROTECTED]> wrote in >> news:[EMAIL PROTECTED]

Re: Proposal: add sys to __builtins__

2005-09-04 Thread Rick Wotnaz
"Terry Reedy" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > "Colin J. Williams" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Rick Wotnaz wrote: >>> +1 here. As far as I'm concerned, both os and sys c

Re: Proposal: add sys to __builtins__

2005-09-01 Thread Rick Wotnaz
Michael Hoffman <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > What would people think about adding sys to __builtins__ so that > "import sys" is no longer necessary? This is something I must > add to every script I write that's not a one-liner since they > have this idiom at the bottom:

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing, was Re: Bug in slice type

2005-08-26 Thread Rick Wotnaz
Bryan Olson <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Steve Holden asked: > > Do you just go round looking for trouble? > > In the course of programming, yes, absolutly. > > > As far as position reporting goes, it seems pretty clear that > > find() will always report positive index

Re: Reg python nature.

2005-08-23 Thread Rick Wotnaz
praba kar <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Dear All, >I want to know the link between c and python. > Some people with C background use Python instead > of programming in C.why? > I will now reveal the secret that explains why some people who know how to program i

Re: loop in python

2005-08-22 Thread Rick Wotnaz
km <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hi all, > > Why is it that the implementation of empty loop so slow in > python when compared to perl ? > > #i did this in python (v 1.5) > for x in xrange(1000): > print x > # this took 0.017 seconds > -- >

Where are gui-sig archives?

2005-07-06 Thread Rick Wotnaz
I was trying to view the gui-sig archives, but when I click on the link (from ), I get a "Not Found" error: The requested URL /pipermail/gui-sig/ was not found on this server. Apache/1.3.33 Server at mail.python.org Port 80 Does anyone have an active link to