ANN: PROBE 1.0

2007-09-01 Thread greg
I have released an updated version of my PyWeek4 game competition entry, PROBE. In PROBE, you get to plan and execute space probe missions to other planets, using a fairly realistic (except for a couple of things) simulation of the physics involved. This version has been greatly expanded, and

Announce: Pallavi 0.5 Text Editor

2007-09-01 Thread buchuki
Hey all, I've just released version 0.5 of a text editor I've been quietly developing off and on for two years: Pallavi 0.5. It utilizes Python (of course) and the wxPython toolkit. This text editor differs from most in that it is designed from the ground up to be as customizable as possible. It

PyCon 2008 - Call for Tutorial Topics

2007-09-01 Thread Greg Lindstrom
Hello All, We are still soliciting ideas for tutorials to put on at PyCon in Chicago next spring. PyCon is all about our community; under the direction of the PSF, planned, organized and run by volunteers just like you. We are asking for topics that you want to see covered on the tutorial day

Re: HowTo Use Cython on a Windows XP Box?

2007-09-01 Thread David Bolen
David Lees [EMAIL PROTECTED] writes: Yes, you are correct in understanding my question. I thought my post was clear, but I guess not. I will go try the pyrex list. You might also try looking for references to distutils support for non-MS compilers, since Pyrex (and presumably Cython) uses

Re: HowTo Use Cython on a Windows XP Box?

2007-09-01 Thread Paul McGuire
On Sep 1, 12:13 am, John Machin [EMAIL PROTECTED] wrote: On Sep 1, 1:40 pm, Paul McGuire [EMAIL PROTECTED] wrote: On Aug 31, 9:06 pm, David Lees [EMAIL PROTECTED] wrote: August 31, 2007 I just downloaded the current Cython release and have no problem running the cpython.py

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Carl Banks
On Fri, 31 Aug 2007 22:18:09 -0300, Jorge Godoy wrote: Russ wrote: Alex, I think you are missing the point. Yes, I'm sure that web searches are critical to Google's mission and commercial success. But the point is that a few subtle bugs cannot destroy Google. If your search engines and

Re: list index()

2007-09-01 Thread Hendrik van Rooyen
Erik Max Francis ma...e.com wrote: Hendrik van Rooyen wrote: weird this - maybe a native English speaker can comment - when I pronounce what fishermen do - it rhymes with roll, but when I am talking about the thing that lives under bridges and munches goats, the O sound is shorter,

Re: How to find out if the interpreter is a debug build?

2007-09-01 Thread Martin v. Löwis
llothar schrieb: How can i find out if a selected python interpreter (i only know the path name under which i should start it) is a debug build? I tried sys.api_version, sys.platform, sys.version, sys.version_info and there is no difference between python.exe and python_d.exe. Sure

Re: list index()

2007-09-01 Thread Steve Holden
Dennis Lee Bieber wrote: On Fri, 31 Aug 2007 21:15:10 +0100, DaveM [EMAIL PROTECTED] declaimed the following in comp.lang.python: No - but I would pronounce lever and fever the same way, if that helps. shudder To me, those are different... I suppose you also add an extra i to

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Paul Rubin
Russ [EMAIL PROTECTED] writes: The idea here is that errors in the self-testing code are unlikely to be correlated with errors in the primary code. Hence, you get a sort of multiplying effect on reliability. For example, if the chance of error in the primary code and the self-test code are

Re: list index()

2007-09-01 Thread Hendrik van Rooyen
Paddy pado.mail.com wrote: I say the 'oll' in troll like the 'ol' in frolic, and pronounce roll and role similarly. My accent is probably from the East Midlands of the UK, but is not pronounced. Same here - when the Troll lives under a bridge - I could not think of something to rhyme

Re: So what exactly is a complex number?

2007-09-01 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Roy Smith wrote: In article [EMAIL PROTECTED], Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: In message [EMAIL PROTECTED], Wildemar Wildenburger wrote: Tim Daneliuk wrote: One of the most common uses for Complex Numbers is in what are called vectors.

