Re: The Industry choice

2004-12-31 Thread Alan Gauld
On 30 Dec 2004 08:58:36 -0800, "Sridhar R" <[EMAIL PROTECTED]> wrote: > What makes such companies to choose Java over dynamic, productive > languages like Python? Are there any viable, technical reasons for > that? Decisions are made by men in suits who read very expensive business magazines, re

Re: The Industry choice

2004-12-31 Thread Paul Rubin
"Sridhar R" <[EMAIL PROTECTED]> writes: > What makes such companies to choose Java over dynamic, productive > languages like Python? Are there any viable, technical reasons for that? I think you have to be more careful when you program in Python. Java is statically typed and can do all kinds of

RE: Is there a better way of listing Windows shares other than us ing "os.listdir"

2004-12-31 Thread Doran_Dermot
Hi David, Thanks for the bit of code on finding shares! I'd been using something a bit different (win32com.client stuff) but your code looks better. I've found that "win32file.FindFilesIterator" (suggested to me by another person on this mailing list) allows the gui to remain responsive. Using

Re: Is there a better way of listing Windows shares other than us ing "os.listdir"

2004-12-31 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: Hi David, Thanks for the bit of code on finding shares! I'd been using something a bit different (win32com.client stuff) but your code looks better. I've found that "win32file.FindFilesIterator" (suggested to me by another person on this mailing list) allows the gui to r

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Ian Bicking
John Roth wrote: I appreciate some of the motivation, but merely avoiding giving something a name doesn't seem like a laudible goal. Actually, it is a laudable goal. It's always easier to understand something when it's right in front of your face than if it's off somewhere else. Naming the functio

py2app on Mac OS X 10.3

2004-12-31 Thread Austin
""" Minimal setup.py example, run with: % python setup.py py2app """ from distutils.core import setup import py2app setup( app = ['main.py'], ) That is a sample code of wiki. I have a file 'main.py' and several sub-folders. After I execute 'pythonw setup.py py2exe', I see 2 folders, 'dist' &

Re: More baby squeaking - iterators in a class

2004-12-31 Thread Bulba!
On Thu, 30 Dec 2004 12:06:31 -0800, Scott David Daniels <[EMAIL PROTECTED]> wrote: >Here's one way: # (Make __iter__ an iterator) >Py> class R1(object): > def __init__(self, data): > self.data = data > self.i = len(data) > def __iter__(self): >

Re: Speed ain't bad

2004-12-31 Thread Craig Ringer
On Fri, 2004-12-31 at 11:17, Jeremy Bowers wrote: > I would point out a couple of other ideas, though you may be aware of > them: Compressing all the files seperately, if they are small, may greatly > reduce the final compression since similarities between the files can not > be exploited. True;

Re: The Industry choice

2004-12-31 Thread Bulba!
On Thu, 30 Dec 2004 12:59:57 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >> We either need time for folks to accept dynamic, "scripting" >> languages, or a lot of "modern" language programmers need to gang up >> against managers and stuff. :) >[...] >Right, what have the managers ever done for

Re: copying classes?

2004-12-31 Thread harold fellermann
On 30.12.2004, at 01:24, It's me wrote: I would not think that a generic deepcopy would work for all cases. An object can be as simple as a number, for instance, but can also be as complex as the universe. I can't imagine anybody would know how to copy a complex object otherthen the object its

Re: The Industry choice

2004-12-31 Thread Peter Dembinski
"Thomas Bartkus" <[EMAIL PROTECTED]> writes: [...] > > What makes such companies to choose Java over dynamic, productive > > languages like Python? Are there any viable, technical reasons > > for that? > > Are there "viable, technical reasons"? That would be doubtful. > > But > > There is a

Re: py2app on Mac OS X 10.3

2004-12-31 Thread Ronald Oussoren
On 31-dec-04, at 11:12, Austin wrote: """ Minimal setup.py example, run with: % python setup.py py2app """ from distutils.core import setup import py2app setup( app = ['main.py'], ) That is a sample code of wiki. I have a file 'main.py' and several sub-folders. After I execute 'pythonw setup.py

Re: The Industry choice

