Re: C Source Code Generator For Test Cases

2007-09-28 Thread Marc 'BlackJack' Rintsch
On Fri, 28 Sep 2007 12:57:49 -0700, gamename wrote: >> How about using c-types to access your C-stuff to test, and use python + the >> testcase-tables to invoke that? >> > > Sure, that's possible. But the source code for tests (once all the > parms are read) > still needs to be generated. Calli

Re: your opinion on book "Foundations of Python Network Programming"?

2007-09-28 Thread [EMAIL PROTECTED]
On Sep 28, 12:38 pm, "sean tierney" <[EMAIL PROTECTED]> wrote: > I just read it (though I bought it half a year ago...don't judge :). > > Author recommends Python 2.3 and above...and as far as I know the > examples are good. And if anything IS outdated -- you'll be able to > do some quick research

Re: python 2.5 and 3gb switch

2007-09-28 Thread neil
why? I am asking if any one knows of a 3gb python build. The code runs successfully in lesser missions it just wont run in the extra memory available when I try to run it along with my other programs in a 3gb space. thanks for your reply though -- http://mail.python.org/mailman/listinfo/pytho

Re: your opinion on book "Foundations of Python Network Programming"?

2007-09-28 Thread [EMAIL PROTECTED]
On Sep 28, 12:10 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > I have not read this book but just wanted to say, in case you don't > already know, they have Chapter 13 on FTP available as a free download > at the publisher's web site: > > http://www.apress.com/book/view/1590593715 thanks for

Re: Python and SSL

2007-09-28 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > > But how can I tell my Python program to trust my SSL certificate? > > Why do you want to tell it that? The SSL module will trust *any* > server certificate, no need to tell it explicitly which ones to > trust. Er, the whole idea of SSL is that you

Re: Re: Bug: spurious indentation error

2007-09-28 Thread Gabriel Genellina
En Sat, 29 Sep 2007 01:43:53 -0300, Mridula Ramesh <[EMAIL PROTECTED]> escribi�: > Lol, nope, I checked today too, and it happened again. Try running this > as a > script, not from the prompt - I got a SyntaxError on line 10 as expected. After correcting it, I got an `IndentationError: expect

Re: Re: Bug: spurious indentation error

2007-09-28 Thread Mridula Ramesh
Hi. Lol, nope, I checked today too, and it happened again. Try running this as a script, not from the prompt - class main(): def __init__(self): rt.geometry("680x600") rt.config(bg="CornSilk") rt.title("my miniscule app") #MENU menu = Menu(rt)

Re: Python and SSL

2007-09-28 Thread John Nagle
Heikki Toivonen wrote: > Johny wrote: >> I need to use Python with SSL comunication betweeen servers. >> (I use hhtplib but I think urllib2 can also be used ) >> I think I need to use SSL root certificate and tell a program to >> trust this certificate. > > You can't do secure SSL with the built

Re: cute use of lambda

2007-09-28 Thread Kay Schluehr
On 29 Sep., 03:55, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "Simon Forman" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > | class FakeQueue(list): > |put = list.append > |get = lambda self: self.pop(0) > > Sorry, to me this is a foolish use of lambda as it is exactly th

Re: Python 3.0 migration plans?

2007-09-28 Thread John Nagle
George Sakkis wrote: > On Sep 28, 11:53 am, John Nagle <[EMAIL PROTECTED]> wrote: > >> Alex Martelli wrote: >>> John Nagle <[EMAIL PROTECTED]> wrote: TheFlyingDutchman wrote: > It seems that Python 3 is more significant for what it removes than > what it adds. > What are the addit

How to display a videostream in the PyQt GUI by a efficient way

2007-09-28 Thread kivilaya
Hello, everyone, : ) I'm a beginner of pyqt, and recently I'm having a problem with it. I hope someone could help me. As required, I need to get a videostream from a camera, and process every frame to add some information on it, and then display the frame in a PyQt GUI. But I don't know how

Re: python 2.5 and 3gb switch

2007-09-28 Thread James Stroud
neil wrote: > Hello group, > > I have a question I hope someone knowledgeable here might assist me with :o) > > I am working on a python exporter to get a scene out of Blender and into a > renderer called Indigo. I hope you at least have heard of open source > Blender.. > The scene is very larg

Re: Can I overload the compare (cmp()) function for a Lists ([]) index function?

2007-09-28 Thread Gabriel Genellina
En Fri, 28 Sep 2007 14:36:54 -0300, xkenneth <[EMAIL PROTECTED]> escribi�: > On Sep 28, 12:30 pm, xkenneth <[EMAIL PROTECTED]> wrote: >> Looking to do something similair. I'm working with alot of timestamps >> and if they're within a couple seconds I need them to be indexed and >> removed from a l

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-09-28 Thread Damien Kick
Giorgos Keramidas wrote: > On Fri, 22 Jun 2007 23:08:02 -, [EMAIL PROTECTED] wrote: >> So much for the "free" in "free software". If you can't actually use >> it without paying money, whether for the software or for some book, it >> isn't really free, is it? > > Please do not confuse the term

using inspect on pygtk

2007-09-28 Thread Chris Pax
Hello, I recently been trying to use the inspect module to inspect the arguments of gtk objects, such as gtk.Button. I tried like this: inspect.getargspec(gtk.Button.__init__) and get the fallowing error: File "", line 1, in File "/usr/lib/python2.5/inspect.py", line 743, in getargspec

Re: cute use of lambda

2007-09-28 Thread Terry Reedy
"Simon Forman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | class FakeQueue(list): |put = list.append |get = lambda self: self.pop(0) Sorry, to me this is a foolish use of lambda as it is exactly the same as def get(self): self.pop(0) except that in the latter, the r

python 2.5 and 3gb switch

2007-09-28 Thread neil
Hello group, I have a question I hope someone knowledgeable here might assist me with :o) I am working on a python exporter to get a scene out of Blender and into a renderer called Indigo. I hope you at least have heard of open source Blender.. The scene is very large requiring me to use a 3gb

Re: Emailing the attachment created with the Quick Screenshots Script(Python + PIL)

2007-09-28 Thread Gabriel Genellina
En Fri, 28 Sep 2007 12:56:18 -0300, Mark Bratcher <[EMAIL PROTECTED]> escribi�: > The quick screenshots script works great for the project I'm working on > and > I'm trying to modify it to include emailing the JPG file it generates. I > retrieved both scripts from the Python Archives. The mo

Re: Can I overload the compare (cmp()) function for a Lists ([]) index function?

2007-09-28 Thread Hrvoje Niksic
xkenneth <[EMAIL PROTECTED]> writes: > Looking to do something similair. I'm working with alot of timestamps > and if they're within a couple seconds I need them to be indexed and > removed from a list. > Is there any possible way to index with a custom cmp() function? > > I assume it would be som

Re: Can I overload the compare (cmp()) function for a Lists ([]) index function?

2007-09-28 Thread Paul Rubin
xkenneth <[EMAIL PROTECTED]> writes: > Looking to do something similair. I'm working with alot of timestamps > and if they're within a couple seconds I need them to be indexed and > removed from a list. > Is there any possible way to index with a custom cmp() function? This sounds like you want it

Re: Can I overload the compare (cmp()) function for a Lists ([]) index function?

2007-09-28 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > On Sep 28, 8:30 pm, xkenneth <[EMAIL PROTECTED]> wrote: >> Looking to do something similair. I'm working with alot of timestamps >> and if they're within a couple seconds I need them to be indexed and >> removed from a list. >> Is there any possible way to index with a cu

Re: Numeric command-line options vs. negative-number arguments

2007-09-28 Thread Steven Bethard
Carl Banks wrote: > On Sep 28, 9:51 am, Steven Bethard <[EMAIL PROTECTED]> wrote: >> It was decided that practicality beats purity here. Arguments with >> leading hyphens which look numeric but aren't in the parser are >> interpreted as negative numbers. Arguments with leading hyphens which >> don'

Re: Bug with lists of pairs of lists and append()

2007-09-28 Thread Jason M Barnes
On 9/28/07, Gabriel Zachmann <[EMAIL PROTECTED]> wrote: > Well, > > could some kind soul please explain to me why the following trivial code is > misbehaving? > > #!/usr/bin/python > > lst = [ 0, 1, 2 ] > > s = [] > > l = [ lst[0] ] > r = lst[1:] > while r: > x = (l,r) > print x > s.app

Re: getopt with negative numbers?

2007-09-28 Thread Carl Banks
On Sep 28, 6:19 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > Steven Bethard <[EMAIL PROTECTED]> writes: > > A user shouldn't have to go out of their way to specify regular > > numbers on the command line, regardless of whether they're positive > > or negative. > > A user shouldn't have to go out of

Re: Numeric command-line options vs. negative-number arguments

2007-09-28 Thread Carl Banks
On Sep 28, 9:51 am, Steven Bethard <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > > Steven Bethard <[EMAIL PROTECTED]> writes: > >> Argparse knows what your option flags look like, so if you specify > >> one, it knows it's an option. Argparse will only interpret it as a > >> negative number if y

Re: Bug with lists of pairs of lists and append()

2007-09-28 Thread Paul Hankin
On Sep 28, 11:25 pm, Gabriel Zachmann <[EMAIL PROTECTED] clausthal.de> wrote: > could some kind soul please explain to me why the following trivial code is > misbehaving? > > lst = [ 0, 1, 2 ] > s = [] > l = [ lst[0] ] > r = lst[1:] > while r: > x = (l,r) > print x > s.append( x ) >

Re: Python 3.0 migration plans?

2007-09-28 Thread Richard Jones
John Nagle wrote: > Insofar as Python has an organization, it's not adequately managing > extension modules. Each extension module has its own infrastructure, > with its own build procedures, its own bug list, and its own maintainers. > There's not even an archive. Unlike CPAN, Cheese Shop i

ANN: PyQt v4.3.1 Released

2007-09-28 Thread Phil Thompson
Riverbank Computing is pleased to announce the release of PyQt v4.3.1 available from http://www.riverbankcomputing.co.uk/pyqt/. This is mainly a bug fix release. A Windows installer is provided for the GPL version of PyQt which contains everything needed for PyQt development (including Qt, Qt D

Re: your opinion on book "Foundations of Python Network Programming"?

2007-09-28 Thread sean tierney
I just read it (though I bought it half a year ago...don't judge :). Author recommends Python 2.3 and above...and as far as I know the examples are good. And if anything IS outdated -- you'll be able to do some quick research to get you to where you need to be...and he does mention code several a

Re: marshal bug?

2007-09-28 Thread Martin v. Löwis
> [1] http://coverage.livinglogic.de/Python/marshal.c.html. (Actually, I > checked the downloaded bz2, but this is the only URL for marshal.c I > could find) A better URL is http://svn.python.org/projects/python/trunk/Python/marshal.c or http://svn.python.org/view/python/trunk/Python/marshal.c

Bug with lists of pairs of lists and append()

2007-09-28 Thread Gabriel Zachmann
Well, could some kind soul please explain to me why the following trivial code is misbehaving? #!/usr/bin/python lst = [ 0, 1, 2 ] s = [] l = [ lst[0] ] r = lst[1:] while r: x = (l,r) print x s.append( x ) l.append( r.pop(0) ) print s The output I get is: ([0], [1, 2]) ([

Re: Python and SSL

2007-09-28 Thread Martin v. Löwis
> I heard that python 2.6 will include full "server-side SSL > support" (whatever this means). > Is it true? Yes, that's true. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-09-28 Thread Martin v. Löwis
> I need to use Python with SSL comunication betweeen servers. > (I use hhtplib but I think urllib2 can also be used ) > I think I need to use SSL root certificate and tell a program to > trust this certificate. I don't think so - what the SSL module does is already fine for you. > But how can

Re: Checking for the existence of Duplicates

2007-09-28 Thread Paul Hankin
On Sep 28, 10:27 pm, AndyB <[EMAIL PROTECTED]> wrote: > ... > This is in a program that generates random numbers to do a brute force > solve on a sudoku-like puzzle. Once a certain level of difficulty in > the puzzle is reached, performance goes off a cliff because the > duplicate checking code, a

Re: getopt with negative numbers?

2007-09-28 Thread Ben Finney
Steven Bethard <[EMAIL PROTECTED]> writes: > A user shouldn't have to go out of their way to specify regular > numbers on the command line, regardless of whether they're positive > or negative. A user shouldn't have to go out of their way to know whether what they type on a command line will be t

Re: Python 3.0 migration plans?

2007-09-28 Thread Steve Holden
Kay Schluehr wrote: > On 28 Sep., 17:53, John Nagle <[EMAIL PROTECTED]> wrote: >> Alex Martelli wrote: >>> John Nagle <[EMAIL PROTECTED]> wrote: TheFlyingDutchman wrote: > It seems that Python 3 is more significant for what it removes than > what it adds. > What are the additions t

Re: your opinion on book "Foundations of Python Network Programming"?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 2:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > i'm debating if i should buy this book. it received good reviews at > Amazon:http://tinyurl.com/24zvrf. but it was published in 2004 and > i'm afraid quite some materials might be outdated? any input? > > thanks, > > ke

Re: ANNOUNCE: wxPython 2.8.6.0

2007-09-28 Thread Don Dwiggins
Robin Dunn wrote: > Announcing > -- > > The 2.8.6.0 release of wxPython is now available for download at > http://wxpython.org/download.php. This release is mostly about fixing > a number of bugs and inconsistencies in wxWidgets and wxPython. This raises a policy question for me. I'm cu

your opinion on book "Foundations of Python Network Programming"?

2007-09-28 Thread [EMAIL PROTECTED]
Hello, i'm debating if i should buy this book. it received good reviews at Amazon: http://tinyurl.com/24zvrf. but it was published in 2004 and i'm afraid quite some materials might be outdated? any input? thanks, kelie -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI for viewing/editing python data structures?

2007-09-28 Thread Joshua J. Kugler
On Thursday 27 September 2007 20:20, Paddy wrote: > On Sep 26, 11:23 pm, "Joshua J. Kugler" <[EMAIL PROTECTED]> wrote: >> A while back, I seem to remember coming across a small program that could >> view and edit python data structures via a nice expanding tree view. I'm >> now in need of somethi

Re: Python 3.0 migration plans?

2007-09-28 Thread Erik Jones
On Sep 28, 2007, at 3:00 PM, TheFlyingDutchman wrote: > On Sep 28, 12:45 pm, George Sakkis <[EMAIL PROTECTED]> wrote: >> On Sep 28, 3:29 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: >> >>> One issue I have with this group and that I encountered many >>> years ago >>> in the Perl group is th

Reentrancy of Python interpreter

2007-09-28 Thread Brad Johnson
I have embedded a single threaded instance of the Python interpreter in my application. I have a place where I execute a Python command that calls into C++ code which then in turn calls back into Python using the same interpreter. I get a fatal error which is "PyThreadStage_Get: no current thread.

Checking for the existence of Duplicates

2007-09-28 Thread AndyB
I have found a lot of material on removing duplicates from a list, but I am trying to find the most efficient way to just check for the existence of duplicates in a list. Here is the best I have come up with so far: CheckList = [x[ValIndex] for x in self.__XRList[z]]

Re: List search

2007-09-28 Thread Kevin Walzer
Robert Kern wrote: > line == 'x11' > D'oh! That was simple, wasn't it? *smacks head* That did the trick. Thanks! -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-09-28 Thread Giampaolo Rodolà
I heard that python 2.6 will include full "server-side SSL support" (whatever this means). Is it true? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-09-28 Thread Heikki Toivonen
Johny wrote: > I need to use Python with SSL comunication betweeen servers. > (I use hhtplib but I think urllib2 can also be used ) > I think I need to use SSL root certificate and tell a program to > trust this certificate. You can't do secure SSL with the builtin SSL support, you need to use a

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 1:09 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > That's because the tutor list doesn't offer a newsgroup. He was probably > just trying to get rid of you. > > Now at 98.75% ... Not sure if that's the reading on your trollmeter or on the meter that measures what percentage of your pos

Re: List search

2007-09-28 Thread Tim Williams
On 28/09/2007, Kevin Walzer <[EMAIL PROTECTED]> wrote: > I'm having a problem with searching a list. Here's my code: > > mylist = ['x11', 'x11-wm', 'x11-system'] > > for line in mylist: >if 'x11' in line: >print line > > This results in the following output: > > x11 > x11-wm

Re: List search

2007-09-28 Thread Robert Kern
Kevin Walzer wrote: > I'm having a problem with searching a list. Here's my code: > > mylist = ['x11', 'x11-wm', 'x11-system'] > > for line in mylist: > if 'x11' in line: > print line > > This results in the following output: > > x11 > x11-wm > x11-system > > I'm looking to

Re: Python 3.0 migration plans?

2007-09-28 Thread Colin J. Williams
TheFlyingDutchman wrote: >> Or bind resources of these pocket protectors that otherwise would lead to >> answers for people that do seek enlightment... > > I don't think it would be correct to characterize my posts as not > seeking enlightenment. I do also happen to voice my opinion which > seems

Re: Python 3.0 migration plans?

2007-09-28 Thread Kay Schluehr
On 28 Sep., 17:53, John Nagle <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > John Nagle <[EMAIL PROTECTED]> wrote: > > >> TheFlyingDutchman wrote: > >>> It seems that Python 3 is more significant for what it removes than > >>> what it adds. > > >>> What are the additions that people find the

Re: List search

2007-09-28 Thread Stefan Bellon
On Fri, 28 Sep, Kevin Walzer wrote: > I'm having a problem with searching a list. Here's my code: > > mylist = ['x11', 'x11-wm', 'x11-system'] > > for line in mylist: > if 'x11' in line: > print line Just compare for equality: if line == 'x11': or print "\n".join(x

Re: Python 3.0 migration plans?

2007-09-28 Thread Colin J. Williams
Steve Holden wrote: > TheFlyingDutchman wrote: >> On Sep 28, 10:01 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >>> On Fri, 28 Sep 2007 09:42:49 -0700, TheFlyingDutchman wrote: Which of the common languages have higher order functions and what is the syntax? >>> C, C++, Pascal,

List search

2007-09-28 Thread Kevin Walzer
I'm having a problem with searching a list. Here's my code: mylist = ['x11', 'x11-wm', 'x11-system'] for line in mylist: if 'x11' in line: print line This results in the following output: x11 x11-wm x11-system I'm looking to return the list item that just has 'x11'. Ho

RE: OCBC connection

2007-09-28 Thread Sugrue, Sean
I want to connect on the windows side to a solaris server which has a postgres database installed. I can connect to the postgres database using the postgres odbc connection but I'm using excel. I'd rather use python because it ports easily over to solaris. I will install psycopg2 and try the code

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 12:34 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > TheFlyingDutchman wrote: > > >> Or bind resources of these pocket protectors that otherwise would lead to > >> answers for people that do seek enlightment... > > > I don't think it would be correct to characterize my posts as not

Re: Python 3.0 migration plans?

2007-09-28 Thread Carsten Haese
On Fri, 2007-09-28 at 13:00 -0700, TheFlyingDutchman wrote: > Being in a land where every nit can be picked, I am surprised that you > offered up a mailing list when I was asking for a newsgroup. nntp://news.gmane.org/gmane.comp.python.tutor -- Carsten Haese http://informixdb.sourceforge.net -

Re: Python 3.0 migration plans?

2007-09-28 Thread Steve Holden
TheFlyingDutchman wrote: > On Sep 28, 12:45 pm, George Sakkis <[EMAIL PROTECTED]> wrote: >> On Sep 28, 3:29 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: >> >>> One issue I have with this group and that I encountered many years ago >>> in the Perl group is that there is no separate group >>> com

Re: Python 3.0 migration plans?

2007-09-28 Thread George Sakkis
On Sep 28, 11:53 am, John Nagle <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > John Nagle <[EMAIL PROTECTED]> wrote: > > >> TheFlyingDutchman wrote: > >>> It seems that Python 3 is more significant for what it removes than > >>> what it adds. > > >>> What are the additions that people find

Re: OCBC connection

2007-09-28 Thread Steve Holden
[EMAIL PROTECTED] wrote: [...] >> >> >>> curs = conn.cursor() >> >>> import psycopg2 as db >> >>> conn = db.connect(database="pycon", user="username", >> password="password", host="localhost", port=5432) >> >>> curs = conn.cursor() >> >>> curs.execute("SELECT orgid, orgname FROM organ

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 12:45 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Sep 28, 3:29 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > > > One issue I have with this group and that I encountered many years ago > > in the Perl group is that there is no separate group > > comp.lang.python.beginner where

Re: C Source Code Generator For Test Cases

2007-09-28 Thread gamename
> > How about using c-types to access your C-stuff to test, and use python + the > testcase-tables to invoke that? > Sure, that's possible. But the source code for tests (once all the parms are read) still needs to be generated. Calling the lib from python or from C, there still needs to be a wa

Re: Bug with lists of pairs of lists and append()

2007-09-28 Thread TeroV
Gabriel Zachmann wrote: > Well, > > could some kind soul please explain to me why the following trivial code > is misbehaving? > > > #!/usr/bin/python > s = [] > l = [ 0 ] > r = [0, 0] > while r: > x = (l,r) > print x > s.append( x ) > l.append( r.pop(0) ) > print s > > > > T

Re: Python 3.0 migration plans?

2007-09-28 Thread Steve Holden
George Sakkis wrote: > On Sep 28, 3:29 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > >> One issue I have with this group and that I encountered many years ago >> in the Perl group is that there is no separate group >> comp.lang.python.beginner where you can ask questions without getting >> hi

Re: OCBC connection

2007-09-28 Thread kyosohma
On Sep 28, 1:07 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Sep 28, 9:57 am, "Sugrue, Sean" <[EMAIL PROTECTED]> wrote: > >> I'm trying to make an odbc connection to postgresql which is on a server > >> using python. > >> Does anyone have a code snippet to make a ba

Re: Python 3.0 migration plans?

2007-09-28 Thread George Sakkis
On Sep 28, 3:29 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > One issue I have with this group and that I encountered many years ago > in the Perl group is that there is no separate group > comp.lang.python.beginner where you can ask questions without getting > hit with RTFM! and the like. W

Re: GUI for viewing/editing python data structures?

2007-09-28 Thread Joshua J. Kugler
On Thursday 27 September 2007 22:40, David wrote: > On 9/27/07, Joshua J. Kugler <[EMAIL PROTECTED]> wrote: >> A while back, I seem to remember coming across a small program that could >> view and edit python data structures via a nice expanding tree view. I'm >> now in need of something like tha

Re: Python 3.0 migration plans?

2007-09-28 Thread Diez B. Roggisch
TheFlyingDutchman wrote: > >> >> Or bind resources of these pocket protectors that otherwise would lead to >> answers for people that do seek enlightment... > > I don't think it would be correct to characterize my posts as not > seeking enlightenment. I do also happen to voice my opinion which >

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
> > Or bind resources of these pocket protectors that otherwise would lead to > answers for people that do seek enlightment... I don't think it would be correct to characterize my posts as not seeking enlightenment. I do also happen to voice my opinion which seems appropriate since this can be ch

Re: Python 3.0 migration plans?

2007-09-28 Thread Steve Holden
TheFlyingDutchman wrote: > On Sep 28, 11:16 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> On Fri, 28 Sep 2007 11:04:39 -0700, TheFlyingDutchman <[EMAIL PROTECTED]> >> wrote: >>> [snip] >>> In this case I asked it as part of the original question and it was >>> ignored. I have programmed in

Re: Python 3.0 migration plans?

2007-09-28 Thread Diez B. Roggisch
TheFlyingDutchman wrote: > On Sep 28, 11:16 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> On Fri, 28 Sep 2007 11:04:39 -0700, TheFlyingDutchman <[EMAIL PROTECTED]> >> wrote: >> > [snip] >> >> >In this case I asked it as part of the original question and it was >> >ignored. I have programme

Re: C Source Code Generator For Test Cases

2007-09-28 Thread Diez B. Roggisch
gamename wrote: > Hi, > > Can anyone recommend a good method of using python to generate c > source code? I have tables of test cases to use as input to a > process which would generate the test's source code. The Cheetah tool > looks interesting. Has anyone used it? Any other suggestions? H

Bug with lists of pairs of lists and append()

2007-09-28 Thread Gabriel Zachmann
Well, could some kind soul please explain to me why the following trivial code is misbehaving? #!/usr/bin/python s = [] l = [ 0 ] r = [0, 0] while r: x = (l,r) print x s.append( x ) l.append( r.pop(0) ) print s The output I get is: ([0], [0, 0]) ([0, 0], [0])

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 11:16 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Fri, 28 Sep 2007 11:04:39 -0700, TheFlyingDutchman <[EMAIL PROTECTED]> > wrote: > > [snip] > > >In this case I asked it as part of the original question and it was > >ignored. I have programmed in C and C++ and a little Pasca

Re: OCBC connection

2007-09-28 Thread M.-A. Lemburg
On 2007-09-28 20:07, Steve Holden wrote: > [EMAIL PROTECTED] wrote: >> On Sep 28, 9:57 am, "Sugrue, Sean" <[EMAIL PROTECTED]> wrote: >>> I'm trying to make an odbc connection to postgresql which is on a server >>> using python. >>> Does anyone have a code snippet to make a basic connection with a s

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 11:21 am, "Francesco Guerrieri" <[EMAIL PROTECTED]> wrote: > On 9/28/07, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > > > On Sep 28, 10:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > > This is like listening to a four-year-old torment its parents with > > > incessant questions. Do

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 11:16 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Fri, 28 Sep 2007 11:04:39 -0700, TheFlyingDutchman <[EMAIL PROTECTED]> > wrote: > > [snip] > > >In this case I asked it as part of the original question and it was > >ignored. I have programmed in C and C++ and a little Pasca

Re: Python 3.0 migration plans?

2007-09-28 Thread Francesco Guerrieri
On 9/28/07, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > On Sep 28, 10:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > This is like listening to a four-year-old torment its parents with > > incessant questions. Do you *have* to ask every question that pops into > > your mind? > > > > In this c

Re: Python 3.0 migration plans?

2007-09-28 Thread Paul Rubin
TheFlyingDutchman <[EMAIL PROTECTED]> writes: > What is the syntax of a higher order function in C, C++ and Pascal? void qsort(int *array, int length, int width, int (*compare)()); is a C library example. I think we'd describe qsort as a HOF since one of its arguments (the comparison routine)

Re: [Zope] how do I test for the current item in an iteration

2007-09-28 Thread Dieter Maurer
kamal hamzat wrote at 2007-9-28 16:36 +0100: >I have this error after i added the if statement > >Error Type: TypeError >Error Value: mybrains.__cmp__(x,y) requires y to be a 'mybrains', not a 'int' > > >for i in context.zCatNewsCurrent(): > if i <= 5: >print "%s: %s: %s" % (i.id, i.a

Re: Python 3.0 migration plans?

2007-09-28 Thread Jean-Paul Calderone
On Fri, 28 Sep 2007 11:04:39 -0700, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > [snip] > >In this case I asked it as part of the original question and it was >ignored. I have programmed in C and C++ and a little Pascal many years >ago. I don't remember anything about Higher Order Functions and w

Re: Can I overload the compare (cmp()) function for a Lists ([]) index function?

2007-09-28 Thread irstas
On Sep 28, 8:30 pm, xkenneth <[EMAIL PROTECTED]> wrote: > Looking to do something similair. I'm working with alot of timestamps > and if they're within a couple seconds I need them to be indexed and > removed from a list. > Is there any possible way to index with a custom cmp() function? > > I assu

Re: OCBC connection

2007-09-28 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Sep 28, 9:57 am, "Sugrue, Sean" <[EMAIL PROTECTED]> wrote: >> I'm trying to make an odbc connection to postgresql which is on a server >> using python. >> Does anyone have a code snippet to make a basic connection with a select >> query? >> >> Sean > > Sean, > > This

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 10:57 am, Steve Holden <[EMAIL PROTECTED]> wrote: > TheFlyingDutchman wrote: > > On Sep 28, 10:01 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >> On Fri, 28 Sep 2007 09:42:49 -0700, TheFlyingDutchman wrote: > >>> Which of the common languages have higher order functions and

Re: Python 3.0 migration plans?

2007-09-28 Thread Steve Holden
TheFlyingDutchman wrote: > On Sep 28, 10:01 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Fri, 28 Sep 2007 09:42:49 -0700, TheFlyingDutchman wrote: >>> Which of the common languages have higher order functions and what is >>> the syntax? >> C, C++, Pascal, Perl, PHP, Ruby have them.

C Source Code Generator For Test Cases

2007-09-28 Thread gamename
Hi, Can anyone recommend a good method of using python to generate c source code? I have tables of test cases to use as input to a process which would generate the test's source code. The Cheetah tool looks interesting. Has anyone used it? Any other suggestions? TIA, -T -- http://mail.pytho

Re: getopt with negative numbers?

2007-09-28 Thread Steven Bethard
Casey wrote: > Ben Finney wrote: >> I believe they shouldn't because the established interface is that a >> hyphen always introduced an option unless (for those programs that >> support it) a '--' option is used, as discussed. > > Not "THE" established interface; "AN" established interface. There

Re: Can I overload the compare (cmp()) function for a Lists ([]) index function?

2007-09-28 Thread xkenneth
On Sep 28, 12:30 pm, xkenneth <[EMAIL PROTECTED]> wrote: > Looking to do something similair. I'm working with alot of timestamps > and if they're within a couple seconds I need them to be indexed and > removed from a list. > Is there any possible way to index with a custom cmp() function? > > I ass

Re: FW: OCBC connection

2007-09-28 Thread M.-A. Lemburg
On 2007-09-28 19:22, Sugrue, Sean wrote: > Is this the right email list to be on for asking rather elementary > python questions? > If not do you have a suggestion It's the right place, indeed :-) Here's an example using mxODBC: # mxODBC is available from http://www.egenix.com/products/python/mx

Can I overload the compare (cmp()) function for a Lists ([]) index function?

2007-09-28 Thread xkenneth
Looking to do something similair. I'm working with alot of timestamps and if they're within a couple seconds I need them to be indexed and removed from a list. Is there any possible way to index with a custom cmp() function? I assume it would be something like... list.index(something,mycmp) Than

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 10:01 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 28 Sep 2007 09:42:49 -0700, TheFlyingDutchman wrote: > > Which of the common languages have higher order functions and what is > > the syntax? > > C, C++, Pascal, Perl, PHP, Ruby have them. And of course the functio

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
On Sep 28, 9:30 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > You said it was a most basic language feature. I still haven't heard > > anything that leads me to believe that statement is correct. What > > languages implemented decorators as a most basic language feature? > > I was talking a

Re: OCBC connection

2007-09-28 Thread kyosohma
On Sep 28, 9:57 am, "Sugrue, Sean" <[EMAIL PROTECTED]> wrote: > I'm trying to make an odbc connection to postgresql which is on a server > using python. > Does anyone have a code snippet to make a basic connection with a select > query? > > Sean Sean, This appears to be what you're looking for:

FW: OCBC connection

2007-09-28 Thread Sugrue, Sean
Is this the right email list to be on for asking rather elementary python questions? If not do you have a suggestion Sean -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sugrue, Sean Sent: Friday, September 28, 2007 10:58 AM To: python-list@python.org Su

Re: getopt with negative numbers?

2007-09-28 Thread Casey
On Sep 27, 10:47 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > I believe they shouldn't because the established interface is that a > hyphen always introduced an option unless (for those programs that > support it) a '--' option is used, as discussed. Not "THE" established interface; "AN" established

Re: Python 3.0 migration plans?

2007-09-28 Thread Marc 'BlackJack' Rintsch
On Fri, 28 Sep 2007 09:42:49 -0700, TheFlyingDutchman wrote: > Which of the common languages have higher order functions and what is > the syntax? C, C++, Pascal, Perl, PHP, Ruby have them. And of course the functional languages, most notably Lisp and Scheme as you asked for common languages. D

Re: Python 3.0 migration plans?

2007-09-28 Thread Diez B. Roggisch
Paul Rubin wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: >> All serious languages are turing-complete. So can we put away with this >> non-sense argument right away, please? > > Actually the so called "total" languages aren't Turing-complete. I > think Coq is an example: every Coq func

Re: Python 3.0 migration plans?

2007-09-28 Thread TheFlyingDutchman
> > Decorators are syntax sugar for higher order functions. Higher order > functions are a both a basic and a fundamental language feature, and > exist in many languages. The fact that you don't know this just > proves, once again, that you like to talk more than you like to learn. Which of the co

Re: Python 3.0 migration plans?

2007-09-28 Thread Diez B. Roggisch
> You said it was a most basic language feature. I still haven't heard > anything that leads me to believe that statement is correct. What > languages implemented decorators as a most basic language feature? I was talking about Python, the programming language that is discussed in this NG. > Pyt

Re: Python 3.0 migration plans?

2007-09-28 Thread Chris Mellon
On 9/28/07, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > On Sep 28, 2:49 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > TheFlyingDutchman wrote: > > > > All serious languages are turing-complete. So can we put away with this > > non-sense argument right away, please? > > You said it was a

  1   2   >