Re: Iteration over two sequences

2005-02-11 Thread Scott David Daniels
David Isaac wrote: "Scott David Daniels" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]: Numarray is the future, Numeric is the "past", This statement is not obviously true. See the recent discussion on the developer lists. (Search for Numeric3.) Alan Isaac I stand corrected. Sorry

Re: [NooB] Using Escape Sesquences with Strings...

2005-02-11 Thread administrata
bruno modulix <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > administrata wrote: > > Hello! :) > > I've reading 'Python Programmin for the Absolute beginner'. > > I got questions which is... > > > > print "\t - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " > > >

Re: PyQt documentation

2005-02-11 Thread Eric Jardim
[...] > No having said that, I totally agree that such information is surely needed > - but I doubt that it really makes sense to create full docs at a api > level. It would be hard to be in sync with the qt development itself. I agree with that. But there are alternative ways of doing this withou

Re: is there a safe marshaler?

2005-02-11 Thread Irmen de Jong
Fredrik Lundh wrote: the problem is that the following may or may not reach the "done!" statement, somewhat depending on python version, memory allocator, and what data you pass to dumps. import marshal data = marshal.dumps((1, 2, 3, "hello", 4, 5, 6)) for i in range(len(data), -1, -1): try:

Re: goto, cls, wait commands

2005-02-11 Thread jean-michel
"Jeff Shannon" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > jean-michel wrote: > > > Hi all, > > I saw a lot of comments saying GOTO is not usefull, very bad, and we > > should'nt use it because we don't need it. > > I think that's true, but only if you *create* programs

Re: PyQt documentation

2005-02-11 Thread Diez B. Roggisch
Eric Jardim wrote: > *You* may not need. But think about other people. By the way, I found 9 > "I"s on your last message. Don't be that selfish :) That's right - and it was done to express not my unarguably existing selfishness, but to strech the fact that it was my opinion that not necessarily qu

Re: is there a safe marshaler?

2005-02-11 Thread Fredrik Lundh
(repost; gmane seems to have eaten my original post) Irmen de Jong wrote: >> I think marshal could be fixed; the only unsafety I'm aware of is that >> it doesn't always act rationally when confronted with incorrect input >> like bad type codes or truncated input. It only receives instances of >>

Re: is there a safe marshaler?

2005-02-11 Thread Fredrik Lundh
Aahz wrote: >>It's not clear to me that if marshal is unsafe how XML could be safe. In >>this context they are both just serializations of basic Python data >>structures. > > The difference is that parsing XML -- even badly malformed -- won't > crash Python. optimist. >>> import os >>> os.path.

Re: PyQt documentation

2005-02-11 Thread Eric Jardim
[...] > So maybe a better way for you would be to learn python by its own, then > trying to use it in conjunction with qt. [...] The purpose of doing this help is not to help *me*, but help *anyone* who wants to use PyQt. I myself am quite confortable with the Qtdoc. But there are cases that the

Re: Commerical graphing packages?

2005-02-11 Thread Larry Bates
ReportLab has pretty good Graphics Module. About the only thing it needs is Python Imaging Library (which you would probably want anyway). Larry Bates Erik Johnson wrote: I am wanting to generate dynamic graphs for our website and would rather not invest the time in developing the code to draw

Re: is there a safe marshaler?

2005-02-11 Thread Irmen de Jong
Alan Kennedy wrote: I should learn to keep my mouth zipped :-L :-D OK, I really don't have time for a detailed examination of either the JSON spec or the python impl of same. And I *definitely* don't have time for a detailed security audit, much though I'd love to. No problem. The patch you wrote

Re: sre is broken in SuSE 9.2

2005-02-11 Thread Fredrik Lundh
Serge Orlov wrote: >> >>> re.compile(ur'\w+', re.U).findall(u'\xb5\xba\xe4\u0430') >> [u'\xb5\xba\xe4\u0430'] > > I can't find the strict definition of isalpha, but I believe average > C program shouldn't care about the current locale alphabet, so isalpha > is a union of all supported characters i

Re: is there a safe marshaler?

