Re: Python evolution: Unease

2005-01-04 Thread Jeremy Bowers
On Tue, 04 Jan 2005 17:12:04 -0800, Paul Rubin wrote: > Irrelevant, the issue isn't what docs can be written if someone wants to > do it, it's what docs are actually already there > I just see various other free software projects as > trying to live up to higher standards and I think Python sh

Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread Jeremy Bowers
On Wed, 05 Jan 2005 12:15:29 +0300, Roman Suzi wrote: > As for concepts, they are from Generic Programming (by Musser and > Stepanov) and I feel that Python is in position to implement them to the > fullest extent. And IMHO it will be nicer than just Java-like interfaces > or Eiffel's contract app

Re: wxPython clipboard

2005-01-06 Thread Jeremy Bowers
On Thu, 06 Jan 2005 03:27:56 -0800, lbolognini wrote: > Could you please give me some advice on the best approach to solve this > problem? To the best of my knowledge, and I'd be surprised if this wasn't true, wxPython does not have the necessary tools to do this. That program doesn't even use t

Re: Getting rid of "self."

2005-01-07 Thread Jeremy Bowers
On Fri, 07 Jan 2005 14:39:09 +0100, BJÃrn Lindqvist wrote: > It works! exec(magic()) does the needed hi = self.hi. No it doesn't. Try "hi = 'newValue'" and see what happens. So the next step is to write an "unmagic" function. So now how do you add instance variables? There is no way to avoid "se

Re: Getting rid of "self."

2005-01-09 Thread Jeremy Bowers
On Mon, 10 Jan 2005 01:51:07 +0100, BJÃrn Lindqvist wrote: > This is promising, I'm content with whatever slowdowns necessary as long > as I can prove those who say "you can't do it" wrong. :) Since I think I'm the only person in this discussion that said anything about what you can't do, be clear

Re: Long strings as function parameters

2005-01-09 Thread Jeremy Bowers
On Sun, 09 Jan 2005 08:36:04 -0800, onlyonemc wrote: > I would like to have functions that operate on long strings, 10-100 MB. In > C I would of course pass a pointer to the string for a quick function > call. What is an efficient way to do this in python? Cheers, > -mark Others have pointed ou

Re: Checking for X availability

2005-01-11 Thread Jeremy Bowers
On Tue, 11 Jan 2005 03:32:01 -0800, Flavio codeco coelho wrote: > So my question is: how can I check for the availability of X? i.e., How > will my program know if its running in a text only console or in console > window over X? The first thing that leaps to mind is... try it. If it fails, switch

Re: Producer/consumer Queue "trick"

2005-01-15 Thread Jeremy Bowers
On Fri, 14 Jan 2005 16:26:02 -0600, Evan Simpson wrote: > WEBoggle needs a new game board every three minutes. Boards take an > unpredictable (much less than 3min, but non-trivial) amount of time to > generate. I gotta ask, why? Looking over your information about "how to play", my only guess

Re: [perl-python] 20050115, for statement

2005-01-15 Thread Jeremy Bowers
On Sat, 15 Jan 2005 10:54:28 +, Michael Hoffman wrote: > Xah Lee wrote: > >> Â a = range(1,51) >> Â for x in a: >> Â if x % 2 == 0: >> Â print x, 'even' > > Now he's mixing tabs and spaces. Hideous. > > Are you doing things wrong on purpose? I think the most exciting thing is the br

Re: threading and sockets ?

2005-01-15 Thread Jeremy Bowers
On Sun, 16 Jan 2005 05:30:37 +0200, ionel wrote: > how to make a efficient server.. please point me to some good and clear > examples Your question is too broad. There is no such thing as "a server", the server must *do* something and it is generally named for what it does.. Please read http://w

Re: Newbie inheritance question.

2005-01-16 Thread Jeremy Bowers
On Sun, 16 Jan 2005 22:08:13 +0800, bwobbones wrote: > Hi all, > > I'm a java programmer struggling to come to terms with python - bear > with me! Christophe already identified the problem, I wanted to address another Javaism in your code, for your educational benefit. Speaking "idiomaticall

Re: generator expressions: performance anomaly?

2005-01-18 Thread Jeremy Bowers
On Tue, 18 Jan 2005 14:05:15 +, Antoon Pardon wrote: > I don't see how generating byte code for a = 9; when seeing the > expression a = 3 + 6, would be a problem for non-functional > languages. To answer nearly every post you've made to this thread, "because Python doesn't have the resources t

macros (was: RE: generator expressions: performance anomaly?)

