Is there a reason not to do this?

2006-11-30 Thread Ron Garret
One of the things I find annoying about Python is that when you make a change to a method definition that change is not reflected in existing instances of a class (because you're really defining a new class when you reload a class definition, not actually redefining it). So I came up with thi

Re: Is there a reason not to do this?

2006-11-30 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Ron Garret schrieb: > > One of the things I find annoying about Python is that when you make a > > change to a method definition that change is not reflected in existing >

Re: Is there a reason not to do this?

2006-11-30 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Ron Garret" <[EMAIL PROTECTED]> wrote: > > > > > > One of the things I find annoying about Python is that when you make a > > change to a method

Re: Is there a reason not to do this?

2006-11-30 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Ron Garret <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > > > "Ron Garret" <[EMAIL PROTECTED]> wrote: > > > > >

Re: Is there a reason not to do this?

2006-11-30 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Paul McGuire" <[EMAIL PROTECTED]> wrote: > "Carl Banks" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > A straightforward, Pythonic way to do it would be to create an > > intermediate representation that understands both the existing class >

Functions, callable objects, and bound/unbound methods

2006-12-01 Thread Ron Garret
If I do this: def f(self): print self class c1: pass setattr(c1, 'm1', f) Then f is automagically transmogrified into the appropriate sort of method depending on how it is used: >>> c1.m1 >>> c1().m1 > >>> c1().m1() <__main__.c1 instance at 0x51ec60> Note that m1 gets passed a self argument

Re: Functions, callable objects, and bound/unbound methods

2006-12-01 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Kent Johnson <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > The reason I want to do this is that I want to implement a trace > > facility that traces only specific class methods. I want to say: > > > > trace(c1.m1) >

Re: Functions, callable objects, and bound/unbound methods

2006-12-01 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > Duncan Booth wrote: > > Ron Garret <[EMAIL PROTECTED]> wrote: > > > > > I want to say: > > > > > > trace(c1.m1) > > > > > > an

Re: Is there a reason not to do this?

2006-12-01 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Carl Banks" <[EMAIL PROTECTED]> wrote: > The principle behind this is pretty much "it was just a language design > decision". Yes, and I'm not taking issue with the decision, just pointing out that the desire to do things differently is not necessarily perverse.

Re: Is there a reason not to do this?

2006-12-01 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Michele Simionato" <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > One of the things I find annoying about Python is that when you make a > > change to a method definition that change is not reflected in existing > >

Re: Is Python a Zen language?

2006-02-25 Thread Ron Stephens
Actually, Python has the distinction of being both a great tool language *and* a great Zen language. That's what makes Python so cool ;-))) Ron Stephens Python411 www.awaretek.com/python/index.html -- http://mail.python.org/mailman/listinfo/python-list

Re: sort one list using the values from another list

2006-02-26 Thread Ron Adam
s2): d = dict(zip(s2,s1)) s1[:] = (d[n] for n in sorted(d.keys())) It's faster on my system because d.keys() is already sorted. But that may not be the case on other versions of python. Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: sort one list using the values from another list

2006-02-26 Thread Ron Adam
Alex Martelli wrote: > Ron Adam <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: >>> Your solution Steven Bethard looks very intelligent, here is a small >>> speed test, because sorting a list according another one is a quite >>> common ope

Re: sort one list using the values from another list

2006-02-26 Thread Ron Adam
assert len(d) == len(s1) s1[:] = (d[n] for n in sorted(d.keys())) Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: sort one list using the values from another list

2006-02-26 Thread Ron Adam
Alex Martelli wrote: > Ron Adam <[EMAIL PROTECTED]> wrote: >... >> Considering the number time I sort keys after getting them, It's the >> behavior I would prefer. Maybe a more dependable dict.sortedkeys() >> method would be nice. ;-) > > sorte

Re: sort one list using the values from another list

2006-02-26 Thread Ron Adam
Delaney, Timothy (Tim) wrote: > Ron Adam wrote: > >> Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] >> on win32 >> >> I was a bit surprised by them being sorted. I just happend to try >> d.keys() in place of s2, and it sped up. I wa

