Re: Alphabetical sorts

2006-10-16 Thread Ron Adam
Neil Cerutti wrote: > On 2006-10-16, Ron Adam <[EMAIL PROTECTED]> wrote: >> I have several applications where I want to sort lists in >> alphabetical order. Most examples of sorting usually sort on >> the ord() order of the character set as an approximation. But >

Re: Alphabetical sorts

2006-10-17 Thread Ron Adam
Neil Cerutti wrote: > On 2006-10-17, Ron Adam <[EMAIL PROTECTED]> wrote: >> Neil Cerutti wrote: >>> On 2006-10-16, Ron Adam <[EMAIL PROTECTED]> wrote: >>>> I have several applications where I want to sort lists in >>>> alphabetical order.

Re: Need a strange sort method...

2006-10-17 Thread Ron Adam
sequence as a list. """ def iterinner(seq): for s in seq: if hasattr(s, '__iter__'): for i in iterinner(s): yield i else: yield s return list(iterinner(sequence)) Cheers, Ron Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Need a strange sort method...

2006-10-17 Thread Ron Adam
Ron Adam wrote: > Neil Cerutti wrote: >> On 2006-10-16, Tim Chase <[EMAIL PROTECTED]> wrote: >>> If you need it in a flat list, rather than as a list of >>> chunk_size lists (which are handy for iterating over in many >>> cases), there are ways of obtain

Flexable Collating (feedback please)

2006-10-17 Thread Ron Adam
ed this in *anything* yet, so don't plug it into production code of any type. I also haven't done any performance testing. See the doc tests below for examples of how it's used. Cheers, Ron Adam """ Collate.py A general purpose configurable collate

Re: Flexable Collating (feedback please)

2006-10-18 Thread Ron Adam
Fixed... Changed the collate() function to return None the same as sort() since it is an in place collate. A comment in _test() doctests was reversed. CAPS_FIRST option puts words beginning with capitals before, not after, words beginning with lower case of the same letter. It seems I alw

Re: [OT] a little about regex

2006-10-18 Thread Ron Adam
Fulvio wrote: > *** > Your mail has been scanned by InterScan MSS. > *** > > > Hello, > > I'm trying to get working an assertion which filter address from some domain > but if it's prefixed by '.com'. > Even trying to put the result in a negate test I can

Re: How to convert this list to string?