2004-12-31 Thread Christopher Koppler
On Fri, 31 Dec 2004 02:13:27 +0100, Bulba! wrote: > On 30 Dec 2004 08:58:36 -0800, "Sridhar R" > <[EMAIL PROTECTED]> wrote: > [snip] > >>What makes such companies to choose Java over dynamic, productive >>languages like Python? Are there any viable, technical reasons for >>that? > > It's the

Re: The Industry choice

2004-12-31 Thread Christopher Koppler
On Fri, 31 Dec 2004 12:05:47 +0100, Peter Dembinski wrote: > "Thomas Bartkus" <[EMAIL PROTECTED]> writes: > > [...] > >> > What makes such companies to choose Java over dynamic, productive >> > languages like Python? Are there any viable, technical reasons >> > for that? >> >> Are there "viable

Re: copying classes?

2004-12-31 Thread Alex Martelli
harold fellermann <[EMAIL PROTECTED]> wrote: ... > > I always think that a well designed object should have a copyme method. > > :=) That would be __copy__ or __deepcopy__, but the __getstate__ / __setstate__ approach is often preferable. > take a look at the __setstate__ and __getstate__ docu

Re: The Industry choice

2004-12-31 Thread Paul Rubin
Christopher Koppler <[EMAIL PROTECTED]> writes: > The moral is, of course, that either the Python community's alpha > geeks need to get access to controlling interest in a *major* > company (or to become successful enough with their own companies to > register on the current *major* companies radar

Re: How about "pure virtual methods"?

2004-12-31 Thread Noam Raphael
Thanks for your suggestion, but it has several problems which the added class solves: * This is a very long code just to write "you must implement this method". Having a standard way to say that is better. * You can instantiate the base class, which doesn't make sense. * You must use testing to

Re: The Industry choice

2004-12-31 Thread Christopher Koppler
On Fri, 31 Dec 2004 03:49:44 -0800, Paul Rubin wrote: > Christopher Koppler <[EMAIL PROTECTED]> writes: >> The moral is, of course, that either the Python community's alpha >> geeks need to get access to controlling interest in a *major* >> company (or to become successful enough with their own co

Re: The Industry choice

2004-12-31 Thread Paul Rubin
Christopher Koppler <[EMAIL PROTECTED]> writes: > IMO (and - indubitably limited - experience) in the many cases where it > *would* be an excellent choice, it *is* most often a matter of politics, > to have a project use, say C# or Java instead of Python (or Lisp for that > matter) as the main deve

ftplib strange behaviour