Re: sort one list using the values from another list

2006-02-27 Thread Ron Adam
Ron Adam wrote: > Alex Martelli wrote: >> Ron Adam <[EMAIL PROTECTED]> wrote: >>... >>> Considering the number time I sort keys after getting them, It's the >>> behavior I would prefer. Maybe a more dependable dict.sortedkeys() >>> method

Re: sort one list using the values from another list

2006-02-27 Thread Ron Adam
Scott David Daniels wrote: > Ron Adam wrote: >> Ron Adam wrote: >> This probably should be: >> >> def psort11(s1, s2): >> d = dict(zip(s2,s1)) >> assert len(d) == len(s1) >> s1[:] = list(d[v] for v in sorted(d)) > > You could d

Re: sort one list using the values from another list

2006-02-28 Thread Ron Adam
[EMAIL PROTECTED] wrote: > Following Ron Adam solution (and using [] instead of list() in the last > line), this may be a possible solution of the problem, that is often > quite fast: > > def psort16(s1, s2): > try: > d = dict(izip(s2, s1)) > except TypeE

Re: New Python regex Doc

2005-05-07 Thread Ron Adam
Xah Lee wrote: > Let me expose one another fu Hello Xah, I think you will continue to have difficulty getting respect on this matter as long as you show disrespect to those who have come before you. When you refer to the documentation as being f'ing stupid, and other disrespectful terms, y

Re: __brace__ (PEP?)