2006-10-18 Thread Ron Adam
Jia Lu wrote: > Hi all > > I have a list like: > list > [1, 2, 3] list[1:] > [2, 3] > > I want to get a string "2 3" > str(list[1:]) > '[2, 3]' > > How can I do that ? > > thanks Just to be different from the other suggestions... >>> a = [1, 2, 3] >>> str(a[1:]).strip('[]'

Re: Flexable Collating (feedback please)

2006-10-18 Thread Ron Adam
[EMAIL PROTECTED] wrote: > > On Oct 18, 2:42 am, Ron Adam <[EMAIL PROTECTED]> wrote: >> I put together the following module today and would like some feedback on any >> obvious problems. Or even opinions of weather or not it is a good approach. > ,,, >

Re: What happened to RuleDispatch

2006-10-18 Thread Adam Jones
le to get an installation by looking up the files there. Try this command: easy_install -f http://www.turbogears.org/download/index.html TurboGears That is actually the recommended way to install TurboGears, as it is not always compatible with the latest version of the components. -Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Flexible Collating (feedback please)

2006-10-18 Thread Ron Adam
ommas in numerals PERIOD_AS_COMMAS-> Periods can separate numerals. * See doctests for examples. Author: Ron Adam, [EMAIL PROTECTED] """ __version__ = '0.02 (pre-alpha) 10/18/2006' import re import locale import string locale.setlocale(locale.LC_AL

Re: Flexable Collating (feedback please)

2006-10-18 Thread Ron Adam
Thanks, But I fixed it already. (almost) ;-) I think I will use strings as you suggest, and verify they are valid so a type don't go though silently. I ended up using string based option list. I agree a space separated string is better and easier from a user point of view. The advantage of

Re: Flexable Collating (feedback please)

2006-10-18 Thread Ron Adam
This is how I changed it... (I edited out the test and imports for posting here.) locale.setlocale(locale.LC_ALL, '') # use current locale settings class Collate(object): """ A general purpose and configurable collator class. """ options = [ 'CAPS_FIRST', 'NUMERICAL', 'HYPHEN

Re: Flexable Collating (feedback please)

2006-10-18 Thread Ron Adam
Gabriel Genellina wrote: > At Wednesday 18/10/2006 03:42, Ron Adam wrote: > >> I put together the following module today and would like some feedback >> on any >> obvious problems. Or even opinions of weather or not it is a good >> approach. >>

Re: Flexible Collating (feedback please)

2006-10-19 Thread Ron Adam
Leo Kislov wrote: > Ron Adam wrote: > >> locale.setlocale(locale.LC_ALL, '') # use current locale settings > > It's not current locale settings, it's user's locale settings. > Application can actually use something else and you will overwrite &g

Re: Flexible Collating (feedback please)

2006-10-19 Thread Ron Adam
[EMAIL PROTECTED] wrote: > Ron Adam: > > Insted of: > > def __init__(self, flags=[]): > self.flags = flags > self.numrex = re.compile(r'([\d\.]*|\D*)', re.LOCALE) > self.txtable = [] > if HYPHEN_AS_SPACE in flag

Re: Flexable Collating (feedback please)

2006-10-19 Thread Ron Adam
Gabriel Genellina wrote: > At Wednesday 18/10/2006 21:36, Ron Adam wrote: >> Maybe changing the CAPS_FIRST to REVERSE_CAPS_ORDER would do? > > At least it's a more accurate name. > There is an indirect way: test locale.strcoll("A","a") and see

Re: What happened to RuleDispatch

2006-10-19 Thread Adam Jones
exhuma.twn wrote: > On Oct 19, 3:44 pm, "exhuma.twn" <[EMAIL PROTECTED]> wrote: > > On Oct 18, 10:41 pm, "Adam Jones" <[EMAIL PROTECTED]> wrote: > > > > > > > > > exhuma.twn wrote: > > > > Hi all, > > > >

Re: [OT] a little about regex

2006-10-19 Thread Ron Adam
Fulvio wrote: > *** > Your mail has been scanned by InterScan MSS. > *** > > > On Wednesday 18 October 2006 15:32, Ron Adam wrote: > >> |Instead of using two separate if's, Use an if - elif and be sure to test > > T

Re: invert or reverse a string... warning this is a rant

2006-10-19 Thread Ron Adam
James Stroud wrote: > Of course, I think str.join can operate on iterators, as Paul Rubin > suggests: > > > print ''.join(reversed(x)) > > This latter approach still seems a little clunky, though. > > James Slices can be named so you could do... >>> reverser = slice(None, None, -1) >>> >

Re: Flexible Collating (feedback please)

2006-10-20 Thread Ron Adam
Leo Kislov wrote: > Ron Adam wrote: >> Leo Kislov wrote: >>> Ron Adam wrote: >>> >>>> locale.setlocale(locale.LC_ALL, '') # use current locale settings >>> It's not current locale settings, it's user's locale setting

Re: invert or reverse a string... warning this is a rant

2006-10-21 Thread Ron Adam
Steven D'Aprano wrote: > On Thu, 19 Oct 2006 20:07:27 -0400, Brad wrote: > >> Steven D'Aprano wrote: >> >>> Gah!!! That's *awful* in so many ways. >> Thanks... I'm used to hearing encouragement like that. After a while you >> begin to believe that everything you do will be awful, so why even >>

Re: invert or reverse a string... warning this is a rant

2006-10-21 Thread Ron Adam
Steven D'Aprano wrote: > On Sat, 21 Oct 2006 01:58:33 -0500, Ron Adam wrote: > >> [You said from an earlier post...] >> >>> (That's a complaint I have about the dis module -- it prints its results, >>> instead of returning them as a string. That makes

Re: PSF Infrastructure has chosen Roundup as the issue tracker for Python development

2006-10-22 Thread Ron Adam
Kay Schluehr wrote: > Anna Ravenscroft wrote: > >> Interestingly enough, the quote of the day from Google on this email was: >> >> Never doubt that a small group of thoughtful, committed citizens can >> change the world; indeed, it's the only thing that ever has. >> Margaret Mead > > Commitment.

Collate Module

2006-10-23 Thread Ron Adam
'nut-pecan', 'Nut' ] collate(tlist, 'caps_first hyphen_as_space') * For more examples see doctests in function test(). Author: Ron Adam, [EMAIL PROTECTED] """ import re import locale import string __version__ = '0.03

Re: What's the best IDE?

2006-10-27 Thread Adam Jones
et you integrate everything into the editor before you can really understand why people love emacs (and vi) so much. -Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Style for modules with lots of constants

2006-11-01 Thread Ron Adam
Neil Cerutti wrote: > On 2006-11-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Neil Cerutti: >>> scriptref = glk.fileref_create_by_prompt('Transcript+TextMode', >>>'WriteAppend', 0) >> That "+" sign seems useless. A space looks enough to me. The >> functions can accept case-agnostic strin

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Ron Adam
Michael Hobbs wrote: > The same problem that is solved by not having to type parens around the > 'if' conditional, a la C and its derivatives. That is, it's unnecessary > typing to no good advantage, IMHO. I was coding in Ruby for several > months and got very comfortable with just typing the i

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Ron Adam
Michael Hobbs wrote: > Ron Adam wrote: >> The faq also pointed out a technical reason for requiring the colon. It >> makes >> the underlying parser much easier to write and maintain. This shouldn't be >> taken to lightly in my opinion, because a simpler easer t

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Ron Adam
Michael Hobbs wrote: > Ron Adam wrote: >> It is also an outline form that frequently used in written languages. >> Something >> python tries to do, is to be readable as if it were written in plain >> language >> where it is practical to do so. So the c

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Ron Adam
Steven D'Aprano wrote: > On Fri, 10 Nov 2006 21:24:50 +0100, Bjoern Schliessmann wrote: > >> Marc 'BlackJack' Rintsch wrote: >> >>> No it doesn't -- look again at the example given above. It's >>> legal syntax in Python but doesn't have the semantics implied by >>> the example. >> Sorry, I don't

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Ron Adam
Paul Boddie wrote: > Ron Adam wrote: >> PS. Rather than shav of on character her and ther in pythons programing >> languag, Lets remov all the silent leters from the english languag. That will >> sav thousands mor kestroks over a few yers. > > How about changing Pyt

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Ron Adam
Steven D'Aprano wrote: > On Sat, 11 Nov 2006 01:13:03 -0600, Ron Adam wrote: > >> Steven D'Aprano wrote: >>> On Fri, 10 Nov 2006 21:24:50 +0100, Bjoern Schliessmann wrote: >>> >>>> Marc 'BlackJack' Rintsch wrote: >>>> >&

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Ron Adam
Georg Brandl wrote: > Ron Adam wrote: >> Michael Hobbs wrote: >> >>> The same problem that is solved by not having to type parens around the >>> 'if' conditional, a la C and its derivatives. That is, it's unnecessary >>> typing to

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Ron Adam
Georg Brandl wrote: > Ron Adam wrote: >> Georg Brandl wrote: >>> Ron Adam wrote: >>>> Michael Hobbs wrote: >>>> >>>>> The same problem that is solved by not having to type parens around the >>>>> 'if' condition

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Ron Adam
[EMAIL PROTECTED] wrote: > > I'm not sure why '\'s are required to do multi-line before the > colon. > Special cases aren't special enough to break the rules. > > Georg > >>> A bit of a circular answer. > >>> > >>> Why the rule? -> So not to break t

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ron Adam
Michael Hobbs wrote: > Ron Adam wrote: >> LOL, of course it would. I would expect that too after a suitable amount >> of >> 'brain washing', oops, I mean training and conditioning. ;-) >> > Trust me, my brain is quite filthy and doesn't wash ea

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ron Adam
Michael Hobbs wrote: > Ron Adam wrote: >> [EMAIL PROTECTED] wrote: >> >>> >>>>> I'm not sure why '\'s are required to do multi-line before the >>> colon. >>> >>>> Special cases aren't special en

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ron Adam
Michael Hobbs wrote: > Ron Adam wrote: >> Michael Hobbs wrote: >> >>> Ron Adam wrote: >>> >>>> LOL, of course it would. I would expect that too after a suitable amount >>>> of >>>> 'brain washing', oops, I