2004-12-31 Thread siggy2
Hi, I'm using Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 I've noticed a strange (= not deterministic) behaviour of ftplib.py: sometimes (not always) it fails (after a variable number of minutes from 15 to 130) downloading a 150 MB BINARY file (a big gzipped ascii

Re: The Industry choice

2004-12-31 Thread Christopher Koppler
On Fri, 31 Dec 2004 04:03:53 -0800, Paul Rubin wrote: > Christopher Koppler <[EMAIL PROTECTED]> writes: >> IMO (and - indubitably limited - experience) in the many cases where it >> *would* be an excellent choice, it *is* most often a matter of politics, >> to have a project use, say C# or Java in

Re: lies about OOP

2004-12-31 Thread TZOTZIOY
On Wed, 15 Dec 2004 17:37:08 -0500, rumours say that Peter Hansen <[EMAIL PROTECTED]> might have written: >Martijn Faassen wrote: >> Peter Hansen wrote: >>> Well, in any case, thanks for setting the record straight, Martjin. >> >> That of course also happens to me once every while. I can take car

Re: Speed ain't bad

2004-12-31 Thread Reinhold Birkenfeld
Craig Ringer wrote: > On Fri, 2004-12-31 at 11:17, Jeremy Bowers wrote: > >> I would point out a couple of other ideas, though you may be aware of >> them: Compressing all the files seperately, if they are small, may greatly >> reduce the final compression since similarities between the files can

Re: The Industry choice

2004-12-31 Thread Bulba!
On 31 Dec 2004 03:49:44 -0800, Paul Rubin wrote: >It's not just a matter of attitude or politics. Python is an >excellent choice for many projects. For some other projects, it's >clearly unsuitable. For yet other projects, it's a plausible choice >but there are sound t

Re: The Industry choice

2004-12-31 Thread Peter Dembinski
Paul Rubin writes: [...] > I'm involved in a development project for something that's security > critical and has to be reliable. The implementation language hasn't > been chosen yet. Python and Java are both possibilities. I'm fine > with the idea of using Python fo

Re: Python + Lisp integration?

2004-12-31 Thread Peter Dembinski
Simo Melenius <[EMAIL PROTECTED]> writes: > Hi, > > I'm wondering (after a bit of googling) whether there exists > a Python binding to any open source Lisp environment (like librep > or some Scheme or Common Lisp implementation) that could > be recommended for non-toy use? Dunno about non-toy

Re: Speed ain't bad

2004-12-31 Thread Bulba!
On Fri, 31 Dec 2004 13:19:44 +0100, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >> True; however, it's my understanding that compressing individual files >> also means that in the case of damage to the archive it is possible to >> recover the files after the damaged file. This cannot be guarant

HELP: Strange behaviour of subprocess

2004-12-31 Thread Pekka Niiranen
Hi there I have installed Cygwin to my w2k machine and use Python to execute Bash -shell scripts. I noticed that in script below parameter "shell=False" causes raw_input() to fail; the only way to stop script is to kill the Dos window where it is run (The Bash shell runs OK listing directory conten

Re: Speed ain't bad

2004-12-31 Thread Bulba!
On Thu, 30 Dec 2004 22:17:10 -0500, Jeremy Bowers <[EMAIL PROTECTED]> wrote: >I would point out a couple of other ideas, though you may be aware of >them: Compressing all the files seperately, if they are small, may greatly >reduce the final compression since similarities between the files can not

Re: Speed ain't bad

2004-12-31 Thread Bulba!
On Fri, 31 Dec 2004 13:19:44 +0100, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >> True; however, it's my understanding that compressing individual files >> also means that in the case of damage to the archive it is possible to >> recover the files after the damaged file. This cannot be guarant

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-31 Thread Steve Holden
Jeff Shannon wrote: Alex Martelli wrote: Carl Banks <[EMAIL PROTECTED]> wrote: Then again, millenia past didn't have Frank Gehry (i.e., the Perl of modern architecture). Uhm -- I count the Guggenheim Museum in Bilbao among the _successes_ of modern architecture... I'll give you the Bilbao Guggen

Re: Urgently need Elecronic version of book:Python Network programming by John Goerz

2004-12-31 Thread Steve Holden
mch2k2 wrote: Hello All I have just started working on Pyhton. I need urgent help regarding Python Network Programming. I want the elctronic version of the Book: Foundations of Python Network programming by John Goerzen. If anybody among you have that please forward at my mailID. Thank you in advan

ANN: matplotlib-0.70

2004-12-31 Thread John Hunter
matplotlib is a 2D graphics package that produces plots from python scripts, the python shell, or embeds them in your favorite python GUI -- wx, gtk, tk, fltk currently supported with qt in the works. Unlike many python plotting alternatives is written in python, so it is easy to extend. matplot

Re: The Industry choice

2004-12-31 Thread Paul Rubin
Bulba! <[EMAIL PROTECTED]> writes: > OK, so what projects and why would you consider Python: > > 1. "clearly unsuitable" An OS kernel, a high-performance signal processing application like a video encoder, or maybe a compact embedded application for an 8-bit microcontroller. Note that you could

Re: The Industry choice

2004-12-31 Thread Paul Rubin
Peter Dembinski <[EMAIL PROTECTED]> writes: > If it has to be both reliable and secure, I suggest you used more > redundant language such as Ada 95. That's something to think about and it's come up in discussions, but probably complicates stuff since it's not currently available on the target plat

Re: what is lambda used for in real code?

2004-12-31 Thread Diez B. Roggisch
> So, those are my thoughts on how lambdas are "really" used. If others > out there have real-life code that uses lambdas in interesting ways, > feel free to share them here! I use them in conjunction with metaclasses and properties: def _s_item(self, item): """ saw::active """

Parsing a search string

2004-12-31 Thread Freddie
Happy new year! Since I have run out of alcohol, I'll ask a question that I haven't really worked out an answer for yet. Is there an elegant way to turn something like: > moo cow "farmer john" -zug into: ['moo', 'cow', 'farmer john'], ['zug'] I'm trying to parse a search string so I can use it f

Re: Speed ain't bad

2004-12-31 Thread Paul Rubin
Bulba! <[EMAIL PROTECTED]> writes: > The only thing I'm missing in this picture is knowledge if my script > could be further optimised (not that I actually need better > performance, I'm just curious what possible solutions could be). > > Any takers among the experienced guys? There's another co

Re: Speed ain't bad

2004-12-31 Thread Paul Rubin
Bulba! <[EMAIL PROTECTED]> writes: > >With gzip, you can forget the entire rest of the stream; with bzip2, > >there is a good chance that nothing more than one block (100-900k) is lost. > > A "good chance" sometimes is unacceptable -- I have to have a > guarantee that as long as the hardware isn't

Re: Parsing a search string

2004-12-31 Thread M.E.Farmer
How , I just posted on something similar earlier ;) Ok first of all you might want to try shlex it is in the standard library. If you don't know what cStringIO is dont worry about it it is just to give a file like object to pass to shlex. If you have a file just pass it in opened. example: a = shl