2005-05-09 Thread Ron Adam
James Stroud wrote: > Hello All, > > If "__call__" allows anobject() and "__getitem__" allows anobject[arange], > why > not have "__brace__" (or some other, better name) for anobject{something}. > Such braces might be useful for cross-sectioning nested data structures: > > anary = [[1,2,3],[4,

Re: Python 2.4 & BLT ?

2005-05-10 Thread Ron Adam
StepH wrote: > Hi, > > I'm not able to install BLT on my Python 2.4 (upgraded to 2.4.1) > distibution... > > I'v try to download btlz-for-8.3.exe, but when i try to install it, i've > a msgbox saying to the file is corrupt... > > Any idea ? > > Thanks. > > StepH. Have you tried blt2.4z-for-

Re: Python Graphing Utilities.

2005-05-10 Thread Ron Adam
Kenneth Miller wrote: > Hello All, > > I am new to Python and i was wondering what graphing utlities would be > available to me. I have already tried BLT and after weeks of unsuccesful > installs i'd like to find something else. Anything someone would recommend? > > Regards, > Ken BLT does

Re: Python 2.4 & BLT ?

2005-05-11 Thread Ron Adam
StepH wrote: > Ron Adam a écrit : > >>StepH wrote: >> >> >>>Hi, >>> >>>I'm not able to install BLT on my Python 2.4 (upgraded to 2.4.1) >>>distibution... >>> >>>I'v try to download btlz-for-8.3.exe, but when

Re: Python 2.4 & BLT ?

2005-05-12 Thread Ron Adam
StepH wrote: > Ron Adam a écrit : > >>StepH wrote: >> >> >>>Ron Adam a écrit : >>> >>> >>>>StepH wrote: >>>> >>>> >>>> >>>>>Hi, >>>>> >>>>>I'm

Re: Python Documentation (should be better?)

2005-05-12 Thread Ron Adam
Steven Bethard wrote: > Skip Montanaro wrote: > >>Mike> Given that Python hides the difference between user-defined >>Mike> objects and built-in objects, it's not clear to me that anything >>Mike> other than the current system, with all the classes/types in one >>Mike> place, make

Re: Python Documentation (should be better?)

2005-05-13 Thread Ron Adam
Steven Bethard wrote: > Ron Adam wrote: > >>What I would like to see is something like the following for each item: >> >>0. reference @ sequence code >>2. "Builtin" | "import " >>3. Type/class: Name/Syntax >>4. Description with ex

Re: Python 2.4 & BLT ?

2005-05-14 Thread Ron Adam
StepH wrote: >> >> A little googling found the following which may give you a clue or >> ideas of further searches. Also run a virus scanner on the file >> before hand. >> >> http://www.noteworthysoftware.com/composer/faq/90.htm > > > Argg... I always find me stupid when i don't have find my

Quick Reference from module doc strings.

2005-05-14 Thread Ron Adam
Does anyone have suggestions on how to improve this further? Cheers, Ron_Adam def getobjs(object, dlist=[], lvl=0, maxlevel=1): """ Retrieve a list of sub objects from an object. """ if object not in dlist: dlist.append(object) if lvl200: s = object[0:

Exception question

2005-05-14 Thread Ron Adam
I'm trying to understand exception handling better and have a question I haven't been able to find an answer too. Which probably means It won't work, but... Do exceptions that take place get stored in a stack or list someplace? For example in: try: try: try: riskyf

Re: Exception question

2005-05-15 Thread Ron Adam
Steven Bethard wrote: > Ron Adam wrote: > >>Do exceptions that take place get stored in a stack or list someplace? > > [snip] > >>I know I can catch the error and store it myself with, >> >>except Exception, exc: >> >>or possibly, >

Re: Precision?

2005-05-15 Thread Ron Adam
tiissa wrote: > Steffen Glückselig wrote: > >1.0 + 3.0 + 4.6 >> >>8.5996 >> >>Ehm, how could I get the intuitively 'correct' result of - say - 8.6? >>;-) > > > You may find annex B of the python tutorial an interesting read: > http://docs.python.org/tut/node16.html In addition t

Re: Quick Reference from module doc strings.

2005-05-15 Thread Ron Adam
I think this deserves a little more of a description than I gave it initially. The routine in the previous message does a little more than just print out __doc__ strings. It outputs a formatted alphabetical list of objects in a module with each objects, name, class or type, and then tries to

Re: Quick Reference from module doc strings.

2005-05-15 Thread Ron Adam
John Machin wrote: > Ron Adam wrote: > >>Does anyone have suggestions on how to improve this further? > > > Not functionally (from me, yet). However if you can bear a stylistic > comment, do read on :-) > > >> elif (isinstance(object,str) >>

Re: Precision?

2005-05-15 Thread Ron Adam
Ron Adam wrote: > tiissa wrote: > >>Steffen Glückselig wrote: >> >> >>>>>>1.0 + 3.0 + 4.6 >>> >>>8.5996 >>> >>>Ehm, how could I get the intuitively 'correct' result of - say - 8.6

Re: Quick Reference from module doc strings.

2005-05-15 Thread Ron Adam
Scott David Daniels wrote: > Althought object is a horrible name for your own value (there is a builtin > object which you use for defining new-style classes), you probably want: Good point, I agree. It's a bad habit to start, sooner or later it would cause a problem. I'll find something else

Re: Quick Reference from module doc strings.

2005-05-16 Thread Ron Adam
Scott David Daniels wrote: > Ron Adam wrote: > >>Do you have any feature suggestions, additional information that could >>go in, something that would extend the content in some way and make it >>more useful? >> >>As it stands now, it could be just a module,

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Michele Simionato wrote: >>Do you have any feature suggestions, additional information that > > could > >>go in, something that would extend the content in some way and make > > it > >>more useful? > > > I have written something similar which I use all the time. It generates > ReST > output w

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Michele Simionato wrote: > Ron Adam: > > >>Sound great! Adding a command line parser, I'm going to add a brief ^---^ That part should have been deleted, I meant your whole program sounded good, not just that part. :-) >>

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Scott David Daniels wrote: > Ron Adam wrote: > >> ...What would be the advantage of using StringIO over list.append with >> ''.join()? > > The advantage is more in using a function that prints as it goes > rather than building up a large string to print.

Re: Representing ambiguity in datetime?

2005-05-17 Thread Ron Adam
John Machin wrote: > On Tue, 17 May 2005 17:38:30 -0500, Terry Hancock > <[EMAIL PROTECTED]> wrote: > > >>What do you do when a date or time is >>incompletely specified? ISTM, that as it is, there is no >>formal way to store this --- you have to guess, and there's >>no way to indicate that the

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Michele Simionato wrote: > Ron Adam: > >>Thats part of what I'm trying to resolve, the doc strings a lot of > > time > >>isn't enough by itself or is missing. So I'm trying to build up a >>complete enough record so if there is no doc string, at

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-18 Thread Ron Adam
Philippe C. Martin wrote: >>Another way would be to merge the three lists into one of 3-tuples, sort, >>and unmerge, similarly to the DSU pattern -- which raises the question: >>why are you using three lists in the first place? > > > :-) Thanks, the lists will evolve and are also stored in 'csv'

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-18 Thread Ron Adam
Steven Bethard wrote: > Ron Adam wrote: >>grades.sort(lambda x,y: cmp(students[x[1]][0], students[y[1]][0])) > Assuming that students[x[1]][0] is what you want to sort on, this may > also be written as: > > grades.sort(key=lambda x: students[x[1]][0])

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

2005-06-03 Thread Ron Adam
Fernando M. wrote: > Hi, > > i was just wondering about the need to put "self" as the first > parameter in every method a class has because, if it's always needed, > why the obligation to write it? couldn't it be implicit? > > Or is it a special reason for this being this way? > > Thanks. Here'

Re: Scope

2005-06-04 Thread Ron Adam
Elliot Temple wrote: > I want to write a function, foo, so the following works: > > def main(): > n = 4 > foo(n) > print n > > #it prints 7 > > if foo needs to take different arguments, that'd be alright. > > Is this possible? It is possible if you pass mutable objects to foo such

"also" to balance "else" ?

2005-06-13 Thread Ron Adam
fore.) Changing the for-else is probably a problem... This might be a 3.0 wish list item because of that. Is alif too simular to elif? On the plus side, I think this contributes to the pseudocode character of Python very well. Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: "also" to balance "else" ?