2005-02-11 Thread Irmen de Jong
Fredrik Lundh wrote: import os os.path.getsize("BL.xml") 1302 from xml.dom import minidom x = minidom.parse("BL.xml") (have patience. have lots of patience.) Hehe, the XML killer file "BillionLaughs"... correct? --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a safe marshaler?

2005-02-11 Thread Fredrik Lundh
(repost; gmane seems to have eaten my original post) Aahz wrote: >>It's not clear to me that if marshal is unsafe how XML could be safe. In >>this context they are both just serializations of basic Python data >>structures. > > The difference is that parsing XML -- even badly malformed -- won't

Re: check if object is number

2005-02-11 Thread George Sakkis
> George Sakkis wrote: > > "Steven Bethard" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>Is there a good way to determine if an object is a numeric type? > > > > In your example, what does your application consider to be numeric? > > Well, here's the basic code: > > def f

Re: check if object is number

2005-02-11 Thread George Sakkis
"Michael Hartl" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > As luck would have it, isnumber is a built-in Python function: > > >>> isnumber(1) > True > >>> isnumber(1.0) > True > >>> isnumber('1') > False > > Michael > > -- > Michael D. Hartl, Ph.D. > Chief Technology Officer > h

Re: [perl-python] text pattern matching, and expressiveness

2005-02-11 Thread Aaron Sherman
John Bokma wrote: Xah Lee wrote: Perl is a language of syntactical variegations. Python on the other hand, does not even allow changes in code's indentation, but its efficiency and power in expression, with respect to semantics (i.e. algorithms), showcases Perl's poverty in specification. Clarify

Re: That horrible regexp idiom

2005-02-11 Thread Fredrik Lundh
Stephen Thorne wrote: > but it occured to me today, that it is possible to do it in python > without the extra line. > ' > '>>> def xsearch(pattern, subject): > '>>> yield pattern.search(subject) > > '>>> for m in xsearch(foo_pattern, subject): > '>>> pass > '>>> else: > '>>> pass > >

Re: check if object is number

2005-02-11 Thread Fredrik Lundh
Michael Hartl wrote > As luck would have it, isnumber is a built-in Python function: > isnumber(1) > True isnumber(1.0) > True isnumber('1') > False and what strange Python version would that be? >>> isnumber(1) Traceback (most recent call last): File "", line 1, in ? NameError:

Re: is there a safe marshaler?

2005-02-11 Thread Fredrik Lundh
Irmen de Jong wrote: >> but can't effbot's fast cElementree be used for PYROs XML_PICKLE and would >> it be safe and fast >> enough? > > ElementTree's not a marshaler. > Or has it object (de)serialization included? nope. building a serialization layer on top of it is pretty trivial, and the r

Re: check if object is number

2005-02-11 Thread Michael Hartl
As luck would have it, isnumber is a built-in Python function: >>> isnumber(1) True >>> isnumber(1.0) True >>> isnumber('1') False Michael -- Michael D. Hartl, Ph.D. Chief Technology Officer http://quarksports.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sre is broken in SuSE 9.2

2005-02-11 Thread Fredrik Lundh
Serge Orlov wrote: >> >>> re.compile(ur'\w+', re.U).findall(u'\xb5\xba\xe4\u0430') >> [u'\xb5\xba\xe4\u0430'] > > I can't find the strict definition of isalpha, but I believe average > C program shouldn't care about the current locale alphabet, so isalpha > is a union of all supported characters i

Re: A great Alan Kay quote

2005-02-11 Thread Curt
On 2005-02-10, Francis Girard <[EMAIL PROTECTED]> wrote: > > I think I've been enthouasistic too fast. While reading the article I grew > more and more uncomfortable with sayings like : Yes, you may have grown uncomfortable because what you "read" has, at best, only the most tenuous of relation

Re: check if object is number

2005-02-11 Thread Fredrik Lundh
Steven Bethard wrote: > Is there a good way to determine if an object is a numeric type? Generally, I > avoid type-checks in > favor of try/except blocks, but I'm not sure what to do in this case: > > def f(i): > ... > if x < i: > ... > > The problem is, no error

Re: PyQt documentation