Re: Parsing a search string

2004-12-31 Thread Fuzzyman
That's not bad going considering you've only run out of alcohol at 6 in the morning and *then* ask python questions. Anyway - you could write a charcter-by-character parser function that would do that in a few minutes... My 'listquote' module has one - but it splits on commas not whitespace. Soun

Re: The Industry choice

2004-12-31 Thread Christopher Koppler
On Fri, 31 Dec 2004 05:54:05 -0800, Paul Rubin wrote: > Bulba! <[EMAIL PROTECTED]> writes: >> OK, so what projects and why would you consider Python: >> >> 1. "clearly unsuitable" > > An OS kernel, a high-performance signal processing application like a > video encoder, or maybe a compact embed

Re: what would you like to see in a 2nd edition Nutshell? A: "Unicode aware scrollable message box in Tk"

2004-12-31 Thread Pekka Niiranen
Well, I have not read the previous version, but I would like to see an example how to redirect console messages from scripts to Tk windows in UTF-8/16 for debugging purposes. (I hate those "ordinal not in range(128)" messages) This involves setting font (Arial MS Unicode), scrollbar and "Continue"

Re: More baby squeaking - iterators in a class

2004-12-31 Thread M.E.Farmer
Reread Russel Blau post he is spot on with his comments: Russel Blau wrote: >I don't get that from the passage quoted, at all, although it is somewhat >opaque. It says that your __iter__() method must *return an object* with a >next() method; your __iter__() method below doesn't return such an obje

Re: The Industry choice

2004-12-31 Thread Alex Martelli
Christopher Koppler <[EMAIL PROTECTED]> wrote: ... > >> > What makes such companies to choose Java over dynamic, productive > >> > languages like Python? Are there any viable, technical reasons > >> > for that? ... > >> There is a reason very important to major companies. When you leave > >

Re: Parsing a search string

2004-12-31 Thread Reinhold Birkenfeld
Freddie wrote: > Happy new year! Since I have run out of alcohol, I'll ask a question that I > haven't really worked out an answer for yet. Is there an elegant way to turn > something like: > > > moo cow "farmer john" -zug > > into: > > ['moo', 'cow', 'farmer john'], ['zug'] > > I'm trying t

Re: The Industry choice

2004-12-31 Thread Alex Martelli
Christopher Koppler <[EMAIL PROTECTED]> wrote: > The moral is, of course, that either the Python community's alpha geeks > need to get access to controlling interest in a *major* company (or to > become successful enough with their own companies to register on the > current *major* companies radar

Re: Parsing a search string

2004-12-31 Thread M.E.Farmer
As I noted before shlex requires a file like object or a open file . py> import shlex py> a = shlex.shlex('fgfgfg dgfgfdgfdg') py> a.get_token() Traceback (most recent call last): File "", line 1, in ? File ".\shlex.py", line 74, in get_token raw = self.read_token() File ".\shlex.py", line 100, in

Re: Why are tuples immutable?

2004-12-31 Thread Antoon Pardon
On 2004-12-29, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: >> Op 2004-12-23, Scott David Daniels schreef <[EMAIL PROTECTED]>: >>>This is half the problem. In the period where an element is in the >>>wrong hash bucket, a new entry for the same value can be created in >>>th