Re: Py3K idea: why not drop the colon?

2006-11-16 Thread Ron Adam
Steve Holden wrote: > I'm always surprised by the amount of energy that's put into this type > of discussion - even the OP has suggested that this isn't a big issue. > If it's not a big issue why is this thread still going? Every language > has a syntax. Why not just accept it as a given and ge

Re: Regular expression for not-group

2006-06-15 Thread adam johnson
You want to use negative lookahead eg.\.(?!py)it matches only if the characters ahead in the regex don't match the pattern in the brackets. http://docs.python.org/lib/re-syntax.html (about halfway down the page)On 15 Jun 2006 14:11:39 -0700, Chris Lasher <[EMAIL PROTECTED]> wrote: Is it possible t

Re: What technologies should I use for my application manager?

2006-06-26 Thread Adam Jones
MrBlueSky wrote: > Hello! I've just finished working on my first Python app (a > Tkinter-based program that displays the content of our application log > files in graphical format). It was a great experience that's had a > very positive response from my colleagues. > > So I'd like to try somethi

Re: What technologies should I use for my application manager?

2006-06-27 Thread Adam Jones
MrBlueSky wrote: > Thanks for the advice, Adam! > > Turbogears sounds like it does everything I want and looks like a > great... except you've made me nervous with your comment on the > instability of the Oracle API! It is not impossible to find a stable ORM for access to O