2005-06-13 Thread Ron Adam
k of having an also. I was parsing and formatting doc strings at the time, and also would allow it to become. if : BLOCK1 elif : BLOCK2 also: BLOCK3 Which is much easier to read. Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: "also" to balance "else" ?

2005-06-13 Thread Ron Adam
John Roth wrote: > > "Ron Adam" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> Currently the else block in a for loop gets executed if the loop is >> completed, which seems backwards to me. I would expect the else to >> compl

Re: "also" to balance "else" ?

2005-06-13 Thread Ron Adam
Andrew Dalke wrote: > Ron Adam wrote: > >>It occurred to me (a few weeks ago while trying to find the best way to >>form a if-elif-else block, that on a very general level, an 'also' >>statement might be useful. So I was wondering what others woul

Re: "also" to balance "else" ?

2005-06-13 Thread Ron Adam
Terry Hancock wrote: > On Monday 13 June 2005 11:09 pm, Ron Adam wrote: >>My suggestion is to use, also as the keyword to mean "on normal exit" >>'also' do this. > > > Unfortunately, "also" is also a bad keyword to use for this, IMHO. &

Re: "also" to balance "else" ?

2005-06-14 Thread Ron Adam
or counter behavior is when a break statement executes. Thus the 'else' block is the normal result, and the skipping the 'else' block becomes the abnormal counter behavior. So while the logic is consistent, the expected context is reversed. Why is e

Re: "also" to balance "else" ?

2005-06-14 Thread Ron Adam
w load and return it. module = imp.load_module(modname, None, modname, \ ('', '', type)) return 0, module, { } # not found # return None None of these are big or dramatic changes of the sort that I couldn't live without. Finding examples in the library is more difficult than I expected, so while this seems like a good idea... I'm not convinced yet either. But that is why I posted is to find out what other thought. Regurds, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: "also" to balance "else" ?

2005-06-15 Thread Ron Adam
Fredrik Lundh wrote: > Ron Adam wrote: > > >>So the (my) confusion comes from the tendency to look at it in terms of >>overall program flow rather than in terms of the specific conditional >>logic. >> >>In a for loop the normal, as in terminating normally

Re: "also" to balance "else" ?

2005-06-15 Thread Ron Adam
ink these are sufficiently explicit as to avoid being non-intuitive. The endloop might be generalized into a endblock or endsuite statement possibly. I'm not sure if that would have any uses's in the proposed "with" statements or not. (?) Regards, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: "also" to balance "else" ?

2005-06-15 Thread Ron Adam
Nicolas Fleury wrote: > Ron Adam wrote: > >> It occurred to me (a few weeks ago while trying to find the best way >> to form a if-elif-else block, that on a very general level, an 'also' >> statement might be useful. So I was wondering what others would thin

implementing callback function

2007-05-31 Thread Ron Provost
ould get '4' printed but instead get the above error. What am I doing wrong? Thanks, Ron-- http://mail.python.org/mailman/listinfo/python-list

idestudio

2007-06-27 Thread Ron Provost
Has anyone been able to download idestudio? Any link I find on google is broken. Thanks, Ron-- http://mail.python.org/mailman/listinfo/python-list

Re: Break up list into groups

2007-07-17 Thread Ron Adam
one... def groupdata(data, fn): start = 0 for n in range(1, len(data)): if fn(data[n]): yield data[start:n] start = n yield data[start:] print list(groupdata(l, lambda x: x & 0x80)) Cheers ;-) Ron > > seqs = [# Original: >

Re: Break up list into groups

2007-07-17 Thread Ron Adam
ups.append(seq[start:]) return groups This passes all the tests and runs about the same speed. Cheers, Ron > > def gengroups7(seq): > iseq = iter(xrange(len(seq))) > start = 0 > for i in iseq: > if seq[i]&0x80: > s

Re: Break up list into groups

2007-07-20 Thread Ron Adam
seq[start:] (I also wanted to compare this to Georges solution, maybe later.) Now if there is some way to generalize this so it can be used in a broader range of situations without loosing too much of it's efficiency. Of course then maybe group by would be better. Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Select weirdness

2007-04-21 Thread Ron Garret
Here's my code. It's a teeny weeny little HTTP server. (I'm not really trying to reinvent the wheel here. What I'm really doing is writing a dispatching proxy server, but this is the shortest way to illustrate the problem I'm having): from SocketServer import * from socket import * from sele

Re: Select weirdness

2007-04-22 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > > The only difference I can discern is that the browser send \r\n > > for end-of-line while telnet just sends \n. ... > > But I don't see why that should make any difference. > > Easy. If you only accept "\r\n

Re: Select weirdness

2007-04-22 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Irmen de Jong <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > Here's my code. It's a teeny weeny little HTTP server. (I'm not really > > trying to reinvent the wheel here. What I'm really doing is writing a

Re: Select weirdness

2007-04-22 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Ron Garret <[EMAIL PROTECTED]> wrote: > Here's my code. It's a teeny weeny little HTTP server. (I'm not really > trying to reinvent the wheel here. What I'm really doing is writing a > dispatching proxy server, but t

Re: Select weirdness

2007-04-22 Thread Ron Garret
I think I've figured out what's going on. First, here's the smoking gun: I changed the code as follows: class myHandler(StreamRequestHandler): def handle(self): print '>>>' while 1: sl = select([self.rfile],[],[],1)[0] print sl l = self.rfile.readline() i

Bug in select (was: Re: Select weirdness)

2007-04-22 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Ron Garret <[EMAIL PROTECTED]> wrote: > The answer is obvious: select is looking only at the underlying socket, > and not at the rfile buffers. Here is conclusive proof that there's a bug in select: from socket import * from select

Re: Bug in select

2007-04-22 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > > So this is clearly a bug, but surely I'm not the first person to have > > encountered this? Is there a known workaround? > > It's hard to see

Re: Bug in select

2007-04-22 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > > Geez you people are picky. Since I ran this several times I ran into > > the TIM_WAIT problem. Here's the actual transcript: > > It's not abou

Re: Bug in select (was: Re: Select weirdness)

2007-04-22 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > Well, on WinXP, Python 2.4, with I should have specified: I'm running 2.5 on unix. (I've reproduced the problem on both Linux and OS X.) rg -- http://mail.python.org/mailman/listinfo/python-list

Re: Select weirdness

2007-04-23 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Irmen de Jong <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > I don't understand why socketserver calling select should matter. (And > > BTW, there are no calls to select in SocketServer.py. I'm using > > Python

Re: Select weirdness

2007-04-23 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 23 Apr 2007 04:33:22 -0300, Ron Garret <[EMAIL PROTECTED]> > escribió: > > > I have not been able to find a proxy server that can proxy to unix > > socket

Re: Select weirdness

2007-04-23 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > Twisted does this out of the box, for what it's worth. Thanks. I will look at that. rg -- http://mail.python.org/mailman/listinfo/python-list

Re: Select weirdness

2007-04-23 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Donn Cave <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Ron Garret <[EMAIL PROTECTED]> wrote: > > > The answer is obvious: select is looking only at the underlying socket, > > and not at the rfile bu

Re: pydoc and imported modules

2007-04-25 Thread Ron Adam
#x27;t in __all__. This is probably what you are seeing. I'm currently rewriting pydoc, so what behavior would you like to see? Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Sorting attributes by catagory

2007-05-09 Thread Ron Adam
k as long as they don't overlap more than one group. It seems I can get some of these fairly easy with the inspect module, but others I need to test in multiple ways. Any ideas? Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: PYDOC replacement. (Was:Sorting attributes by catagory)

2007-05-09 Thread Ron Adam
Nick Vatamaniuc wrote: > Ron, > > Consider using epydoc if you can. Epydoc will sort the methods and it > will also let you use custom CSS style sheets for the final HTML > output. Check out the documentation of my PyDBTable module. > http://www.psipy.com/PyDBTable > &g

Re: PYDOC replacement. (Was:Sorting attributes by catagory)

2007-05-10 Thread Ron Adam
Nick Vatamaniuc wrote: > Thanks for the info, Ron. I had no idea pydoc was that powerful! > -Nick Change *was* to *will be*. It really needed to be re factored. ;-) Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Is wsgi ready for prime time?

2007-05-17 Thread Ron Garret
The wsgiref module in Python 2.5 seems to be empty: [EMAIL PROTECTED]:~/Sites/modpy]$ python Python 2.5 (r25:51908, Mar 1 2007, 10:09:05) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import wsgiref >>> dir(wsgi

Re: Is wsgi ready for prime time?

2007-05-17 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Stargaming <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > The wsgiref module in Python 2.5 seems to be empty: > > > > [EMAIL PROTECTED]:~/Sites/modpy]$ python > > Python 2.5 (r25:51908, Mar 1 2007, 10:09:05) > >

webbrowser module bug?

2007-05-24 Thread Ron Adam
> import webbrowser >>> webbrowser.open('http://www.python.org') True >>> It opens firefox as expected, but the url is ... file:///home/ron/%22http://www.python.org%22 Which of course doesn't do what is expected. Any ideas? Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
[EMAIL PROTECTED] wrote: > On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >> Is anyone else having problems with the webbrowser module? >> >> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >>

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Brian van den Broek wrote: > Ron Adam said unto the world upon 05/25/2007 12:28 PM: >> [EMAIL PROTECTED] wrote: >>> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >>>> Is anyone else having problems with the webbrowser module? >>>> >>

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Steve Holden wrote: > Ron Adam wrote: >> [EMAIL PROTECTED] wrote: >>> On May 24, 5:03 pm, Ron Adam <[EMAIL PROTECTED]> wrote: >>>> Is anyone else having problems with the webbrowser module? >>>> >>>> Python 2.5.1c1 (release25-maint, A

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Paul Boddie wrote: > On 25 May, 00:03, Ron Adam <[EMAIL PROTECTED]> wrote: >> Is anyone else having problems with the webbrowser module? >> >> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 >> Type &qu

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Ron Adam wrote: > Paul Boddie wrote: >> On 25 May, 00:03, Ron Adam <[EMAIL PROTECTED]> wrote: >>> Is anyone else having problems with the webbrowser module? >>> >>> Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25) >>> [GCC 4.1.2 (Ubuntu 4.1

Re: webbrowser module bug?

2007-05-25 Thread Ron Adam
Ron Adam wrote: > Got it. > > It looks like the problem started when I told firefox to make itself > the default browser. That changed the way webbrowser.py figured out the > browser to use. So instead of trying them in order, it asked the gnome > configure too

Re: webbrowser module bug?

2007-05-26 Thread Ron Adam
Paul Boddie wrote: > Ron Adam wrote: >> Reseting the default browser with the gnome default application window >> confirmed this. The browser selection can either have the quotes around >> the args "%s" paremteter, or not depending on how and what sets it. >&g

Circular imports

2007-05-28 Thread Ron Provost
anyway because three of the files are actually automatically generated. Thanks, Ron-- http://mail.python.org/mailman/listinfo/python-list

Is there a way to change the default string encoding?

2007-08-20 Thread Ron Garret
Is there a way to change the default string encoding used by the string.encode() method? My default environment is utf-8 but I need it to be latin-1 to avoid errors like this: >>> 'Andr\xe9 Ramel'.decode() Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'a

Re: Is there a way to change the default string encoding?

2007-08-21 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Peter Otten <[EMAIL PROTECTED]> wrote: > If all else fails there's > > >>> sys.setdefaultencoding("latin1") > >>> "Andre\xe9 Ramel".decode() > u'Andre\xe9 Ramel' > > but that's an evil hack, you should rather talk to the maintainer of the > offending code to upda

Tix HList missing at least one method

2007-08-28 Thread Ron Provost
g) so that I can determine if my current drag position (potential drop position) is above, below or as a child of some other item in the outline. The easiest way to do this is to get the bounding box of the nearest items. Thanks, Ron-- http://mail.python.org/mailman/listinfo/python-list

Pydoc Rewrite Discussion at doc-sig list.

2007-04-13 Thread Ron Adam
an be submitted and a final discussion can take place on the python-dev list at a later date. Thanks and Regards, Ron Adam -- http://mail.python.org/mailman/listinfo/python-list

BaseHTTPServer and Apache

2007-04-13 Thread Ron Garret
I have a fairly large web app written in Python as a CGI fairly elaborate CGI. All of the requests go through a single CGI script which does authentication and session management and then dispatches to one of a number of handlers that generate the various pages. There is one page that is a per

Re: BaseHTTPServer and Apache

2007-04-13 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Ron Garret <[EMAIL PROTECTED]> wrote: > Does > anyone know of a straightforward way to get Apache to "forward" requests > to a given path to another HTTP server running on a different port? Never mind, I think I figured it out.

Re: BaseHTTPServer and Apache

2007-04-14 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Luis M. González" <[EMAIL PROTECTED]> wrote: > On Apr 13, 8:44 pm, Ron Garret <[EMAIL PROTECTED]> wrote: > > In article <[EMAIL PROTECTED]>, > > Ron Garret <[EMAIL PROTECTED]> wrote: > > > >

Re: Pydoc Rewrite Discussion at doc-sig list.

2007-04-14 Thread Ron Adam
Colin J. Williams wrote: > Ron Adam wrote: >> If anyone is interested in participating in discussing the details of the >> PyDoc rewrite/refactoring I've been working on, a discussion is being >> started on the doc-sig list. >> >> [EMAIL PROTECTED] >

Re: Python 3K or Python 2.9?

2007-09-21 Thread Ron Adam
dify and/or introspect how things work. This allows more choices on how I might solve a particular problem. I also think there a lots of improvements that could be made to other parts of python such as the libraries that would be of much more practical benefit. Regards, Ron -- http://m

Re: Python 3K or Python 2.9?

2007-09-21 Thread Ron Adam
Bruno Desthuilliers wrote: > Ron Adam a écrit : >> >> TheFlyingDutchman wrote: >> >>> I am not talking about the way it does it, but rather, the way it >>> could do it or... could have done it. That requires no knowledge of >>> how the int

Re: Would Anonymous Functions Help in Learning Programming/Python?

2007-09-21 Thread Ron Adam
t. Of course he'll figure out all this sooner or later anyway. You can't be an engineer without a fair amount of brain cells committed to processing abstract concepts. Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   >