Re: The Industry choice

2004-12-31 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > Well, Google's market capitalization must be around 50 billion dollars > or more, in the range of the top-100 companies, I believe, and they've > never kept their Python use a secret. They use Python for a lot of internal tools but their high-volume se

RE: The Industry choice

2004-12-31 Thread Walter S. Leipold
Paul Rubin writes: > I don't know that C# is really that much different from Python. > I haven't used it but I have the impression that it's sort of similar > under the skin. Nope nope nope. C# is a statically typed, statically compiled (i.e., no eval(...) or exec(...)), single-inheritance lan

Re: OT: novice regular expression question

2004-12-31 Thread It's me
Oops! Sorry, didn't realize that. Thanks, "M.E.Farmer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > It's me wrote: > > The shlex.py needs quite a number of .py files. I tried to hunt down > a few > > of them and got really tire. > > > > Is there one batch of .py files that I

Re: The Industry choice

2004-12-31 Thread Alex Martelli
Paul Rubin wrote: > [EMAIL PROTECTED] (Alex Martelli) writes: > > Well, Google's market capitalization must be around 50 billion dollars > > or more, in the range of the top-100 companies, I believe, and they've > > never kept their Python use a secret. > > They use P

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-31 Thread JanC
JoeG schreef: > I disagree with your Tkinter vs. wxPython > decision. I tried a number of programs written with Tkinter and really > didn't like the interface. The program I helped develop is Windows > based and I knew that a program with the Tkinter interface would never > work as a cross platf

Using Tix and Tkinter

2004-12-31 Thread Harlin Seritt
I am trying to create a simple window using the following code: --code--- import Tix from Tkconstants import * from Tkinter import * root = Tix.Tk() Label(root, text="Hello!").pack() Tix.tixControl().pack() root.mainloop() ---code--- When I run this, I get the following error: Traceback (mo

Re: More baby squeaking - iterators in a class

2004-12-31 Thread Terry Reedy
"Bulba!" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks to everyone for their responses, but it still doesn't work re > returning next() method: > class R3: >def __init__(self, d): >self.d=d >self.i=len(d) >def __iter__(self): >d,i = self

Re: what is lambda used for in real code?

2004-12-31 Thread Steven Bethard
Alex Martelli wrote: Steven Bethard <[EMAIL PROTECTED]> wrote: (2) lambda a: a.lower() My first thought here was to use str.lower instead of the lambda, but of course that doesn't work if 'a' is a unicode object: Right, but string.lower works (after an 'import string'). More generally, maybe it w

Re: Parsing a search string

2004-12-31 Thread Reinhold Birkenfeld
M.E.Farmer wrote: > As I noted before shlex requires a file like object or a open file . > py> import shlex > py> a = shlex.shlex('fgfgfg dgfgfdgfdg') > py> a.get_token() > Traceback (most recent call last): > File "", line 1, in ? > File ".\shlex.py", line 74, in get_token > raw = self.read_token(

Re: More baby squeaking - iterators in a class

2004-12-31 Thread Steven Bethard
Bulba! wrote: Thanks to everyone for their responses, but it still doesn't work re returning next() method: class R3: def __init__(self, d): self.d=d self.i=len(d) def __iter__(self): d,i = self.d, self.i while i>0: i-=1 yield d[i]

Re: Parsing a search string

2004-12-31 Thread It's me
I am right in the middle of doing text parsing so I used your example as a mental exercise. :-) Here's a NDFA for your text: b 0 1-9 a-Z , . + - ' " \n S0: S0 E E S1 E E E S3 E S2 E S1: T1 E E S1 E E E E E E T1 S2: S2 E E S2 E E E E E T2 E S3: T3 E E S3 E E

Re: More baby squeaking - iterators in a class

2004-12-31 Thread M.E.Farmer
Terry Reedy wrote: >This is the wrong test for what I and some others thought you were asking. >The requirement for p to be an *iterable* and useable in code such as 'for >i in p' is that iter(p), not p itself, have a .next method, and iter(p) >will. Try ip=iter(p) followed by ip.next and ip.next()

Re: The Industry choice

2004-12-31 Thread beliavsky
Bulba wrote: >OK, so what projects and why would you consider >Python: >1. "clearly unsuitable" Large-scale scientific computing projects, such as numerical weather prediction, where performance is critical. Python could be used as the "glue" but not the "guts", where Fortran 95 and C++ are more a

Re: what is lambda used for in real code?

2004-12-31 Thread Alex Martelli
Steven Bethard <[EMAIL PROTECTED]> wrote: > >>(3) self.plural = lambda n: int(n != 1) > >>Note that this is *almost* writable with def syntax. If only we could do: > >> def self.plural(n): > >> int(n != 1) > > > > Not sure about the context, but maybe we could use, at class-level: >

Re: Parsing a search string

2004-12-31 Thread M.E.Farmer
Ah! that is what the __future__ brings I guess. Damn that progress making me outdated ;) Python 2.2.3 ( a lot of extensions I use are stuck there , so I still use it) M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list