Re: Pros/Cons of Turbogears/Rails?

2006-08-28 Thread Adam Jones
In my understanding, which relies completely on the judgements of co-workers regarding the rails side of the debate, TurboGears is more flexible. Tasks which fall inside the scope of Rails' "opinion" are probably easier there, but anything outside of what Rails was built to do is harder than equiva

Re: Pros/Cons of Turbogears/Rails?

2006-08-29 Thread Adam Jones
Bruno Desthuilliers wrote: > Paul Boddie wrote: > > Ray wrote: > (snip) > >> We're a Java shop so > >> our developers are trained in Java, Struts, Tomcat, etc. Any switch to > >> a dynamic language will be a huge change. However it baffles me that > >> they are open to at least a PoC in Rails. but

Re: Pros/Cons of Turbogears/Rails?

2006-08-31 Thread Adam Jones
particular need, TG can absorb it in the next version. The TurboGears developers can spend most of their time working on additional code that makes the project more useful instead of bug fixes and minor feature upgrades to the core components. This philosophy is proven to work for most other open source

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread Adam Jones
John Salerno wrote: > Are there any major differences between these two? It seems they can > both be used with TurboGears, and SQLAlchemy with Django. I'm just > wondering what everyone's preference is, and why, and if there are even > more choices for ORM. > > Thanks. Currently most of my work i

Re: SQLObject or SQLAlchemy?

2006-08-31 Thread Adam Jones
John Salerno wrote: > Adam Jones wrote: > > > I think SA's extra flexability > > is worth the effort. > > Thanks for the reply. Do you mean in the above quote that SA is a little > more complicated than SO? Yes, it is. To avoid the technical issues involved the c

Re: OO on python real life tutorial?

2006-09-02 Thread Ron Adam
filippo wrote: > Hello, > > I coded my +10k lines app using Perl/Tk. It is something like a hotel > software manager, it has a bunch of windows to manage the arrivals, > bills etc etc. I want to port this on Python/WxPython but I'd like to > get benefit of python, not just doing a row by row raw p

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Adam Jones
Francach wrote: > Hi, > > I'm trying to use the Beautiful Soup package to parse through the > "bookmarks.html" file which Firefox exports all your bookmarks into. > I've been struggling with the documentation trying to figure out how to > extract all the urls. Has anybody got a couple of longer ex

Re: Building Python Based Web Application

2006-09-08 Thread Adam Jones
James Stroud wrote: > Hello All, > > I am interested in setting up a modest invoicing system for some > consulting I am doing. I like the idea of managing this on the web and > creating invoices and printing them from a browser. However, I'm not > really sure where to start. I've played with some

Re: Building Python Based Web Application

2006-09-08 Thread Adam Jones
like it would be simple enough to use for what you are talking about. Without knowing more about your requirements that would be my suggestion. I am sure there are other people on this group with more experience here who could give more useful commentary. -Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: pprint: "...thank small children who sleep at night."

2006-09-20 Thread Adam Jones
e or in-joke? Can someone > explain it? I don't get it. My guess is that he had to write a pretty printer so his cursing and general frustration and reading nasty nested tuples wouldn't wake the kids. -Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a Fix to an Abandoned Project?

2006-09-20 Thread Adam Jones
Granted, for something that has withered and died this may not be much of an issue, but it is good to know for future reference. -Adam -- http://mail.python.org/mailman/listinfo/python-list

Re: Makin search on the other site and getting data and writing in xml