2005-02-11 Thread Jarek Zgoda
djw napisał(a): 6. Convert QStrings with str() from Qt functions/methods if you want to work with them with std. Python string functions No, no, no, don't do it, don't use str()! Your python will choke in any non-ascii character! Use unicode objects and you will be safe from those non-anglosaxon

Re: Alternative to raw_input ?

2005-02-11 Thread BOOGIEMAN
On Fri, 11 Feb 2005 18:00:08 +0100, den wrote: > Did you try this: > > import msvcrt > msvcrt.getch() Yes, that's what I need. Thank you. BTW, sometimes program continues without me pressing any button, why ? -- http://mail.python.org/mailman/listinfo/python-list

Commerical graphing packages?

2005-02-11 Thread Erik Johnson
I am wanting to generate dynamic graphs for our website and would rather not invest the time in developing the code to draw these starting from graphics primitives. I am looking for something that is... "fairly robust" but our needs are relatively modest: X-Y scatter plots w/ data point symbol

Re: problem with tk and pass by refference (I think :)

2005-02-11 Thread Matthew Thorley
Diez B. Roggisch wrote: I tried it but I got a syntax error. The interpreter didn't like the equals sign in the lambda. I am using python 2.3.4. Is there another way of writing that? Strange. This script works and shows the desired behaviour - python is also 2.3.4: def foo(x): print x fs = [la

Re: goto, cls, wait commands

2005-02-11 Thread Jeff Shannon
jean-michel wrote: Hi all, I saw a lot of comments saying GOTO is not usefull, very bad, and we should'nt use it because we don't need it. I think that's true, but only if you *create* programs. But if the goal is to provide some kind of converter to automatically take an old application written wi

Re: problem with tk and pass by refference (I think :)

2005-02-11 Thread Diez B. Roggisch
> I tried it but I got a syntax error. The interpreter didn't like the > equals sign in the lambda. I am using python 2.3.4. Is there another way > of writing that? Strange. This script works and shows the desired behaviour - python is also 2.3.4: def foo(x): print x fs = [lambda: foo(i) fo

Re: check if object is number

2005-02-11 Thread Steven Bethard
George Sakkis wrote: "Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Is there a good way to determine if an object is a numeric type? In your example, what does your application consider to be numeric? Well, here's the basic code: def f(max=None): ... while max

Re: problem with tk and pass by refference (I think :)

2005-02-11 Thread Matthew Thorley
Diez B. Roggisch wrote: Hi, button = Button(self.songWin, text=verse, command=(lambda num=verseNum: self.showVerse(num)) ) should do the trick. The reason is basically that your version kept a reference to verseNum - and when executed, the value verseNum points to is the lasts one stored. Rebinding

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-11 Thread Simon John
I've just got Qt 3.3.3 and PyQt 3.1.3 compiled for Python 2.4 using the instructions for MinGW here: http://kscraft.sourceforge.net/convert_xhtml.php?doc=pyqt-windows-install.xhtml It was a pretty nasty experience, hacking python24.dll and patching sip/PyQt, but i got it all working after about 4

Re: check if object is number

2005-02-11 Thread George Sakkis
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there a good way to determine if an object is a numeric type? > Generally, I avoid type-checks in favor of try/except blocks, but I'm > not sure what to do in this case: > > def f(i): > ... > i

Re: newbie question

2005-02-11 Thread Jeff Shannon
Dennis Lee Bieber wrote: On Thu, 10 Feb 2005 09:36:42 -0800, Jeff Shannon <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: And as Peter Hansen points out, none of the Python versions leave n in the same state that the C loop does, so that's one more way in which an exact translati

Re: Multi-Platform installer generator

2005-02-11 Thread Simon John
if you're referring to the installshield x/mp products, forget it, they are really bad. the last company i worked for who used x/mp actually went back to shell scripts for unix and installshield pro for windows, as the java thing was abismall, and even the ide was written in java, so horribly slow

Re: PyQt documentation

2005-02-11 Thread djw
Eric Jardim wrote: Hi, Is there any site that gather all the documentation about PyQt? The docs of the Riverbank site is poor, and I have found separate tutorials on the net. I know that the Kompany have made a "Qtdoc"-like to PyQt. But it is not free doc. Does anybody know anything about any proje