Re: Automation and scheduling of FrontPage publishing using Python

2007-09-01 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Steve Holden wrote: Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: We have numerous web sites which are currently being manually published via Front Page. Doing one or two sites on an ad-hoc basis was not too bad but we

Re: How to find parent function/class of generators?

2007-09-01 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], J. A. Aczel wrote: Unfortunately, generator objects don't seem to include any information about the parent object or function that created them. So add your own. -- http://mail.python.org/mailman/listinfo/python-list

Re: list index() (OT)

2007-09-01 Thread Hendrik van Rooyen
Richie Hindle richi...ian.com wrote: But - the word for someone who posts to the internet with the intention of stirring up trouble derives from the word for what fishermen do, not from the word for something that lives under a bridge. It derives from trolling for suckers or trolling for

Re: simple spider in python

2007-09-01 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Michael Bentley wrote: First thing to know is that google doesn't like the User-agent header urllib2 uses by default -- you'll have to masquerade as a browser (google throws a 403 error if you connect as 'User-Agent: Python- urllib/2.5': look into

Re: ANN: SCF released GPL

2007-09-01 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Paul Rubin wrote: hg [EMAIL PROTECTED] writes: I am looking for a free subversion server resource to put the code ... if you know of any. Does it have to be SVN? I think Savannah and Sourceforge both still use CVS. Why would you want to use CVS rather than

Re: Automation and scheduling of FrontPage publishing using Python

2007-09-01 Thread Steve Holden
Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Steve Holden wrote: Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: We have numerous web sites which are currently being manually published via Front Page. Doing one or two sites on an ad-hoc

Re: ANN: SCF released GPL

2007-09-01 Thread Paul Rubin
Lawrence D'Oliveiro [EMAIL PROTECTED] writes: Does it have to be SVN? I think Savannah and Sourceforge both still use CVS. Why would you want to use CVS rather than Subversion? Those sites have been around since before SVN. CVS was what was available, so they used it. Using CVS for

Re: list index() (OT)

2007-09-01 Thread Steve Holden
Hendrik van Rooyen wrote: Richie Hindle richi...ian.com wrote: But - the word for someone who posts to the internet with the intention of stirring up trouble derives from the word for what fishermen do, not from the word for something that lives under a bridge. It derives from trolling for

Re: Python Unicode to String conversion

2007-09-01 Thread iapain
First make sure your DB encoding is UTF-8 not the latin1 The error I keep having is something like this: ERREUR: Séquence d'octets invalide pour le codage «UTF8» : 0xe02063 then try this: def smart_str(s, encoding='utf-8', errors='strict'): Returns a bytestring version of 's',

Way off topic

2007-09-01 Thread Paddy
On Sep 1, 7:40 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Paddy pado.mail.com wrote: I say the 'oll' in troll like the 'ol' in frolic, and pronounce roll and role similarly. Same here - when the Troll lives under a bridge - I could not think of something to rhyme with it - frolic

Re: Automation and scheduling of FrontPage publishing using Python

2007-09-01 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Steve Holden wrote: Lawrence D'Oliveiro wrote: If they were using FrontPage extensions, they deserve everything they get. While possibly justifiable, given that FrontPage has had holes you could drive a London double-decker but through since time immemorial,

Re: list index()

2007-09-01 Thread Ben Finney
Dennis Lee Bieber [EMAIL PROTECTED] writes: I suppose you also add an extra i to aluminum G We're not out to rewrite the table of elements. There's no such thing as aluminum, and aluminium always has just the two is. -- \ Rightful liberty is unobstructed action, according to our |

Re: list index() (OT)

2007-09-01 Thread Paddy
On Sep 1, 7:57 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Richie Hindle richi...ian.com wrote: But - the word for someone who posts to the internet with the intention of stirring up trouble derives from the word for what fishermen do, not from the word for something that lives under a

Re: list index() (OT) and definitely trolling :-)