Re: Probleme mit der Installation der openSource Bittorrent.... python vs JAVA

2004-12-31 Thread JanC
Gerhard Haering schreef: > I can understand your emotions here. OTOH it's typical for Germans > (and even more so French) to assume that everybody speaks their > language. The same is true for English language speakers in my experience... (E.g.: why is this international newsgroup in English only

Re: Speed ain't bad

2004-12-31 Thread Bulba!
On 31 Dec 2004 06:05:44 -0800, Paul Rubin wrote: >> (initially, that was just a shell script, but whitespaces and >> strange chars that users love to enter into filenames break >> just too many shell tools) >I didn't look at your script, but why not just use info-zip?

Re: what is lambda used for in real code?

2004-12-31 Thread Steven Bethard
Alex Martelli wrote: Steven Bethard <[EMAIL PROTECTED]> wrote: py> class C(object): ... def __init__(self): ... self.plural = lambda n: int(n != 1) ... py> c = C() py> c.__class__.plural(1) Traceback (most recent call last): File "", line 1, in ? AttributeError: type object 'C' has no

Re: More baby squeaking - iterators in a class

2004-12-31 Thread Bulba!
On Fri, 31 Dec 2004 16:31:45 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: >py> p = R3('eggs') >py> i = p.__iter__() >py> i.next() >'s' >or >py> p = R3('eggs') >py> i = iter(p) >py> i.next() >'s' And that is precisely what I needed to know. Thanks, to you, Terry and everyone who took time to l

Re: The Industry choice