Re: check if object is number

2005-02-11 Thread Steven Bethard
Dan Bishop wrote: Steven Bethard wrote: Is there a good way to determine if an object is a numeric type? How about this? ... def is_number(x): ...try: ... x + 1 ... return True ...except TypeError: ... return False Great, thanks! That's the kind of thing I was looking for

Re: check if object is number

2005-02-11 Thread Steven Bethard
Bill Mill wrote: On Fri, 11 Feb 2005 12:11:44 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: Is there a good way to determine if an object is a numeric type? How about: if type(variable) == type(1): print "is an integer" else: print "please input an integer" This checks if it is an integ

Re: goto, cls, wait commands

2005-02-11 Thread Nick Craig-Wood
Grant Edwards <[EMAIL PROTECTED]> wrote: > I forgot to mention try/except. When I do use goto in C > programming it's almost always to impliment what would have > been a try/except block in Python. Yes I'd agree with that. No more 'goto out'. There is this also for (i = 0; ...) {

Re: Injecting a C side object into the local dict

2005-02-11 Thread python
Take a look at Pyrex. More at /Jean Brouwers Jamie R. Parent wrote: > Hello, > > How do you go about taking a variable which was declared in C and pass > that through to

Re: check if object is number

2005-02-11 Thread Dan Bishop
Steven Bethard wrote: > Is there a good way to determine if an object is a numeric type? > Generally, I avoid type-checks in favor of try/except blocks, but I'm > not sure what to do in this case: > > def f(i): > ... > if x < i: > ... > > The problem is, no erro

Re: check if object is number

2005-02-11 Thread Bill Mill
On Fri, 11 Feb 2005 12:11:44 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: > Is there a good way to determine if an object is a numeric type? > Generally, I avoid type-checks in favor of try/except blocks, but I'm > not sure what to do in this case: > > def f(i): > ... >

Python UPS / FedEx Shipping Module

2005-02-11 Thread Gabriel Cooper
I've made UPS and FedEx shipping rate request modules in python using XML. Is there an interest in putting this on the web? -- http://mail.python.org/mailman/listinfo/python-list

frozenset() without arguments should return a singleton

2005-02-11 Thread Stefan Behnel
Hi! frozenset() doesn't behave as the other immutable empty data types in 2.4: .>>> '' is '' True .>>> () is () True .>>> frozenset() is frozenset() False .>>> id(()),id(()) (1077579820, 1077579820) .>>> id(()) 1077579820 .>>> id(frozenset()),id(frozenset()) (1077581296, 1077581296) .>>> id(frozens

check if object is number

2005-02-11 Thread Steven Bethard
Is there a good way to determine if an object is a numeric type? Generally, I avoid type-checks in favor of try/except blocks, but I'm not sure what to do in this case: def f(i): ... if x < i: ... The problem is, no error will be thrown if 'i' is, say, a string: p

frozenset() without arguments should return a singleton

2005-02-11 Thread Stefan Behnel
Hi! frozenset() doesn't behave as the other immutable empty data types in 2.4: .>>> '' is '' True .>>> () is () True .>>> frozenset() is frozenset() False .>>> id(()),id(()) (1077579820, 1077579820) .>>> id(()) 1077579820 .>>> id(frozenset()),id(frozenset()) (1077581296, 1077581296) .>>> id(frozens

Re: Iteration over two sequences

2005-02-11 Thread David Isaac
"Scott David Daniels" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]: > Numarray is the future, Numeric is the "past", This statement is not obviously true. See the recent discussion on the developer lists. (Search for Numeric3.) Alan Isaac -- http://mail.python.org/mailman/listin

Re: problem with tk and pass by refference (I think :)

2005-02-11 Thread Diez B. Roggisch
Hi, button = Button(self.songWin, text=verse, command=(lambda num=verseNum: self.showVerse(num)) ) should do the trick. The reason is basically that your version kept a reference to verseNum - and when executed, the value verseNum points to is the lasts one stored. Rebinding the argument to a pa