2007-09-01 Thread Paddy
On Sep 1, 7:32 am, Steve Holden [EMAIL PROTECTED] wrote: Dennis Lee Bieber wrote: On Fri, 31 Aug 2007 21:15:10 +0100, DaveM [EMAIL PROTECTED] declaimed the following in comp.lang.python: No - but I would pronounce lever and fever the same way, if that helps. shudder To me, those are

Re: advice about `correct' use of decorator

2007-09-01 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Gerardo Herzig wrote: @is_logued_in def change_pass(): bla bla And so on for all the other functions who needs that the user is still loged in. My suspicion is that most of the methods in your session object (with the obvious exception of the login

Re: list index()

2007-09-01 Thread Steven D'Aprano
On Sat, 01 Sep 2007 17:23:04 +1000, Ben Finney wrote: Dennis Lee Bieber [EMAIL PROTECTED] writes: I suppose you also add an extra i to aluminum G We're not out to rewrite the table of elements. There's no such thing as aluminum, and aluminium always has just the two is. Although

Re: Let's Unite Against Jews and Mongrels!

2007-09-01 Thread Hendrik van Rooyen
Wildemar Wildenburger lasstwieso.net wrote: Barry OGrady wrote: He has some wrong ideas. The blacks are victims of the jews as well. And Jews are the victims of Christians. And Christians are the victims of Muslims. Anybody not a victim of anyone else, please raise your hand!

Re: list index()

2007-09-01 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: Paddy wrote: My accent is probably from the East Midlands of the UK, but is not pronounced. If your accent isn't pronounced how do we know what it sounds like? When he says pronounced, he doesn't mean pronounced, he means pronounced! - To

Re: Is there a simple way to exit a while loop on keystroke?

2007-09-01 Thread Hendrik van Rooyen
gsxg [EMAIL PROTECTED] wrote: I am new to python, and have written a simple program to read a port via telnet. I would like it to run until any key is pressed. Of course I wouldn't mind requiring a specific keystroke in the future, but I would think this is simpler for now. I have used

Re: Non-Blocking IO

2007-09-01 Thread Hendrik van Rooyen
mp mailil.com wrote: Calling try3() yields the error: File ./test.py, line 54, in try3 print os.read(fout.fileno(),256) OSError: [Errno 35] Resource temporarily unavailable This means there is no data available- its actually working! - Hendrik --

How does super() work?

2007-09-01 Thread Lamonte Harris
I've searched Google, and other search engines to try to find out how super() works. Can someone explain in short detail how super() works? I may and may not need to know this information, but it is good to know. -- http://mail.python.org/mailman/listinfo/python-list

Re: Important Research Project

2007-09-01 Thread Tim Couper
a. If you had no response from a mailing, it probably means you have no takers. b. The fact that you send a request about a perl development to a python mailing list raises concerns about your understanding of the nature of this interest group c. The technology you are trying to develop seems

Re: list index() (OT)

2007-09-01 Thread Hendrik van Rooyen
Steve Holden s...web.com wrote: Where's Godwin's Law when yo need it? Hitler would not have spellt you like that... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Hendrik van Rooyen
Carl Banks pavlmail.com wrote: This is starting to sound silly, people. Critical is a relative term, and one project's critical may be anothers mundane. Sure a flaw in your flagship product is a critical problem *for your company*, but are you really trying to say that the

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Marc 'BlackJack' Rintsch
On Sat, 01 Sep 2007 10:34:08 +0200, Hendrik van Rooyen wrote: Carl Banks pavlmail.com wrote: This is starting to sound silly, people. Critical is a relative term, and one project's critical may be anothers mundane. Sure a flaw in your flagship product is a critical problem *for your

Re: So what exactly is a complex number?

2007-09-01 Thread Wildemar Wildenburger
Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Wildemar Wildenburger wrote: Tim Daneliuk wrote: One of the most common uses for Complex Numbers is in what are called vectors. In a vector, you have both an amount and a *direction*. For example, I can say, I threw 23 apples in

Re: So what exactly is a complex number?

2007-09-01 Thread Tim Couper
.. FWIW the fundamental difference in using complex number to represent purely vector information is that the algebra of complex numbers is such that the product of two of the imaginary components has a result in the real range (and a product of a real and imaginary components is in the

Re: How to find out if the interpreter is a debug build?

2007-09-01 Thread llothar
On 1 Sep., 10:37, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], llothar wrote: How can i find out if a selected python interpreter (i only know the path name under which i should start it) is a debug build? What's the difference in

Re: How to find out if the interpreter is a debug build?

2007-09-01 Thread llothar
On 1 Sep., 13:25, Martin v. Löwis [EMAIL PROTECTED] wrote: If you want it cross-platform, you can check whether sys.getobjects is available. That, of course, is also unsafe because there isn't a single debug build on Unix, but instead, several debugging features can be enabled and disabled

Re: So what exactly is a complex number?

2007-09-01 Thread Grzegorz Słodkowicz
Here is a simple explanation (and it is not complete by a long shot). A number by itself is called a scalar. For example, when I say, I have 23 apples, the 23 is a scalar that just represents an amount in this case. One of the most common uses for Complex Numbers is in what are called

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread llothar
On 29 Aug., 13:45, Russ [EMAIL PROTECTED] wrote: I have not yet personally used it, but I am interested in anything that can help to make my programs more reliable. If you are programming something that doesn't really need to be correct, than you probably don't need it. But if you really need

Re: Co-developers wanted: document markup language

2007-09-01 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Paul Rubin wrote: TeX/LateX have been around forever and are well established standards, as awful as they are. Why do we want ANOTHER markup language? We need fewer, not more. Because time marches on, and the deficiencies of the old way of doing things become

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Bryan Olson
Steve Holden wrote: [...] If I can blow my own trumpet briefly, two customers (each using over 25 kLOC I have delivered over the years) ran for two years while I was away in the UK without having to make a single support call. One of the systems was actually locked in a cupboard all that

Re: So what exactly is a complex number?

2007-09-01 Thread Tim Couper
... I'd hazard a guess you were educated in the USA where doing without understanding has been mastered by teachers and students alike. You're explanation ... Grzegorz I think that this is unnecessarily offensive both to the poster and to the many teachers and students of quality in the USA.

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Jorge Godoy
Carl Banks wrote: This is starting to sound silly, people. Critical is a relative term, and one project's critical may be anothers mundane. Sure a flaw in your flagship product is a critical problem *for your company*, but are you really trying to say that the criticalness of a bad web

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Steve Holden
Bryan Olson wrote: Steve Holden wrote: [...] If I can blow my own trumpet briefly, two customers (each using over 25 kLOC I have delivered over the years) ran for two years while I was away in the UK without having to make a single support call. One of the systems was actually locked in a

Re: How to find out if the interpreter is a debug build?

2007-09-01 Thread Martin v. Löwis
It is a huge problem and weakness of python Would you like to contribute a patch? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: list index() (OT)

2007-09-01 Thread Ricardo Aráoz
Paddy wrote: On Sep 1, 7:57 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Richie Hindle richi...ian.com wrote: But - the word for someone who posts to the internet with the intention of stirring up trouble derives from the word for what fishermen do, not from the word for something that

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Ricardo Aráoz
Hendrik van Rooyen wrote: Carl Banks pavlmail.com wrote: This is starting to sound silly, people. Critical is a relative term, and one project's critical may be anothers mundane. Sure a flaw in your flagship product is a critical problem *for your company*, but are you really

Re: list index() (OT)

2007-09-01 Thread Steve Holden
Ricardo Aráoz wrote: Paddy wrote: On Sep 1, 7:57 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Richie Hindle richi...ian.com wrote: But - the word for someone who posts to the internet with the intention of stirring up trouble derives from the word for what fishermen do, not from the word

Re: Fast socket write

2007-09-01 Thread Greg Copeland
On Aug 22, 8:30 am, paul [EMAIL PROTECTED] wrote: Greg Copeland schrieb: On Aug 21, 9:40 pm, Bikal KC [EMAIL PROTECTED] wrote: Greg Copeland wrote: I'm having a brain cramp right now. I can't see to recall the name of Is your cramp gone now ? :P I wish. If anyone can remember the

Re: Co-developers wanted: document markup language

2007-09-01 Thread Roy Smith
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: By the way, did you know there was life before TEX? Back in that era, the main open-source markup system in use was ... troff. Still not quite dead today, it lives on in the definition of Unix/Linux man pages. I would hardly call troff open source,

Re: Shed Skin Python-to-C++ compiler 0.0.23

2007-09-01 Thread Greg Copeland
On Aug 22, 10:00 am, srepmub [EMAIL PROTECTED] wrote: Adding socket support would certainly open the door for many common classes applications. If I had my pick, I say, sockets and then re. Thanks. Especially sockets should be not too hard to add, but I probably won't work on these

Re: list index() (OT)

2007-09-01 Thread Ricardo Aráoz
Steve Holden wrote: Ricardo Aráoz wrote: Paddy wrote: On Sep 1, 7:57 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Richie Hindle richi...ian.com wrote: But - the word for someone who posts to the internet with the intention of stirring up trouble derives from the word for what fishermen

Re: How to find out if the interpreter is a debug build?

2007-09-01 Thread llothar
Would you like to contribute a patch? Would such a patch require a full blown PEP? If i have to write a PEP i can better add it to the documentation of my application and be sure that the problem is solved. A patch might be rejected by anybody in a bad mood or who don't understand why it is

metaclasses: timestamping instances

2007-09-01 Thread km
Hi all, I have extended a prototype idea from Alex Martelli's resource on metaclasses regarding time stamping of instances. code import time class Meta(type): start = time.time() def __call__(cls, *args, **kw): print 'Meta start time %e'%cls.start x = super(Meta,

Re: Is there a simple way to exit a while loop on keystroke?

2007-09-01 Thread Arnaud Delobelle
On Aug 31, 10:28 pm, [EMAIL PROTECTED] wrote: On Aug 31, 3:55 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: On Aug 31, 7:11 pm, gsxg [EMAIL PROTECTED] wrote: Thanks, The curses library doesn't look to helpful to me. And yet it is. -- Arnaud Maybe the OP is on Windows. The docs

Re: Important Research Project

2007-09-01 Thread George Sakkis
On Sep 1, 7:13 am, E.D.G. [EMAIL PROTECTED] wrote: E.D.G. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Important Research Project (Related to computer programming) Posted by E.D.G. on August 30, 2007 [EMAIL PROTECTED] This effort was not successful. Shocking, isn't it

ANN: PROBE 1.0

2007-09-01 Thread greg
I have released an updated version of my PyWeek4 game competition entry, PROBE. In PROBE, you get to plan and execute space probe missions to other planets, using a fairly realistic (except for a couple of things) simulation of the physics involved. This version has been greatly expanded, and

Re: list index()

2007-09-01 Thread Nicko
On Aug 30, 7:00 pm, Steve Holden [EMAIL PROTECTED] wrote: You can also generate the files that are in one directory but ot the other with (afiles | bfiles) - (afiles bfiles) Or just (afiles ^ bfiles). Nicko -- (lambda f: lambda *a:f(f,*a))( lambda f,l,i:l[i][1]+f(f,l,l[i][0]) if

Re: Important Research Project

2007-09-01 Thread Kenny McCormack
In article [EMAIL PROTECTED], Keith Thompson [EMAIL PROTECTED] wrote: E.D.G. [EMAIL PROTECTED] writes: CBFalconer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] E.D.G. wrote: Where is Perl described in the C standard? This seems rather OT. It has been my experience that a

Pygame + PyInstaller?

2007-09-01 Thread Greg Copeland
Anyone had any luck on using PyInstaller to package up Pygame? I posted to the PyInstaller group some time ago and have yet to receive a reply. Anyone have any tips to offer here? A like-solution which runs on Linux would also be welcome. When PyInstaller works, it's pretty nice. When it

Re: Co-developers wanted: document markup language

2007-09-01 Thread Aahz
In article [EMAIL PROTECTED], Roy Smith [EMAIL PROTECTED] wrote: Anybody remember Scribe? Not directly http://groups.google.com/group/comp.os.cpm.amethyst/msg/d12201a697384a6a -- Aahz ([EMAIL PROTECTED]) * http://www.pythoncraft.com/ If you don't know what your program

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Pierre Hanser
Carl Banks a écrit : This is starting to sound silly, people. Critical is a relative term, and one project's critical may be anothers mundane. Sure a flaw in your flagship product is a critical problem *for your company*, but are you really trying to say that the criticalness of a bad

Re: How to find out if the interpreter is a debug build?

2007-09-01 Thread Martin v. Löwis
Would such a patch require a full blown PEP? No. If i have to write a PEP i can better add it to the documentation of my application and be sure that the problem is solved. I don't understand. Are you saying you would rather not write a PEP, and add something to the documentation of your

Re: platform system may be Windows or Microsoft since Vista

2007-09-01 Thread p . lavarre
suppose you get Python for Vista Windows today if platform.system() in ('Windows', 'Microsoft'): if not (platform.system() in ('Windows', 'Microsoft')): Good analysis. Yes I am sane!! Thank you for saying. Log a bug @ bugs.python.org Glad to hear I can help. I created:

Re: Important Research Project

2007-09-01 Thread Steve Holden
Kenny McCormack wrote: In article [EMAIL PROTECTED], Keith Thompson [EMAIL PROTECTED] wrote: E.D.G. [EMAIL PROTECTED] writes: CBFalconer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] E.D.G. wrote: Where is Perl described in the C standard? This seems rather OT. It has been my

Re: reload(sys)

2007-09-01 Thread Sönmez Kartal
On 31 A ustos, 16:58, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Fri, 31 Aug 2007 12:53:36 +, Sönmez Kartal wrote: On 31 A ustos, 04:24, Steven Bethard [EMAIL PROTECTED] wrote: Snmez Kartal wrote: I've had an encoding issue and solved it by

Re: reload(sys)

2007-09-01 Thread Sönmez Kartal
On 31 A ustos, 20:09, Steven Bethard [EMAIL PROTECTED] wrote: Sönmez Kartal wrote: On 31 A ustos, 04:24, Steven Bethard [EMAIL PROTECTED] wrote: Sönmez Kartal wrote: I've had an encoding issue and solved it by sys.setdefaultencoding('utf-8')... My first try wasn't successful since

Re: metaclasses: timestamping instances

2007-09-01 Thread Steve Holden
km wrote: Hi all, I have extended a prototype idea from Alex Martelli's resource on metaclasses regarding time stamping of instances. code import time class Meta(type): start = time.time() def __call__(cls, *args, **kw): print 'Meta start time %e'%cls.start

nameerror upon calling function

2007-09-01 Thread seancron
Hi, I have a program that makes a call to a function in a different python script that I wrote. But, when I call the function I get the following error: NameError: global name 'WSDL' is not defined I can't figure out why I'm getting this error since WSDL should be defined. Here are the two

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Terry Reedy
Hendrik van Rooyen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | This really intrigues me - how do you program a dam? - and why is it | critical? | | Most dams just hold water back. Most big dams also generate electricity. Even without that, dams do not just hold water back,

Re: metaclasses: timestamping instances

2007-09-01 Thread Michele Simionato
On Sep 1, 6:07 pm, Steve Holden [EMAIL PROTECTED] wrote: snip Debugging with Wing IDE and examining the classes at a breakpoint shows this to be true (even after Y's __metaclass__ assignment is commented out): X.__metaclass__ class '__main__.Meta' Y.__metaclass__ class '__main__.Meta'

Re: nameerror upon calling function

2007-09-01 Thread Arnaud Delobelle
On Sep 1, 5:05 pm, seancron [EMAIL PROTECTED] wrote: Hi, I have a program that makes a call to a function in a different python script that I wrote. But, when I call the function I get the following error: NameError: global name 'WSDL' is not defined I can't figure out why I'm getting

datetime.timedelta division confusion

2007-09-01 Thread skip
Running from Subversion, I see confusing (to me) behavior related to division of datetime.timedelta objects by integers: % python Python 2.6a0 (trunk:57277:57280M, Aug 28 2007, 17:44:49) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type help, copyright, credits or

Re: datetime.timedelta division confusion

2007-09-01 Thread Arnaud Delobelle
On Sep 1, 7:28 pm, [EMAIL PROTECTED] wrote: Running from Subversion, I see confusing (to me) behavior related to division of datetime.timedelta objects by integers: % python Python 2.6a0 (trunk:57277:57280M, Aug 28 2007, 17:44:49) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on

Re: datetime.timedelta division confusion

2007-09-01 Thread Skip Montanaro
Try d // 2 ? It may be that v2.6 considers / as __truediv__ and not __div__. Ah, right you are. Thanks... Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: list index()

2007-09-01 Thread Michael L Torrie
[EMAIL PROTECTED] wrote: In my case of have done os.listdir() on two directories. I want to see what files are in directory A that are not in directory B. I have used exceptions in other languages and only do so on logic that should never happen. In this case it is known that some of the files

Re: list index()

2007-09-01 Thread Michael L Torrie
Alex Martelli wrote: is the one obvious way to do it (the set(...) is just a simple and powerful optimization -- checking membership in a set is roughly O(1), while checking membership in a list of N items is O(N)...). Depending on a how a set is stored, I'd estimate any membership check in a

Re: list index()

2007-09-01 Thread Marc 'BlackJack' Rintsch
On Sat, 01 Sep 2007 13:44:28 -0600, Michael L Torrie wrote: Alex Martelli wrote: is the one obvious way to do it (the set(...) is just a simple and powerful optimization -- checking membership in a set is roughly O(1), while checking membership in a list of N items is O(N)...). Depending

Re: list index()

2007-09-01 Thread Marc 'BlackJack' Rintsch
On Sat, 01 Sep 2007 13:37:29 -0600, Michael L Torrie wrote: What's wrong, then, with doing: if i in list: print list.index(i) If `i` is in the list this does the linear lookup twice. If we were to program this .index() method in some language that enforces contracts, like haskell,

localizing a sort

2007-09-01 Thread Ricardo Aráoz
Hi, I've been working on sorting out some words. My locale is : import locale locale.getdefaultlocale() ('es_AR', 'cp1252') I do : a = 'áéíóúäëïöüàèìòù' print ''.join(sorted(a, cmp=lambda x,y: locale.strcoll(x,y))) aeiouàáäèéëìíïòóöùúü This is not what I am expecting. I was expecting :

Windows Media Player Playlist

2007-09-01 Thread Lamonte Harris
Is it possible to use python to get the current playlist of the current playing songs from Windows Media Player or Windows Player Classic? -- http://mail.python.org/mailman/listinfo/python-list

Paramiko performance doubts...

2007-09-01 Thread dmorilha
Hello all, I developed a solution using paramiko and a similar Telnetlib class to access a several number of network devices in replacement of using Pexpect library and openssh client. It worked so well but the bad performance made me think in how to improve Paramiko. Is there some way to do

Re: Looking for Delaunay triangulation module...

2007-09-01 Thread [EMAIL PROTECTED]
On Sep 1, 12:24 am, Grant Edwards [EMAIL PROTECTED] wrote: On 2007-09-01, Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: In message [EMAIL PROTECTED], Grant Edwards wrote: So for lack of a delaunay module, I'm stuck trying to port my application to Win32. Why not run it under Cygwin? :)

Re: Pivy problem and some other stuff

2007-09-01 Thread azrael
Look, what I think about is this. I'd like to make a multi dimensional list in which evry single element would represent a function. By looping through the list I would execute the functions. But not only that, it is possible to experiment with recoursions. the return 1 2 and 3 examples are just a

Re: Co-developers wanted: document markup language

2007-09-01 Thread David Bolen
Roy Smith [EMAIL PROTECTED] writes: Anybody remember Scribe? (raising hand) OT, but I still have a bunch of Scribe source documents from college. Of course, as I attended CMU where it originated I suppose that's not unusual. Definitely pre-WYSIWYG, but one of the first to separate

Re: list index()

2007-09-01 Thread Alex Martelli
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Sat, 01 Sep 2007 13:44:28 -0600, Michael L Torrie wrote: Alex Martelli wrote: is the one obvious way to do it (the set(...) is just a simple and powerful optimization -- checking membership in a set is roughly O(1), while checking

Re: Looking for Delaunay triangulation module...

2007-09-01 Thread Grant Edwards
On 2007-09-01, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: So for lack of a delaunay module, I'm stuck trying to port my application to Win32. Why not run it under Cygwin? :) I'm hoping there is an easier way than trying to build a half-dozen large Python extensions (and their supporting

A big problem with _name_ == '_main_'

2007-09-01 Thread onurays
Hi, I have begun to teach me Python today. The problem is : NameError: name 'name' is not defined. I am using winXP and i used that: if _name_ == '_main_' : MyClass() gtk.main() Onuray. -- http://mail.python.org/mailman/listinfo/python-list

Re: A big problem with _name_ == '_main_'

2007-09-01 Thread onurays
Oh, i solve the problem. It should be double underscore.. I am so careless..! Onuray. onurays [EMAIL PROTECTED], haber iletisinde þunlarý yazdý:[EMAIL PROTECTED] Hi, I have begun to teach me Python today. The problem is : NameError: name 'name' is not defined. I am using winXP and i

Re: A big problem with _name_ == '_main_'

2007-09-01 Thread Tommy Grav
On Sep 1, 2007, at 8:35 PM, onurays wrote: I have begun to teach me Python today. The problem is : NameError: name 'name' is not defined. I am using winXP and i used that: if _name_ == '_main_' : MyClass() gtk.main() Onuray. I believe that should be a double

PyCon 2008 - Call for Tutorial Topics

2007-09-01 Thread Greg Lindstrom
Hello All, We are still soliciting ideas for tutorials to put on at PyCon in Chicago next spring. PyCon is all about our community; under the direction of the PSF, planned, organized and run by volunteers just like you. We are asking for topics that you want to see covered on the tutorial day

[python-win32] How can I get the parentWindow.document object?

2007-09-01 Thread goodol
hello everybody i am trying to automatie IE using python, and i want to access at the parentWindow.document object the code is like this, import win32com.client import pythoncom ie = win32com.client.Dispatch(InternetExplorer.Application) doc=ie.Document.parentWindow.document the code always

Re: Important Research Project

2007-09-01 Thread E.D.G.
E.D.G. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have the Gnuplot graphics program running now with Windows XP. And it looks like it will work for my application. http://www.gnuplot.info -- http://mail.python.org/mailman/listinfo/python-list

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Alex Martelli
Ricardo Aráoz [EMAIL PROTECTED] wrote: ... We should remember that the level of security of a 'System' is the same as the level of security of it's weakest component, Not true (not even for security, much less for reliability which is what's being discussed here). It's easy to see how this

Re: status of Programming by Contract (PEP 316)?

2007-09-01 Thread Alex Martelli
Russ [EMAIL PROTECTED] wrote: ... the inputs. To test the post-conditions, you just need a call at the bottom of the function, just before the return, ... there's nothing to stop you putting the calls before every return. Oops! I didn't think of that. The idea of putting one

Re: Automation and scheduling of FrontPage publishing using Python

2007-09-01 Thread [EMAIL PROTECTED]
On Sep 1, 3:19 am, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], Steve Holden wrote: Lawrence D'Oliveiro wrote: If they were using FrontPage extensions, they deserve everything they get. While possibly justifiable, given that

  1   2   >