2004-12-31 Thread JanC
Paul Rubin schreef: > Java code is larger and takes longer to write, but has a higher chance > of working properly once it compiles and passes basic tests. That's why you can make most JSP sites useless by disabling cookies in your browser? :-p -- JanC "Be strict when sending and tolerant

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Alex Martelli
Paul L. Du Bois <[EMAIL PROTECTED]> wrote: ... > are all unsupported. I'm sorry if google groups eats my leading > whitespace; I've one-lined things to reduce the effect. It does/did, so let me repost while fixing it since this is truly, deliciously evil: > def fn(gen): > """Turns a gener

Re: The Industry choice

2004-12-31 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: ... > array elements. Powers and subtractions in array operations seem to be > free in Fortran but very expensive in Python with Numeric. Right, particularly raising to power: a good part of your observations (not all) is accounted for by the fact that Python doesn't

Re: pyUnitPerf

2004-12-31 Thread Dieter Maurer
"Grig" <[EMAIL PROTECTED]> writes on 28 Dec 2004 18:47:45 -0800: > ... > My own experience with pyUnit has been very satisfactory and for me > personally pyUnitPerf scratches an itch. We use "pyUnit" extensively and are mostly satisfied. There is one essential problem we hit more often: setting u

Re: PyQT installation

2004-12-31 Thread Alex Martelli
Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Nanoscalesoft wrote: > > > does that mean PyQT is not forward What a bad thing is this... > > Whoa, how did you get it? > > You can buy commercial licenses and be as current as we are on Linux > with GPL versions of Qt+PyQt. Oh, and QScintilla a

Re: Parsing a search string

2004-12-31 Thread Reinhold Birkenfeld
M.E.Farmer wrote: > Ah! that is what the __future__ brings I guess. > Damn that progress making me outdated ;) > Python 2.2.3 ( a lot of extensions I use are stuck there , so I still > use it) I'm also positively surprised how many cute little additions are there every new Python version.

OT: spacing of code in Google Groups

2004-12-31 Thread beliavsky
When I copy code from a source file into a Google Groups message, the indentation is messed up, making my Python code illegal and all my code ugly. Are there tricks to avoid this? -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQT installation

2004-12-31 Thread Alex Martelli
Steve Holden <[EMAIL PROTECTED]> wrote: > I presume the non-commercial edition is for people who want to use Qt > but don't want to pay licensing fees or open their source? Or is the GPL > version only available on non-Windows platforms? Of all the GUI > platforms I know about, Qt certainly has t

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2004-12-31 Thread Alex Martelli
Cameron Laird <[EMAIL PROTECTED]> wrote: ... > Yippee! The martellibot promises to explain Unicode for Pythoneers. > http://groups-beta.google.com/group/comp.lang.python/msg/6015a5a05c206712 Uh -- _did_ I? Eeep... I guess I did... mostly, I was pointing to Holger Krekel's very nice recipe (

Re: Mixing metaclasses and exceptions

2004-12-31 Thread Alex Martelli
Phillip J. Eby <[EMAIL PROTECTED]> wrote: > Jp Calderone wrote: > > I'd skip that, though. Your problem doesn't sound "Metaclass!" at > me. > > I wonder if you could elaborate on your usage? Perhaps there's a > better > > solution which doesn't involve metaclasses at all. > > I suspect he cou

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Steven Bethard
Alex Martelli wrote: Paul L. Du Bois <[EMAIL PROTECTED]> wrote: def fn(gen): """Turns a generator expression into a callable.""" def anonymous(*args): return gen.next() return anonymous def args(): """Works with fn(); yields args passed to anonymous().""" while True: yield sys._getfr

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Scott David Daniels
David Bolen wrote: So for example, an asynchronous sequence of operations might be like: d = some_deferred_function() d.addCallback(lambda x: next_function()) d.addCallback(lambda blah: third_function(otherargs, blah)) d.addCallback(lambda x: last_function()) which to me is more rea

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Alex Martelli
Steven Bethard <[EMAIL PROTECTED]> wrote: > Does that seem about right? Yep! > P.S. That's so *evilly* cool! We should have an Evilly Cool Hack of the Year, and I nominate Paul du Bois's one as the winner for 2004. Do I hear any second...? Alex -- http://mail.python.org/mailman/listinfo/py

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > We should have an Evilly Cool Hack of the Year, and I nominate Paul du > Bois's one as the winner for 2004. Do I hear any second...? The year's not over yet :). -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Ian Bicking
David Bolen wrote: Ian Bicking <[EMAIL PROTECTED]> writes: The one motivation I can see for function expressions is callback-oriented programming, like: get_web_page(url, when_retrieved={page | give_page_to_other_object(munge_page(page))}) This is my primary use case for lambda's nowa

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-31 Thread Brian van den Broek
Hi all, a question about using parenthesis for tuples veered very far off topic before I returned from a trip and found the thread. I've a comment on the original topic, and then a comment off-topic even for the off-topic direction in which the thread ended up :-) The on-topic: the use of '(' a

Re: Parsing a search string

2004-12-31 Thread Andrew Dalke
"It's me" wrote: > Here's a NDFA for your text: > >b 0 1-9 a-Z , . + - ' " \n > S0: S0 E E S1 E E E S3 E S2 E > S1: T1 E E S1 E E E E E E T1 > S2: S2 E E S2 E E E E E T2 E > S3: T3 E E S3 E E E E E E T3 Now if I only had an NDFA for parsing that syntax...

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread David Bolen
Scott David Daniels <[EMAIL PROTECTED]> writes: > David Bolen wrote: > > So for example, an asynchronous sequence of operations might be like: > > d = some_deferred_function() > > d.addCallback(lambda x: next_function()) > > d.addCallback(lambda blah: third_function(otherargs, blah)) >

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Scott David Daniels
David Bolen wrote: Scott David Daniels <[EMAIL PROTECTED]> writes: while test() != False: ...code... I'm not sure I follow the "error" in this snippet... The code is "fat" -- clearer is: while test(): ...code... The right sequence using lambda is: d = some_deferred_

Re: Parsing a search string

2004-12-31 Thread It's me
"Andrew Dalke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "It's me" wrote: > > Here's a NDFA for your text: > > > >b 0 1-9 a-Z , . + - ' " \n > > S0: S0 E E S1 E E E S3 E S2 E > > S1: T1 E E S1 E E E E E E T1 > > S2: S2 E E S2 E E E E E T2 E > >

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-31 Thread Alex Martelli
Brian van den Broek <[EMAIL PROTECTED]> wrote: ... > > Have you heard of Villanova, often named as the birthplace of Italian > > civilization? That's about 15 km away, where I generally go for major > > grocery shopping at a hypermarket when I _do_ have a car. > > > > > Alex > > 'Hypermarke

Re: Parsing a search string

2004-12-31 Thread Brian Beck
Freddie wrote: I'm trying to parse a search string so I can use it for SQL WHERE constraints, preferably without horrifying regular expressions. Uhh yeah. If you're interested, I've written a function that parses query strings using a customizable version of Google's search syntax. Features incl

Re: Parsing a search string

2004-12-31 Thread John Machin
Andrew Dalke wrote: > "It's me" wrote: > > Here's a NDFA for your text: > > > >b 0 1-9 a-Z , . + - ' " \n > > S0: S0 E E S1 E E E S3 E S2 E > > S1: T1 E E S1 E E E E E E T1 > > S2: S2 E E S2 E E E E E T2 E > > S3: T3 E E S3 E E E E E E T3 > > Now if I only h

Re: The Industry choice

2004-12-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: >Peter Dembinski <[EMAIL PROTECTED]> writes: >> If it has to be both reliable and secure, I suggest you used more >> redundant language such as Ada 95. > >That's something to think about and it's come up in discussions, b

Re: The Industry choice

2004-12-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Christopher Koppler <[EMAIL PROTECTED]> wrote: . . . >Manager culture is still very much mired in rituals that may in one form >or another go back to hunter-gatherer days (or maybe even further)

Re : Upgrade woes: Numeric, gnuplot, and Python 2.4

2004-12-31 Thread Cedric
This is a 3 weeks old problem, but having found a solution (and having looked for one here, finding only this message), I'm replying now. From: Jive ([EMAIL PROTECTED]) Subject: Upgrade woes: Numeric, gnuplot, and Python 2.4 Date: 2004-12-11 18:45:10 PST > Here's my sitch: > > I use gnuplot.py a

Re: pyUnitPerf

2004-12-31 Thread Peter Hansen
Dieter Maurer wrote: We use "pyUnit" extensively and are mostly satisfied. There is one essential problem we hit more often: setting up and tearing down can take excessive time. Often, we are forced to abandon the test independence and let a complete set of tests share the main part of the fixture.

Re: OT: spacing of code in Google Groups

2004-12-31 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > When I copy code from a source file into a Google Groups message, the > indentation is messed up, making my Python code illegal and all my code > ugly. Are there tricks to avoid this? Try putting a # at the start of every line. Everyone should understand what you mean (a

Re: The Industry choice

2004-12-31 Thread Hans Nowak
Paul Rubin wrote: You should write unit tests either way, but in Python you're relying on the tests to find stuff that the compiler finds for you with Java. As I wrote on my weblog a while ago, I suspect that this effect is largely psychological. You jump through hoops, declaring types all over

Re: The Industry choice

2004-12-31 Thread Hans Nowak
Christopher Koppler wrote: > -- > Christopher > > In theory, I'm in love with Lisp, > but I hop into bed with Python every chance I get. That reminds me of something my old math teacher used to say... "My wife is my cathedral, but I pray in every chapel." :-) -- Hans Nowak http://zephyrfalcon.org

Re: OT: spacing of code in Google Groups

2004-12-31 Thread Grant Edwards
On 2004-12-31, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >> When I copy code from a source file into a Google Groups >> message, the indentation is messed up, making my Python code >> illegal and all my code ugly. Are there tricks to avoid this? > > Try putting a # at

Re: OT: spacing of code in Google Groups

2004-12-31 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > When I copy code from a source file into a Google Groups message, the > > indentation is messed up, making my Python code illegal and all my > code > > ugly. Are there tricks to avoid this? > > Try putting a # at the start of every line. Ever

  1   2   >