Re: Big development in the GUI realm

2005-02-11 Thread Jorge Luiz Godoy Filho
Max M wrote: > GPL is not suitable for all kinds of software. It's nice if you are > sharing code with others, but if you are developing something like a > desktop application that you want to sell for money, using the GPL is a > bad idea. If you're earning money, why not pay for the libraries th

Re: mxCGIPython binaries for Python 2.3.5

2005-02-11 Thread Oleg Broytmann
On Fri, Feb 11, 2005 at 10:13:21AM -0800, Titus Brown wrote: > what does mxCGIPython do? I can't find anything at that Web site that http://www.egenix.com/files/python/mxCGIPython.html > doesn't involve downloading & unpacking a file. It is unpackable, ready-to-run python binary. PS. I a

problem with tk and pass by refference (I think :)

2005-02-11 Thread Matthew Thorley
Greetings, Maybe someone out there can lend me an eye? I've been stumped, banging my head against the wall trying to figure out why my script doesn't work. I've tried every thing I could think of, even unecessarily complicated mumbo-jumbo. Let me show you a snippet and then I'll explain what's

Re: is there a safe marshaler?

2005-02-11 Thread Aahz
In article <[EMAIL PROTECTED]>, Skip Montanaro <[EMAIL PROTECTED]> wrote: > >Carl> but can't effbot's fast cElementree be used for PYROs XML_PICKLE >Carl> and would it be safe and fast enough? > >It's not clear to me that if marshal is unsafe how XML could be safe. In >this context they a

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: mxCGIPython binaries for Python 2.3.5

2005-02-11 Thread Titus Brown
what does mxCGIPython do? I can't find anything at that Web site that doesn't involve downloading & unpacking a file. thanks, --titus On Fri, Feb 11, 2005 at 06:44:57PM +0300, Oleg Broytmann wrote: -> http://phd.pp.ru/Software/Python/misc/mxCGI/ -> ->mxCGIPython binaries for Python 2.1.3, 2

Re: ActivePython 2.3.5.236 and ActivePython 2.4.0.244 are available

2005-02-11 Thread Trent Mick
mep wrote: ActivePython-2.4.0-243-win32-ix86.msi : 29M ActivePython-2.4.0-244-win32-ix86.msi : 18M What make so much difference of the size of them, which distinct monir version number for 1 only. Any explaination? Yes, build 243 accidentally included some debug-build bits from the included PyWin

Re: Loading functions from a file during run-time

2005-02-11 Thread Bryant Huang
Ah, thanks a lot, Grant and Nick. Let me try to clarify because I think I was unclear in specifying what I want to do: 1. Read in a file containing a bunch of function definitions: def f1(x): ... def f2(x): ... def f3(x): ... def f4(x): ... 2. In wxPython, populate a

Re: Alternative to raw_input ?

2005-02-11 Thread Skip Montanaro
> Err, why? >> It looks to ugly this way. I want to press >> any key without ENTER to continue How about modifying it to raw_input("Press ENTER to continue ") Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Install MySQLdb on Mac OS X (10.3)

2005-02-11 Thread Skip Montanaro
>> Try a more recent version of mysql-python. I think 1.1.7 is the latest. TK> It now works with MySQL-python-1.2.0 Andy's a busy guy... ;-) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a safe marshaler?

2005-02-11 Thread Skip Montanaro
Carl> but can't effbot's fast cElementree be used for PYROs XML_PICKLE Carl> and would it be safe and fast enough? It's not clear to me that if marshal is unsafe how XML could be safe. In this context they are both just serializations of basic Python data structures. Skip -- http://ma

Partnership Opportunity

2005-02-11 Thread eliediamonds
Partnership Opportunity Hello, I am with a manufacturer of fine jewelry and am currently looking for those interested in forming a partnership to sell jewelry on eBay or anywhere else. I work for Elie International, a manufacturer of fine jewelry located in the heart of the diamond district in New

Partnership Opportunity