2006-09-25 Thread Adam Jones
rch sites have the same requirement. Yes, it is possible to query a bunch of search sites and dump the results into an xml file. It is not even all that hard. In fact, I bet running a search on the relevant terms will probably produce something that almost does what you want. -Adam -- h

Re: Decimal() instead of float?

2006-11-17 Thread Ron Adam
Michael B. Trausch wrote: > On Fri, 2006-11-17 at 21:25 +0100, Fredrik Lundh wrote: >> > Some of the lat/long pairs that I have used seem to come out fine, but >> > some do not. Because the mathmatics used with them involve complex >> > equations when determining distance and the like, any error

Re: why would anyone use python when java is there?

2006-11-29 Thread Adam Jones
gregarican wrote: > gavino wrote: > > wtf > > You have to be trolling I would think. Yeah, gavino has been trolling comp.lang.lisp for quite some time. For the life of me I can't understand why he would troll comp.lang.python when comp.lang.lisp is there. -Adam -- ht

Re: Can't 'register' to Cheese Shop from command line..only web + egg dependency question

2006-12-07 Thread Adam Jones
"Stump >= 1.0b2"], # installs 'Stump' of version 1.0b2 or later Full docs on this are here: http://peak.telecommunity.com/DevCenter/setuptools -Adam > > Chris -- http://mail.python.org/mailman/listinfo/python-list

Getting the name of an assignment

2006-12-23 Thread Adam Atlas
Is it possible for an object, in its __init__ method, to find out if it is being assigned to a variable, and if so, what that variable's name is? I can think of some potentially ugly ways of finding out using sys._getframe, but if possible I'd prefer something less exotic. (Basically I have a class

Re: Getting the name of an assignment

2006-12-23 Thread Adam Atlas
On Dec 23, 5:58 pm, "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote: > On 23 Dec 2006 14:38:19 -0800, Adam Atlas <[EMAIL PROTECTED]> wrote: > > > Is it possible for an object, in its __init__ method, to find out if it > > is being assigned to a variable, and if

Re: Getting the name of an assignment

2006-12-23 Thread Adam Atlas
Thanks, Steven and Steven. @Bethard: Isn't it a bit convoluted to use metaclasses? someinstance.__class__.__name__ does the same thing. @D'Aprano: Thanks for the advice to rethink my data model. I'm doing so right now, and I've already come up with a way that makes more sense. :) -- http://mail

module with __call__ defined is not callable?

2006-02-07 Thread adam johnson
():    return "in mod.__call__">>> import mod>>> mod()Traceback (most recent call last):   File "", line 1, in ?TypeError: 'module' object is not callable>>> mod.__call__()'in mod.__call__'Thanks for any replies, Adam. -- http://mail.python.org/mailman/listinfo/python-list

Re: module with __call__ defined is not callable?

2006-02-07 Thread adam johnson
d!>>>So now all I need to know is why now with new style classes the special functions need to be defined on the class instead of attached to the instance at any time. On 08/02/06, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: adam johnson wrote:> Hi All.> I was wonde

Re: sort one list using the values from another list

2006-02-26 Thread Ron Adam
[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 operation. > (Not all solutions are really the same, as Alex has shown). Try this one. def psort10(s1, s2): d = dict

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
[EMAIL PROTECTED] wrote: >> It's faster on my system because d.keys() is already sorted. But that may >> not be the case on other versions of python.< > > In my version it's a little slower. But what system are you using where > keys is already sorted? IronPython maybe? > > Bye, > bearophile

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

Exception value cut off

2005-05-12 Thread Ryan, Adam
sys.exc_info()[1] returns the first 308 characters of an error message from a module. Is there a way to increase the length so it doesn't get cut off? Cheers, Adam -- http://mail.python.org/mailman/listinfo/python-list

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
t's methods and attributes.) Here is the first part of __builtins__ (Python 2.3) as an example. If anyone has any suggestions or corrections, Please let me know. Cheers, _Ron Adam __builtins__ Class: Built-in functions, exceptions, and other object

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

wxPython: GridBagSizer, EXPAND, and HtmlListBox

2005-06-06 Thread Adam Endicott
I'm having some trouble using an HtmlListBox with a GridBagSizer. I'm not sure how best to explain what's happening, but it seems that every time my frame gets resized, the HtmlListBox grows taller, even when the resize is only horizontal, or makes the frame smaller. I'm pretty new to GUI layout a

<    3   4   5   6   7   8   9   10   11   12   >