2005-01-18 Thread Jeremy Bowers
On Tue, 18 Jan 2005 12:59:07 -0800, Robert Brewer wrote: > Especially since you can already do it explicitly with Raymond > Hettinger's cookbook recipe: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/277940 You know, Guido might as well give in now on the Macro issue. If he doesn't come

Re: macros

2005-01-18 Thread Jeremy Bowers
On Tue, 18 Jan 2005 14:36:08 -0800, Jeff Shannon wrote: > I think that this sort of thing is better to have as an explicitly > risky hack, than as an endorsed part of the language. The mere fact > that this *is* something that one can clearly tell is working around > certain deliberate limitati

Re: File objects? - under the hood question

2005-01-19 Thread Jeremy Bowers
On Tue, 18 Jan 2005 22:53:10 -0800, Eric Pederson wrote: > Perhaps I've answered my question and the under-the-hood mechanics are > handled on the OS side, and Python is just making requests of the OS... Almost by definition, the only correct way to read a file is to use the file system, which on

Re: ElementTree cannot parse UTF-8 Unicode?

2005-01-19 Thread Jeremy Bowers
On Wed, 19 Jan 2005 16:35:23 -0800, Erik Bethke wrote: > So it seems to me, that ElementTree is just not expecting to run into the > Korean characters for it is at column 16 that these begin. Am I > formatting the XML properly? You should post the file somewhere on the web. (I wouldn't expect Us

Re: xml parsing escape characters

2005-01-20 Thread Jeremy Bowers
On Thu, 20 Jan 2005 21:54:30 +0100, Martin v. LÃwis wrote: > Luis P. Mendes wrote: >> When I access the url via the Firefox browser and look into the source >> code, I also get: >> >> > xmlns="http"> ~ >> ~439 ~ >> >

Retrieving the last bit Re: File objects? - under the hood question

2005-01-20 Thread Jeremy Bowers
On Thu, 20 Jan 2005 21:06:31 -0800, Eric Pederson wrote: > Here the sort of thing (seek, then read) I think I want: > IDV2=open(("http://musicsite.com/song453.mp3","rb";)[:-128]) > song453.tags=IDV2.read() > len(song453.tags) > > 128 > > > But it's not a Python problem. :-( O

Re: Dynamic properties

2005-01-21 Thread Jeremy Bowers
On Fri, 21 Jan 2005 23:27:28 +0800, Craig Ringer wrote: > The chances are that whatever you want to do with dynamically created > properties is better done with __getattr__ and __setattr__ instead. Rather than post my own comment, I'd like to highlight this, emphasize it, and underline it twice. T

Re: how to write a tutorial

2005-01-21 Thread Jeremy Bowers
On Fri, 21 Jan 2005 03:08:50 -0800, Xah Lee wrote: > i've started to read python tutorial recently. > http://python.org/doc/2.3.4/tut/tut.html > > Here are some quick critique: You don't have the respect points for anyone to give a damn. Step one would be demonstrating that you understand the la

Re: finding name of instances created

2005-01-21 Thread Jeremy Bowers
On Fri, 21 Jan 2005 21:01:00 -0400, Andrà Roberge wrote: > etc. Since I want the user to learn Python's syntax, I don't want to > require him/her to write > alex = CreateRobot(name = 'alex') > to then be able to do > alex.move() This is just my opinion, but I've been involved with teaching new pro

Re: File objects? - under the hood question

2005-01-23 Thread Jeremy Bowers
On Sun, 23 Jan 2005 08:27:49 -0800, EP wrote: > >> My brain-teaser: What I'd like to do is read the last ~2K of a large >> number of large files on arbitrary servers across the net, without >> having to read each file from the beginning (which would be slow and >> resource inefficient)... >> >>

Re: RE:"private" variables a.k.a. name mangling (WAS: What is print? A function?)

2005-01-24 Thread Jeremy Bowers
On Mon, 24 Jan 2005 12:17:13 -0600, Philippe C. Martin wrote: > I use "__"for private variables because I must have read on net it was the > way to do so - yet this seems to have changed - It's still as true as ever, at least in terms of language support, it's just that the Python community, and

RE: Why I use private variables (WAS: RE:"private" variables a.k.a. name mangling?)

2005-01-24 Thread Jeremy Bowers
On Mon, 24 Jan 2005 15:35:11 -0600, Philippe C. Martin wrote: > The real reason behind my using private variables is so they do not appear > in the epydoc generated documentation and confuse my users. You mean single or double underscores? I just checked and at least epydoc 2.1 doesn't include si

Re: python without OO

2005-01-25 Thread Jeremy Bowers
On Tue, 25 Jan 2005 15:01:23 -0800, Davor wrote: > Thanks, > > I do not hate OO - I just do not need it for the project size I'm > dealing with - and the project will eventually become open-source and > have additional developers - so I would prefer that we all stick to > "simple procedural" stuf

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

2005-01-26 Thread Jeremy Bowers
On Thu, 27 Jan 2005 04:04:38 +, phr wrote: > Skip Montanaro <[EMAIL PROTECTED]> writes: >> Because good requirements specification is difficult and testing improves >> the breed. Better to have the major API changes and bugs taken care of, and >> to have its popularity demonstrated *before* i

Re: [perl-python] 20050127 traverse a dir

2005-01-29 Thread Jeremy Bowers
On Thu, 27 Jan 2005 15:01:12 -0500, Chris Mattern wrote: > Is it just me, or is the disappointing lack of flamewars > slowly ratcheting up the level of vitriol in his posts? What flabbergasts me is the stunning failure in trolling that XL is. I've accidentally trolled (if you can extend the trol

Re: gmail access with python!

2005-01-30 Thread Jeremy Bowers
On Sun, 30 Jan 2005 21:54:46 -0500, Daniel Bickett wrote: > Indeed, here is a detailed help document on GMail POP3 access: > > http://gmail.google.com/support/bin/answer.py?answer=12103 > > huh...look at that, they're using python :) Never noticed that before. Can you expand on that for us non-

Re: next line, new line

2005-01-30 Thread Jeremy Bowers
On Sun, 30 Jan 2005 19:42:22 -0800, rasdj wrote: > I have a lot of SQL to convert to postgres from oracle. I have most of the > problems worked out except for this last bit. Many of my tables need the > last comma replaced with a close parenthesis - they look like this: > > create table schema.ta

Re: next line, new line

2005-01-30 Thread Jeremy Bowers
On Sun, 30 Jan 2005 20:21:49 -0800, rasdj wrote: > Thanks Jeremy, something like this would work: > > try: > lines = [ line.replace(",\n;", ")\n;") for line in input ] > > If I could figgure out how to: > > IF ':' in line > READ next line in > lines = [ line.replace(",\n;", ")\n;") for line in

Re: python and gpl

2005-01-30 Thread Jeremy Bowers
On Sun, 30 Jan 2005 22:25:10 -0600, John Hunter wrote: > The question is: does shipping a backend which imports a module that > links with GPL code make some or all of the library GPL. This > question is complicated, in my mind at least, by several factors. I believe the best and most honest answ

Re: set, dict and other structures

2005-01-31 Thread Jeremy Bowers
On Tue, 01 Feb 2005 00:43:21 +, Raymond Hettinger wrote: > My guess is that there will be two issues. One is that no one > implementation of graphs seems to satisfy all users. The second is that > only a small fraction of Python users need for graph support (there is > probably a much greater

Re: variable declaration

2005-02-01 Thread Jeremy Bowers
On Tue, 01 Feb 2005 09:13:36 -0600, Thomas Bartkus wrote: > *Is* there a reason why the interpreter couldn't/shouldn't require formal > variable declaration? You mean, other than the reasons already discussed at length in this thread, not to mention many many others? Your not *liking* the reasons

Re: how about writing some gui to a known console application

2005-02-01 Thread Jeremy Bowers
On Tue, 01 Feb 2005 21:57:45 +, Grant Edwards wrote: > On 2005-02-01, alexrait1 <[EMAIL PROTECTED]> wrote: > >> Do something useful... (at least for me) For instance I need a gtk >> frontend for pgp. So here you can have an opportunity to learn both >> pyGTK and pgp. A lot of python code... :

Re: Newbie Question

2005-02-01 Thread Jeremy Bowers
On Tue, 01 Feb 2005 17:47:39 -0800, Joel Eusebio wrote: > Whenever I access test.py from my browser it says "The page cannot be > found" , I have the file on /var/www/html, what did I miss? > > Thanks in advance, > Joel In general, you will need to post the relevant entries from your Apache erro

Re: hotspot profiler experience and accuracy?

2005-02-01 Thread Jeremy Bowers
On Tue, 01 Feb 2005 19:24:20 -0800, aurora wrote: > I have a parser I need to optimize. It has some disk IO and a lot of > looping over characters. > > I used the hotspot profiler to gain insight on optimization options. The > methods show up on on the top of this list seems fairly trivial and do

Re: Apache & Python 500 Error

2005-02-02 Thread Jeremy Bowers
On Wed, 02 Feb 2005 10:28:46 +0100, Christian wrote: > Hello, > > i have an apache 1.3 server with python on debian. Python works fine but > the scripts wontÂt work. I know what your problem is. But first, check your apache error log. Then you will know what your error is, too. If you can't

Re: CONTEST - What is the (best) solution?

2005-02-02 Thread Jeremy Bowers
On Wed, 02 Feb 2005 02:35:03 -0800, python wrote: > Each pair in a dictionary is separated by CRLF and in each dictionary > numbers of pairs can be different. > I need to read only the the first and the last dictionaries.What is a > best solution? > Thanks > Lad Who cares about the best solution?

Re: Generating modul classes with eval

2005-02-02 Thread Jeremy Bowers
On Wed, 02 Feb 2005 20:49:07 +, Axel Straschil wrote: You are doing several things wrong. > I was fooling around with creating classes for a module with eval, You shouldn't create classes with eval, because you don't need to. "class" isn't a declaration, it is an executable statement that c

Re: Integrated Testing - Peppable?

2005-02-02 Thread Jeremy Bowers
On Wed, 02 Feb 2005 11:52:29 -0800, [EMAIL PROTECTED] wrote: > So... Should I turn this into a PEP? I would think a much more productive step one would be to put together the proposed functionality with unittest and the trace module, and use the output of your tool to drive some sort of simple ou

Re: Generating modul classes with eval

2005-02-02 Thread Jeremy Bowers
On Wed, 02 Feb 2005 16:20:41 -0500, Jeremy Bowers wrote: > That said, "__main__" indicates you ran it in the interactive shell. Or ran it directly on the command line. Duh. I thought that clause really loudly, but I guess I never actually typed it. -- http://mail.python.org/mai

Re: [EVALUATION] - E01: The Java Failure - May Python Helps?

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 09:26:08 +0200, Ilias Lazaridis wrote: > My question is essentially: > > How many of those constructs are already supported by python (and the > surrounding open-source-projects): > > http://lazaridis.com/case/stack/index.html This post is hard to follow, but I'm going to as

Re: Integrated Testing - Peppable?

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 09:40:55 -0800, [EMAIL PROTECTED] wrote: > Thanks, Jeremy, > >> No prose can compare to a live, functional demonstration. > > I agree; that's what my prototype amounts to: > > > > (sorry, it's Windows-only) > > But

Re: Apache & Python 500 Error

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 13:55:13 +0100, Christian wrote: > from mod_python import apache > ^ > SyntaxError: invalid syntax > > > My test script: > #!/usr/bin/python > > print 'Content-Type: text/plain\r' > print '\r' > import os > print os.getcwd() For the quote of the error message, I'

Re: Awkwardness of C API for making tuples

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 07:45:22 -0500, Steve Holden wrote: > Fredrik Lundh wrote: >> in theory, if PyInt_FromLong succeeds, and PyTuple_SetItem fails, you'll leak >> an object. >> >> >> > And in practice this will only happen during a period when you are > relying critically on it *not* to ...

Re: Calling a method using an argument

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 15:48:05 +, C Gillespie wrote: > Dear All, > > I have a simple class > class hello: > def world(self): > return 'hello' > def test(self,arg): > return self.arg > > When I want to do is: >>hello.test('world') > 'hello' > > i.e. pass the method name

Re: [EVALUATION] - E01: The Java Failure - May Python Helps?

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 22:46:24 -0500, Markus Wankus wrote: > I realize your admirable intentions and the fact that you are simply > trying to help (the beauty of this community), but I beg you all > now...PLEASE...do not feed this troll. Any responses to his posts will > simply snowball into the

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 19:00:30 -0800, Paul Rubin wrote: > Hmm, I'm not familiar with Nevow. Twisted is pretty neat, though > confusing. I don't see how to scale it to multiple servers though. Same way you'd scale any webserver, load balancing in hardware, store all user state in a database, and te

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 20:50:16 -0800, Paul Rubin wrote: > I understood the Twisted suggestion as meaning avoiding database > traffic by keeping both user and server state resident in the > application. Yes, if you use a database for that, you get multiple > app servers instead of a heavily loaded ce

Re: "Collapsing" a list into a list of changes

2005-02-04 Thread Jeremy Bowers
On Fri, 04 Feb 2005 12:43:37 -0500, Alan McIntyre wrote: > def straightforward_collapse(myList): > collapsed = [myList[0]] > for n in myList[1:]: > if n != collapsed[-1]: > collapsed.append(n) > > return collapsed > > Is there an elegant way to do this, or sho

Re: returning True, False or None

2005-02-04 Thread Jeremy Bowers
On Fri, 04 Feb 2005 10:48:44 -0700, Steven Bethard wrote: > I have lists containing values that are all either True, False or None, > e.g.: > > [True, None, None, False] > [None, False, False, None ] > [False, True, True, True ] > etc. > > For a given list: > * If all

Re: string issue

2005-02-04 Thread Jeremy Bowers
On Fri, 04 Feb 2005 14:49:43 -0500, rbt wrote: > Alan McIntyre wrote: >> I think it's because you're modifying the list as you're iterating over > > In this case then, shouldn't my 'except Exception' raise an error or > warning like: > > "Hey, stupid, you can't iterate and object and change it

Re: returning True, False or None

2005-02-04 Thread Jeremy Bowers
On Fri, 04 Feb 2005 16:44:48 -0500, Daniel Bickett wrote: > [ False , False , True , None ] > > False would be returned upon inspection of the first index, even > though True was in fact in the list. The same is true of the code of > Jeremy Bowers, Steve Juranich, and Jeff Shannon.

Re: [EVALUATION] - E01: The Java Failure - May Python Helps?

2005-02-05 Thread Jeremy Bowers
On Sat, 05 Feb 2005 16:44:11 +0200, Ilias Lazaridis wrote: >> * Deployment: I don't generally have enough problems with this to be >> worth thinking about. I don't know what the state of the remote >> debugging is on Python; Google "remote debugging Python". > > [I like to avoid interaction with g

Re: variable declaration

2005-02-06 Thread Jeremy Bowers
On Sun, 06 Feb 2005 07:30:33 -0500, Arthur wrote: > What if: > > There was a well conducted market survey conclusive to the effect that > adding optional strict variable declaration would, in the longer run, > increase Python's market share dramatically. > > It just would. > > Why would it? Wha

turing machine in an LC (was: Xah Lee's stupid question #853,172)

2005-02-08 Thread Jeremy Bowers
On Tue, 08 Feb 2005 17:36:19 +0100, Bernhard Herzog wrote: > Nick Vargish <[EMAIL PROTECTED]> writes: > >> "Xah Lee" <[EMAIL PROTECTED]> writes: >> >>> is it possible to write python code without any indentation? >> >> Not if Turing-completeness is something you desire. > > It's possible to impl

Re: Is Python as capable as Perl for sysadmin work?

2005-02-08 Thread Jeremy Bowers
On Tue, 08 Feb 2005 18:18:13 +, Marc Huffnagle wrote: > Jeff Epler wrote: >> >> There's another little-known fact about Python: No string is permitted >> to end with a backslash! You might think that variations like >> r'\' >> or >> ""\"" >> would allow you to create thi

Re: turing machine in an LC

2005-02-08 Thread Jeremy Bowers
On Tue, 08 Feb 2005 10:24:28 -0800, Michael Spencer wrote: > How about: > > >>> def fact_ge(n): > ... f = [1] > ... f.extend(i*j for i,j in it.izip(xrange(1,1+n), f)) > ... return f > ... > >>> fact_ge(10) > [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800] > >>> > > as a "

Re: turing machine in an LC

2005-02-08 Thread Jeremy Bowers
On Tue, 08 Feb 2005 10:50:24 -0800, Michael Spencer wrote: > I see no difference between LCs and GEs in this respect: > > >>> import itertools as it > >>> > >>> def fact_ge(n): > ... f = [1] > ... f.extend(i*j for i,j in it.izip(xrange(1,1+n), f)) > ... return f > ... >

Re: Big development in the GUI realm

2005-02-08 Thread Jeremy Bowers
On Tue, 08 Feb 2005 19:55:01 +0100, Maciej MrÃz wrote: > Unfortunately, GPL faq is extremely vague on such border cases, instead > of simple "yes/no" answers faq is filled with some advocacy talks ... To re-iterate a point I made on a thread last week, nobody really knows what the GPL says and me

Re: turing machine in an LC

2005-02-08 Thread Jeremy Bowers
On Tue, 08 Feb 2005 20:47:06 +0100, Bernhard Herzog wrote: > [x for L in [[[initial_state, 0]]] >for state, pos in L >if state is not None > and (L.append([M[state][T.get(pos, 0)][2], > pos + M[state][T.get(pos, 0)][1]]) >or T._

Re: Name of type of object

2005-02-09 Thread Jeremy Bowers
On Wed, 09 Feb 2005 21:57:15 +, Jive Dadson wrote: > But that works only if the exception happens to be derived from Exception. > How do I handle the > general case? I believe the answer is that Exceptions not derived from Exception shouldn't be thrown; it's basically a deprecated feature and

Re: A great Alan Kay quote

2005-02-09 Thread Jeremy Bowers
On Wed, 09 Feb 2005 15:57:10 -0800, has wrote: > I'd say Python is somewhere in the middle, though moving slowly towards > 'agglutination' in the last couple years. But it feels really badly about that and promises to kick the habit somewhere around the year 3000. -- http://mail.python.org/mailma

Re: Testing conditions.

2005-02-09 Thread Jeremy Bowers
On Thu, 10 Feb 2005 05:38:54 +, Ray Gibbon wrote: > e.g. 2 > |while new_data, environment = get_more_data(source): > |process_data(new_data, environment) > > is something I'm equally likely to want to do, but I can't express it's > meaning. I think we'd usually phrase that as fo

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-10 Thread Jeremy Bowers
On Thu, 10 Feb 2005 11:56:45 -0700, Steven Bethard wrote: > In the "empty classes as c structs?" thread, we've been talking in some > detail about my proposed "generic objects" PEP. Based on a number of > suggestions, I'm thinking more and more that instead of a single > collections type, I shoul

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-10 Thread Jeremy Bowers
On Thu, 10 Feb 2005 13:39:29 -0700, Steven Bethard wrote: > Yeah, I guess that was really the motivation of this module. I > personally wouldn't use it all that often -- certainly not with the > frequency that I use, say, Python 2.4's set type -- but I think there > are enough of us out here wh

Re: Big development in the GUI realm

2005-02-11 Thread Jeremy Bowers
On Fri, 11 Feb 2005 13:57:47 +0100, Josef Dalcolmo wrote: > You can distribute GPL'ed code in binary form, you just have to make the > sources available as well. And, yes I would use this as a test: if your > program needs gpl-ed code for some of it's functionality, you have to > licence your prog

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-11 Thread Jeremy Bowers
On Fri, 11 Feb 2005 22:23:58 +1000, Nick Coghlan wrote: > This is one of the reasons why Steven's idea of switching to proposing a > new module is a good one. It then provides a natural location for any > future extensions of the idea such as Records (i.e. namespaces with a > defined set of legal f

Re: Big development in the GUI realm

2005-02-11 Thread Jeremy Bowers
On Fri, 11 Feb 2005 18:24:22 +0100, Damjan wrote: > What you described is not ok according to the GPL - since you distributed > a binary thats derived from GPL software (and you didn't publish it source > code under the GPL too). No you didn't. You distributed a binary completely free of any GPL c

Re: Big development in the GUI realm

2005-02-12 Thread Jeremy Bowers
On Fri, 11 Feb 2005 14:45:09 -0800, Robert Kern wrote: > Until such matters are unequivocally determined in a court that has > jurisdiction over you, do you really want to open yourself to legal risk > and certain ill-will from the community? Huh? What are you talking about? I'm just pointing out

Re: "perl -p -i -e" trick in Python?

2005-02-15 Thread Jeremy Bowers
On Wed, 16 Feb 2005 15:18:57 +0900, Wonjae Lee wrote: > I read the comment of > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/277753. > (Title : Find and replace string in all files in a directory) > > "perl -p -i -e 's/change this/..to this/g'" trick looks handy. > Does Python have a s

Re: Alternative to standard C "for"

2005-02-17 Thread Jeremy Bowers
On Thu, 17 Feb 2005 10:22:01 -0800, James Stroud wrote: > It seems I need constructs like this all of the time > > i = 0 > while i < len(somelist): > if oughta_pop_it(somelist[i]): > somelist.pop(i) > else: > i += 1 > > There has to be a better way... > > Any thoughts? Others have p

Re: [EVALUATION] - E02 - ULTIMATE RECIPE TO RESOLVE ALL ISSUES

2005-02-17 Thread Jeremy Bowers
On Thu, 17 Feb 2005 18:49:38 +, Stephen Kellett wrote: > Incorrect analysis. This thread proves that you have no concept of how > to interact with the community. If you had done what many people asked > you to do, which is do some work yourself, then ask questions about the > few answers you

Re: namespace collisions

2005-02-17 Thread Jeremy Bowers
On Thu, 17 Feb 2005 18:20:36 +, Will McGugan wrote: > I'm accumulating a number of small functions, which I have sensibly put > in a single file called 'util.py'. But it occurs to me that with such a > generic name it could cause problems with other modules not written by > myself. Whats the

Re: Why doesn't join() call str() on its arguments?

2005-02-17 Thread Jeremy Bowers
On Fri, 18 Feb 2005 01:19:44 +1100, news.sydney.pipenetworks.com wrote: > Thanks for the pointer. Let's see how many zen points are for the OP's > idea vs against Along with the fact that I agree with Nick that you've seriously miscounted (most of your "fors" are simply irrelevant and I think you

Re: Why doesn't join() call str() on its arguments?

2005-02-17 Thread Jeremy Bowers
On Thu, 17 Feb 2005 14:00:59 -0700, Dave Benjamin wrote: > Jeremy Bowers wrote: >> I'd point out that the Zen that can be comprehended by checking off items >> in a list is not the true Zen. > > The Zen that can be imported is not the eternal Zen. =) Yes, there

Re: Help with research

2005-02-17 Thread Jeremy Bowers
On Thu, 17 Feb 2005 15:51:47 -0800, elena wrote: > I can go to my friends, however it occurred to me that it might be > better to post in a newsgroup and get a larger, more diverse, and > random sample. Larger, yes, more diverse, yes, more random, probably not in the statistical/scientific sense.

Re: Why doesn't join() call str() on its arguments?

2005-02-17 Thread Jeremy Bowers
On Fri, 18 Feb 2005 14:14:55 +1100, news.sydney.pipenetworks.com wrote: > I always wished computer science was more engineering then philosophy. > That way there'd always be an obvious answer. I hear that! To be fair, computer *science* is more like mathematics than philosophy; once a correctly-

Re: compatbility of .pyc files

2005-02-22 Thread Jeremy Bowers
On Wed, 23 Feb 2005 13:31:12 +1300, Blair Hall wrote: > I have a requirement to prevent 'accidental' tampering > with some software written in Python. If I ensure that all > of the modules concerned are compiled into .pyc's, and remove > the .py's to another location, then I should be safe until >

Re: yield_all needed in Python

2005-03-01 Thread Jeremy Bowers
On Tue, 01 Mar 2005 12:42:51 -0600, Skip Montanaro wrote: > yield yield * (Mu-hu-ha-ha-ha!) -- http://mail.python.org/mailman/listinfo/python-list

Re: yield_all needed in Python

2005-03-02 Thread Jeremy Bowers
On Wed, 02 Mar 2005 22:54:14 +1000, Nick Coghlan wrote: > Douglas Alan wrote: >> Steve Holden <[EMAIL PROTECTED]> writes: >>>Guido has generally observed a parsimony about the introduction of >>>features such as the one you suggest into Python, and in particular >>>he is reluctant to add new keywo

Re: yield_all needed in Python

2005-03-03 Thread Jeremy Bowers
On Thu, 03 Mar 2005 20:47:42 +, Paul Moore wrote: > This can probably be tidied up and improved, but it may be a > reasonable workaround for something like the original example. This is why even though in some sense I'd love to see yield *expr, I can't imagine it's going to get into the langua

Re: a RegEx puzzle

2005-03-11 Thread Jeremy Bowers
On Fri, 11 Mar 2005 08:38:36 -0500, Charles Hartman wrote: > I'm still shaky on some of sre's syntax. Here's the task: I've got > strings (never longer than about a dozen characters) that are > guaranteed to be made only of characters 'x' and '/'. In each string I > want to find the longest con

Re: Adapting code to multiple platforms

2005-03-11 Thread Jeremy Bowers
On Fri, 11 Mar 2005 17:27:06 -0700, Jeffrey Barish wrote: > Most of my program lives in a class. My plan is to have a superclass > that performs the generic functions and subclasses to define methods > specific to each platform > I'm just getting up to speed on Python and OOP, so I'm wondering

Re: Add Properties to Instances?

2005-03-12 Thread Jeremy Bowers
On Sat, 12 Mar 2005 09:48:42 -0800, Martin Miller wrote: > I'm trying to create some read-only instance specific properties, but the > following attempt didn't work: I'm going to echo Steven's comment: "What's the situation in which you think you want different properties for different instances

Re: dinamically altering a function

2005-03-12 Thread Jeremy Bowers
> What i want is to declare in the decorator some code that is common to all > these functions, so the functions assume that the decorator will be there > and wont need to duplicate the code provided by it, and the functions are > not known ahead of time, it has to be dynamic. This sounds like a c

Re: how to delete the close button (the X on the right most corner of the window) on a window

2005-03-13 Thread Jeremy Bowers
On Sun, 13 Mar 2005 09:25:43 -0800, jrlen balane wrote: > i am working on an MDIParentFrame and MDIChildFrame. Now, what i want > to do is make the ChildFrame not that easy to close by removing the > close button (the X on the right most corner of the window) if this is > possible... > > how am i

Re: Jython Phone Interview Advice

2005-03-15 Thread Jeremy Bowers
On Tue, 15 Mar 2005 03:21:19 -0800, George Jempty wrote: > I'm noticing that Javascript's array/"hash" literal syntax is EXACTLY the > same as that for Python lists/dictionaries. No it isn't, quite. Two differences of note, one literally syntax and one technically not but you probably still want

Re: Python becoming less Lisp-like

2005-03-15 Thread Jeremy Bowers
On Tue, 15 Mar 2005 03:21:48 -0800, Paul Boddie wrote: > Well, I've been using Python for almost ten years, and I've managed to > deliberately ignore descriptors and metaclasses quite successfully. I get > the impression that descriptors in particular are a detail of the > low-level implementation

Re: Python becoming less Lisp-like

2005-03-16 Thread Jeremy Bowers
On Wed, 16 Mar 2005 16:35:57 -0600, Mike Meyer wrote: > The real problem is that newbies won't know which features are "meta" > features best left to experts, and which features are ok for everyday > programmers to use. > > We recently saw a thread (couldn't find it in google groups) where > some

Re: Why tuple with one item is no tuple

2005-03-16 Thread Jeremy Bowers
On Wed, 16 Mar 2005 17:28:51 -0800, James Stroud wrote: > On Wednesday 16 March 2005 04:45 pm, Robert Kern wrote: >> > This would be very unambiguous. >> >> Not entirely. >> >> > Then, the purity would manifest itself the naked comma being an empty >> > tuple. Think about the zen of: >> > >> > Â Â

Re: The use of :

2004-11-28 Thread Jeremy Bowers
A two-fer. On Mon, 29 Nov 2004 10:28:42 +0800, Isaac To wrote: >> "Greg" == Greg Ewing <[EMAIL PROTECTED]> writes: > > >> The only punctuation you *need* is whitespace. See Forth > > Greg> You don't even need that... see FORTRAN. :-) Well, I for one don't like reading large program

Re: long number multiplication

2004-12-05 Thread Jeremy Bowers
On Sun, 05 Dec 2004 09:02:18 +0530, I.V. Aprameya Rao wrote: > i have been wondering, how does python store its very long integers and > perform aritmetic on it. > > i needed to implement this myself and was thinking of storing the digits > of an integer in a list. Uh, why? What possible enviro

Re: Audio interviews of Guido or other Python advocates?

2004-12-05 Thread Jeremy Bowers
On Sun, 05 Dec 2004 21:21:50 +0100, Fredrik Lundh wrote: > Carlos Ribeiro wrote: > >> BTW, do bots have a sense of humour? > > it depends; it's not in the standard library: > import humour > Traceback (most recent call last): > etc. Considering where the name "Python" came from, I conside

Re: why python is slower than java?

2004-12-06 Thread Jeremy Bowers
On Mon, 06 Dec 2004 13:01:47 -0800, fuzzylollipop wrote: > yeah, but a lie unanswered by the truth becomes the truth. You know, it's bad enough that somebody starts this thread anew about every two months anyhow, do you really have to try to resurrect dead ones? Be patient and I'm sure you'll ha

Re: GUI Frames and classmethod

2004-12-06 Thread Jeremy Bowers
On Mon, 06 Dec 2004 14:11:04 -0800, Scott David Daniels wrote: > Second, I was referring to code like: > > try: > inner = table[state] > except KeyError: > table[state] = inner = {} > inner[action] = whatever > > vs. code like this: > > table[state, ac

Re: RPC with Python - Comparison?

2004-12-06 Thread Jeremy Bowers
On Mon, 06 Dec 2004 21:38:16 -0800, johng2001 wrote: > Anyone has any insights on REST Vs SOAP/XML-RPC? I have seen these debates > else where on the web. Just want to know what the view point here is. I've seen people argue this point a bajillion times, and honestly, I think the best insight is t

Re: Class Variable Inheritance

2004-12-08 Thread Jeremy Bowers
On Wed, 08 Dec 2004 16:49:34 -0900, Brian "bojo" Jones wrote: > class a(object): > > def __init__(self): > self.map = mapper() > print 'called a' What is the advantage of this over def __init__(self): self.map = [] ? -- http://mail.python.org/mailman/l

Re: Parse XML using Python

2004-12-09 Thread Jeremy Bowers
On Thu, 09 Dec 2004 06:00:27 -0800, Anil wrote: > > Thomas Guettler wrote: >> Hi, >> >> Here is an example how to use sax: >> >> http://pyxml.sourceforge.net/topics/howto/node12.html >> >> Thomas >> >> -- >> Thomas GÃttler, http://www.thomas-guettler.de/ > > > Could you please tell me how to a

Re: New versions breaking extensions, etc.

2004-12-11 Thread Jeremy Bowers
On Sat, 11 Dec 2004 01:28:45 -0600, Mike Meyer wrote: > Actually, there's a problem on Unix that may not exist on > Windows. Python is installed in /lib/python/. This > lets us have multiple versions of Python installed at the same time, > which is a good thing. > ... > The real solution is... Int

  1   2   >