2005-02-11 Thread eliediamonds
Partnership Opportunity Hello, I am with a manufacturer of fine jewelry and am currently looking for those interested in forming a partnership to sell jewelry on eBay or anywhere else. I work for Elie International, a manufacturer of fine jewelry located in the heart of the diamond district in New

Re: is there a safe marshaler?

2005-02-11 Thread Irmen de Jong
cmkl wrote: but can't effbot's fast cElementree be used for PYROs XML_PICKLE and would it be safe and fast enough? ElementTree's not a marshaler. Or has it object (de)serialization included? --Irmen -- http://mail.python.org/mailman/listinfo/python-list

1998 CNRI license compatibility

2005-02-11 Thread John Reuning
I'm interested in updating the very old kerberos extension module. However, the code dates to 1998 and is licensed under what appears to be a pre-python-1.6 CNRI license. Does anyone have recommendations on whether additions and changes to the old code can be licensed under a newer OSI-approved li

Re: Postgres and SSL

2005-02-11 Thread Jorge Luiz Godoy Filho
Greg Lindstrom wrote: > I'm on a Linux box running python 2.3 and would like to connect to a > postgres database via SSL, but have not been able to find a module to do > this (or haven't figured out the syntax). Can anyone help me out? With both psycopg and pypgsql it depends on how your libpq w

Re: Efficient checksum calculating on lagre files

2005-02-11 Thread Nick Craig-Wood
Christos TZOTZIOY Georgiou <[EMAIL PROTECTED]> wrote: > On 09 Feb 2005 10:31:22 GMT, rumours say that Nick Craig-Wood > <[EMAIL PROTECTED]> might have written: > > >But you won't be able to md5sum a file bigger than about 4 Gb if using > >a 32bit processor (like x86) will you? (I don't know how

Re: Big development in the GUI realm

2005-02-11 Thread Damjan
> The problem with this is what I've called the "patch hole" in another > context [1]. The problem with this definition is that I can *always* > distribute GPL'ed parts separately and re-combine them arbitrarily upon > execution, and it's not even particularly hard. Write your code with the > GPL'e

Re: Alternative to raw_input ?

2005-02-11 Thread den
BOOGIEMAN wrote: On Fri, 11 Feb 2005 16:35:19 +, Simon Brunning wrote: Err, why? It looks to ugly this way. I want to press any key without ENTER to continue Did you try this: import msvcrt msvcrt.getch() -- http://mail.python.org/mailman/listinfo/python-list

Re: convert list of tuples into several lists

2005-02-11 Thread Steven Bethard
Pierre Quentel wrote: Could someone explain why this doesn't work : Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def f(*args,**kw): ... print args, kw ... >>> f(*[1,2]) (1, 2) {} >>>

Re: Alternative to raw_input ?

2005-02-11 Thread John Lenton
On Fri, Feb 11, 2005 at 05:37:19PM +0100, BOOGIEMAN wrote: > On Fri, 11 Feb 2005 16:35:19 +, Simon Brunning wrote: > > > Err, why? > > It looks to ugly this way. I want to press > any key without ENTER to continue read the documentation on readline. Hmm! it says "Availability: Unix". Any p

Re: Is this a bug? BOM decoded with UTF8

2005-02-11 Thread Diez B. Roggisch
> They say that it makes no sense as an byte-order indicator but they > indicate that it can be used as a file signature. > > And I'm not sure what you mean about decoding a UTF-8 string given any > 8-bit encoding. Of course the encoder must be know: That every utf-8 string can be decoded in any

Concurrent Python

2005-02-11 Thread Dominic Fox
I've created a few classes to support some concurrent programming concepts in Python: AsyncResult represents the state of a process currently running in a separate thread. MultiEvent allows listeners to wait for any one of a list of events to be signalled. MultiQueue allows listeners to wait for a

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

2005-02-11 Thread rzed
Jeremy Bowers <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > 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

Re: Performance Issues of MySQL with Python

2005-02-11 Thread Andy Dustman
Well, it does more than that. It converts each column from a string (because MySQL returns all columns as strings) into the appropriate Python type. Then you were converting all the Python types back into strings. So it's no mystery that using the command line client is faster, since it would take

Re: a sequence question

