howto compile recursively all *.py files to *.pyc (from a directory my_dir)?

2007-09-01 Thread dmitrey
howto compile recursively all *.py files to *.pyc (from a directory my_dir)? Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

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

2007-09-01 Thread Paul Rubin
Russ <[EMAIL PROTECTED]> writes: > > try: > > blah blah with as many return statements as you want > > finally: > > something that gets executed unconditionally at the end > Thanks. I didn't think of that. > So design by contract *is* relatively easy to use in Python already. > The main issue,

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

2007-09-01 Thread Russ
On Sep 1, 10:44 pm, Russ <[EMAIL PROTECTED]> wrote: > On, one more thing. I see that the line wrapping on Google Groups is > finally working for me after many months. Fantastic! I can't help but > wonder if my mentioning it to you a few days ago had anything to do > with it. Well, it's working on

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

2007-09-01 Thread Michele Simionato
On Sep 2, 7:05 am, Russ <[EMAIL PROTECTED]> wrote: > Someone please correct me if I am wrong, > but I think PEP adds only to the libraries. You are wrong, PEPs also add to the core language. Why don't you give a look at the PEP parade on python.org? Michele Simionato -- http://mail.pyth

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

2007-09-01 Thread Russ
On Sep 1, 6:51 pm, [EMAIL PROTECTED] (Alex Martelli) > try: > blah blah with as many return statements as you want > finally: > something that gets executed unconditionally at the end Thanks. I didn't think of that. So design by contract *is* relatively easy to use in Python already. The mai

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

2007-09-01 Thread Russ
On Sep 1, 4:25 am, Bryan Olson > Design-by-contract (or programming-by-contract) shines in large > and complex projects, though it is not a radical new idea in > software engineering. We pretty much generally agree that we want > strong interfaces to encapsulate implementation complexity. > That's

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, ... > You win the argument, and thanks you prove my point. You typically > concerned yourself with the techni

Re: How best to dynamically define methods (and functions)?

2007-09-01 Thread Erik Max Francis
Erik Max Francis wrote: > Something like:: > > method = ['fun', ...] > for method in methods: > setattr(MyClass, method, lambda *x: Node(method, *x)) Err, that first line was supposed to be methods = ... -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/

Re: How best to dynamically define methods (and functions)?

2007-09-01 Thread Erik Max Francis
Kenneth McDonald wrote: > I can see an obvious but hacky way to define a Python function at > runtime. I can't see any obvious way to add a method to a class at > runtime (though I'm sure one could do just about anything by digging > into the metaclass stuff, which I will do if needed). But poi

How best to dynamically define methods (and functions)?

2007-09-01 Thread Kenneth McDonald
I can see an obvious but hacky way to define a Python function at runtime. I can't see any obvious way to add a method to a class at runtime (though I'm sure one could do just about anything by digging into the metaclass stuff, which I will do if needed). But pointers to cleaner or easier exist

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

2007-09-01 Thread Carl Banks
On Sat, 01 Sep 2007 17:19:49 +0200, Pierre Hanser wrote: > 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*, bu

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

2007-09-01 Thread Carl Banks
On Sat, 01 Sep 2007 08:38:38 -0300, Jorge Godoy wrote: > 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

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

2007-09-01 Thread Ricardo Aráoz
Alex Martelli wrote: > 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 discu

Re: Automation and scheduling of FrontPage publishing using Python

2007-09-01 Thread Jerry
andrew, I would try looking into Windows automation with Python. http://www.google.com/search?q=windows+automation+python should get you started. The winGuiAuto package may help you out as it is like have a human click and move throughout the interface. The only downside is that there is no reco

Re: So what exactly is a complex number?

2007-09-01 Thread Tim Daneliuk
Grzegorz Słodkowicz wrote: > >> 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 us

Re: So what exactly is a complex number?

2007-09-01 Thread Tim Daneliuk
Wildemar Wildenburger wrote: > 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 *di

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,

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

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

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

[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 f

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 (t

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

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 wi

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: 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

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), >

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 presenta

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: 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

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 that

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

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 expec

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

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)...). >

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

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 fi

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: 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)

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" o

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

Re: metaclasses: timestamping instances

2007-09-01 Thread Michele Simionato
On Sep 1, 6:07 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > > 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__ > > >>> Y.__metaclass__ > > >>> For the benefit of the

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,

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 scri

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. > > > import time > class Meta(type): > start = time.time() > def __call__(cls, *args, **kw): > print 'Meta start time %e'%cls.start >

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

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 > >> > "sys.setdefault

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 s

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: http://

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 a

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 b

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

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 doesn

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 b

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]

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 can

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.

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

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. import time class Meta(type): start = time.time() def __call__(cls, *args, **kw): print 'Meta start time %e'%cls.start x = super(Meta, cls).__call_

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 u

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" wrote: > But - the word for someone who posts to the internet with the intention of > stirring up trouble derives from the word for what fi

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: 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 so

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 c

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" 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 t

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

2007-09-01 Thread Ricardo Aráoz
Hendrik van Rooyen wrote: > "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

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" 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 l

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: 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 lo

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 s

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 U

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: 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 beco

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

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 ar

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 di

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 diffe

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 imagina

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 thr

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" 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 compan

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

2007-09-01 Thread Hendrik van Rooyen
"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 ba

Re: list index() (OT)

2007-09-01 Thread Hendrik van Rooyen
"Steve Holden" 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: 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

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: Non-Blocking IO

2007-09-01 Thread Hendrik van Rooyen
"mp" 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 -- http://mail.python.org/mailman/listin

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 ha

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

Re: Let's Unite Against Jews and Mongrels!

2007-09-01 Thread Hendrik van Rooyen
"Wildemar Wildenburger" 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! Ever

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 > > We're not out to rewrite the table of elements. There's no such thing as > "aluminum", and "aluminium" always has just the two "i"s. Al

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

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. > > > To me

Re: list index() (OT)

2007-09-01 Thread Paddy
On Sep 1, 7:57 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Richie Hindle" 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 bri

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 We're not out to rewrite the table of elements. There's no such thing as "aluminum", and "aluminium" always has just the two "i"s. -- \ "Rightful liberty is unobstructed action, according

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 im

Way off topic

2007-09-01 Thread Paddy
On Sep 1, 7:40 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Paddy" 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 is

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', e

Re: list index() (OT)

2007-09-01 Thread Steve Holden
Hendrik van Rooyen wrote: > "Richie Hindle" 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 su

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: 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. Doi

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

  1   2   >