2005-02-11 Thread David Isaac
> Alan Isaac wrote: > > I see that [iter(l)]*N produces an N element list with each element being > > the same iterator object, but after that > > http://www.python.org/doc/2.3.5/lib/built-in-funcs.html > > just didn't get me there. "Nick Coghlan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL P

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: Alternative to raw_input ?

2005-02-11 Thread Grant Edwards
On 2005-02-11, BOOGIEMAN <[EMAIL PROTECTED]> wrote: > On Fri, 11 Feb 2005 16:35:19 +, Simon Brunning wrote: > >> Err, why? > > It looks to ugly this way. I want to press > any key without ENTER to continue Like somebody already said: use the WConio module. Somebody already posted a link.

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

Postgres and SSL

2005-02-11 Thread Greg Lindstrom
I'm on a Linux box running python 2.3 and would like to connect to a postgres database via SSL, but have not been able to find a module to do this (or haven't figured out the syntax). Can anyone help me out? Thanks, --greg -- Greg Lindstrom 501 975.4859 Computer Programmer

Re: Alternative to raw_input ?

2005-02-11 Thread BOOGIEMAN
On Fri, 11 Feb 2005 16:35:19 +, Simon Brunning wrote: > Err, why? It looks to ugly this way. I want to press any key without ENTER to continue -- http://mail.python.org/mailman/listinfo/python-list

Re: Alternative to raw_input ?

2005-02-11 Thread Simon Brunning
On Fri, 11 Feb 2005 17:26:04 +0100, BOOGIEMAN <[EMAIL PROTECTED]> wrote: > I need something like "Press any key to continue" code for my program. > Currently I use : raw_input("Press Enter to continue ") but it's lame. Err, why? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.ne

Alternative to raw_input ?

2005-02-11 Thread BOOGIEMAN
I need something like "Press any key to continue" code for my program. Currently I use : raw_input("Press Enter to continue ") but it's lame. -- http://mail.python.org/mailman/listinfo/python-list

Re: THREAD_STACK_SIZE and python performance?

2005-02-11 Thread Courageous
>The FreeBSD patch, setting the value to 0x10 >seems to be enough for most of our zope servers,... Is that value in /bytes/? In modern solaris implementations of posix threads, the default stack size is 2 megabytes fo 64 bit machines. I can't fathom what your performance consideration would

MDaemon Warning - virus found: Returned mail: Data format error

2005-02-11 Thread Mail Delivery Subsystem
*** WARNING ** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. AttachmentVirus name Action taken ---

Re: Install MySQLdb on Mac OS X (10.3)

2005-02-11 Thread Sion Arrowsmith
Skip Montanaro <[EMAIL PROTECTED]> wrote: >Try a more recent version of mysql-python. I think 1.1.7 is the latest. 1.2.0 -- it appears to be moving extremely rapidly (especially given how long it was at 0.9.2 -- although "Waiting for MySQL 4.1 to become stable" would be a good explanation for th

Injecting a C side object into the local dict

2005-02-11 Thread Jamie R. Parent
Hello, How do you go about taking a variable which was declared in C and pass that through to a Python script? I have tried doing this by adding a simple string which is a PyObject from C into the local dictionary and retrieving it from script via a locals()["myCvar"] print statement. This however

Re: Is this a bug? BOM decoded with UTF8

2005-02-11 Thread Brian Quinlan
Diez B. Roggisch wrote: I'm well aware of the need of a bom for fixed-size multibyte-characters like utf16. But I don't see the need for that on an utf-8 byte sequence, and I first encountered that in MS tool output - can't remember when and what exactly that was. And I have to confess that I attri

Re: sre is broken in SuSE 9.2

2005-02-11 Thread Serge Orlov
Denis S. Otkidach wrote: > On 10 Feb 2005 11:49:33 -0800 > "Serge Orlov" <[EMAIL PROTECTED]> wrote: > > > This thread is about problems only with LANG=C or LANG=POSIX, it's not > > about other locales. Other locales are working as expected. > > You are not right. I have LANG=de_DE.UTF-8, and the P

Re: Install MySQLdb on Mac OS X (10.3)

2005-02-11 Thread TK
Skip Montanaro wrote: TK> I can't install MySQLdb on Mac OS X (Ver. 10.3) properly. Here's my TK> environment: TK> 1. MySQL-python-1.0.0 ... Try a more recent version of mysql-python. I think 1.1.7 is the latest. Skip Hi Skip, > Try a more recent version of mysql-python. I thin

Re: Python in Makefile Question. try A.A.P

2005-02-11 Thread Bart van Deenen
Another option would be to move from Makefiles to AAP, the build mechanism for vim. We did just that, and are very happy with it. Aap is python based, so the kind of question you have is very easily handled within the 'aap' file. http://www.a-a-p.org/ Aap has the advantage that you don't need to

Re: Is this a bug? BOM decoded with UTF8

2005-02-11 Thread Nick Coghlan
Diez B. Roggisch wrote: So they admit that it makes no sense - especially as decoding a utf-8 string given any 8-bit encoding like latin1 will succeed. So in the end, I stand corrected. But I still think its crap - But not MS crap. :) Oh, good. I'm not the only person who went "A BOM in UTF-8 data?

Re: is there a safe marshaler?

2005-02-11 Thread cmkl
Irmen de Jong <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Pierre Barbier de Reuille wrote: > > Irmen de Jong a écrit : > > > >> Pickle and marshal are not safe. They can do harmful > >> things if fed maliciously constructed data. > >> That is a pity, because marshal is fast.

Re: PyQt documentation

2005-02-11 Thread Diez B. Roggisch
> The point is that if someone is familiar just to Python and not Qt, or > the reverse, familiar to Qt and not to Python, it is difficult to see > the *little* details of implementation. > > I say this because I am familiar to Qt and not much to Python, and > there are simple little mistake I do,

Re: Unit Testing in Python

2005-02-11 Thread Grig Gheorghiu
A great place to start for TDD-related stuff is testdriven.com. On the topic of Python-specific unit testing, there's also a recent thread on the newly-created extreme-python google group: http://groups-beta.google.com/group/extreme-python/browse_thread/thread/f39844c4cf6c844f?tvc=2 Grig htt

Re: Testing web applications

2005-02-11 Thread Grig Gheorghiu
The Jython / HttpUnit combination worked well for me too. There's also maxq (http://maxq.tigris.org/), which looks promising, but I haven't used it yet. Grig http://agiletesting.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt documentation

2005-02-11 Thread Eric Jardim
> You can use the qt c++ doc from trolltech. > The pyqt bindings are so close to he original that > you usually can simply use that. Yes, I currently use it. > Additionally, there is a book from boudewijn rempt > about coding in python+qt which is for qt2, but > it covers all the signal slot ba

Re: [NooB] Using Escape Sesquences with Strings...

2005-02-11 Thread bruno modulix
administrata wrote: Hello! :) I've reading 'Python Programmin for the Absolute beginner'. I got questions which is... print "\t - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " rock = """ Igneous Sedimentary Metamorphic Lava Grains Marble Ram

Re: Python v.s. c++

2005-02-11 Thread bruno modulix
xiaobin yang wrote: Hi, if i am already skillful with c++. Is it useful to learn python? thanks! Q : If I'm already skillfull with driving a big truck, is it useful to learn driving a motorcycle? (tip : Have you ever tried driving a big truck in a big city at rush hour?-) -- bruno desthuillie

Re: Is this a bug? BOM decoded with UTF8

2005-02-11 Thread Diez B. Roggisch
> What are you talking about? The BOM and UTF-16 go hand-and-hand. > Without a Byte Order Mark, you can't unambiguosly determine whether big > or little endian UTF-16 was used. If, for example, you came across a > UTF-16 text file containing this hexidecimal data: 2200> > what would you assume? T

Re: Python versus Perl ?

2005-02-11 Thread rzed
"Mauro Cicognini" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > Alex Martelli wrote: > >> URK -- _my_ feeling is that we have entirely *too many* options >> for stuff like web application frameworks, GUI toolkits, XML >> processing, > ... >> >> >> Alex > > I entirely second that. >

  1   2   >