Re: Coding Standards

2007-08-31 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > 'Good code' is code that works, is bug free, and is readable and > maintainable. Standards need to be followed for coding. Read more... > > http://brsx.co.uk/SWtesting/FAQs/FAQs012.asp You misstyped your URL and referenced a C++ related document, for Python its here

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

2007-08-31 Thread Carl Banks
On Fri, 31 Aug 2007 01:15:04 -0400, Roy Smith wrote: > Carl Banks <[EMAIL PROTECTED]> wrote: >> Python really isn't suitable for in-flight controls for various >> reasons, and mission critical concerns is a minor one (systems with >> less underlying complexity tend to have fewer failure modes). B

Re: list index()

2007-08-31 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On Aug 30, 4:28 pm, Ben Finney <[EMAIL PROTECTED]> > wrote: >> [EMAIL PROTECTED] writes: >>> On Aug 30, 12:09 am, Ben Finney <[EMAIL PROTECTED]> >>> wrote: It's letting you know that the item isn't in the list. There's no sensible return value from an "index"

Re: Creating a multi-tier client/server application

2007-08-31 Thread Paul Rubin
Jeff <[EMAIL PROTECTED]> writes: > Granted. But what I will be writing really will take a lot of extra > work to get even close to the level of usability needed on the web vs. > a desktop app. And I'll try not to write a crappy GUI ;-) OK. In the discussion with Chris, one factor that came up i

Re: list index()

2007-08-31 Thread Hendrik van Rooyen
"Carsten Haese" wrote: > .. If we start labeling > people, this thread will earn you a label that rhymes with "roll". 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 li

Re: list index()

2007-08-31 Thread Erik Max Francis
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, and more > towards the back of my mout

Requirement-HEAD OF TECHNOLOGY

2007-08-31 Thread SAWVEQ
Senior Position Vacant for www.123greetings.com Head of Technology (Kolkata, India) Responsibilities: To Scale the website to handle large volumes of user traffic. To lead the development t

MySQLdb ImportError

2007-08-31 Thread Sjoerd
Hello! When I try to import the MySQLdb lib python generates an error: Traceback (most recent call last): File "", line 1, in import MySQLdb File "C:\Python25\lib\site-packages\MySQLdb\__init__.py", line 19, in import _mysql ImportError: DLL load failed with error code 193 This is

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

2007-08-31 Thread Russ
On Aug 30, 7:20 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > Russ <[EMAIL PROTECTED]> wrote: > >... > > > programs." Any idea how much Python is used for flight control systems > > in commercial > > transport aircraft or jet fighters? Hi Alex. I've always enjoyed your Piggies talks at Googl

Re: Setting a read-only attribute

2007-08-31 Thread Alexandre Badez
On Aug 30, 11:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have an object and wish to set an attribute on it which, > unfortunately for me, is read-only. > > How can I go about this? > > Cheers. > -T Could you show the object you want to set his attribute? Until that, it's difficult

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

2007-08-31 Thread Carl Banks
On Thu, 30 Aug 2007 22:56:54 -0700, Russ wrote: >> Python really isn't suitable for in-flight controls > for various >> reasons, and mission critical concerns is a minor one (systems with > > Do you know anything about the FAA certification process for flight- > critical systems? I am not an expe

Re: list index()

2007-08-31 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > I don't think that is the definition used across computer science. > > It suddenly dawned on me that what would be best would be a contains() > (or IN syntax for those who can't afford to wait) for lists. No need to wait: >>> 'a' in ['a', 'b'] True >>> ['a'

Re: Simple elementtree question

2007-08-31 Thread Stefan Behnel
IamIan wrote: > Thank you very much! That did it. > > In the source XML tags have rdf:about attributes with the link > to the story, and it was here I planned on grabbing the link and > matching it up with the child text. After seeing the output of > elmenttree's getiterator() though, it now loo

Do you have any complete example for creating msi file(doing file copying)

2007-08-31 Thread siddhatha veedaluru
Thank you for the help that you are going to give me. I have a project where in which i want to create a msi file just as python-package while installing python on the system. Just copying the files to the user given target directory. i want to create similar msi file for my project that jus

Re: beginner, idomatic python 2

2007-08-31 Thread Bruno Desthuilliers
bambam a écrit : > "Bruno Desthuilliers" <[EMAIL PROTECTED]> > wrote in message news:[EMAIL PROTECTED] >> As a side note, in Python, inheritance ... >> ... should usually not be used for typing. > > :~( > I'm sorry, I don't even know what that means... The code I > have inherited from someone onl

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

2007-08-31 Thread Bruno Desthuilliers
Russ a écrit : >> Pre and post conditions applying to the class ? Now that's an >> interesting concept. IIRC, Eiffels pre and post conditions only apply to >> methods, and I fail to see how they could apply to a class. But since >> you're an expert on the subject, I don't doubt you'll enlighten us

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

2007-08-31 Thread Bruno Desthuilliers
Russ a écrit : >> FWIW, the "Eiffel and SPARK Ada folks" also "brilliantly explained" why >> one can not hope to "write reliable programs" without strict static >> declarative type-checking. > > And they are probably right. And they are obviously wrong, by empiric experience. > I don't think you

Re: list index()

2007-08-31 Thread Paddy
On Aug 31, 8:47 am, Erik Max Francis <[EMAIL PROTECTED]> 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

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

2007-08-31 Thread Michele Simionato
On Aug 31, 10:02 am, Russ <[EMAIL PROTECTED]> wrote: > > Hi Alex. I've always enjoyed your Piggies talks at > Google (although I missed he last one because I was out > of town). I'm disappointed to see that you seem to have > taken personal offense from remarks I made to someone else who > attacked

Re: list index()

2007-08-31 Thread Erik Max Francis
Paddy 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. _Troll_ and _frolic_ aren't pronounced with the same "o" sound in any accent I've ever heard of. Which y

Re: list index()

2007-08-31 Thread Tim Golden
Erik Max Francis wrote: > Paddy 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. > > _Troll_ and _frolic_ aren't pronounced with the same "o" sound in any

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

2007-08-31 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > Yeah, good question indeed, and I'm asking myself that -- somebody who > posts to this group in order to attack the reliability of the language > the group is about (and appears to be supremely ignorant about its use > in air-traffic control and for high-

Re: list index()

2007-08-31 Thread Jon Ribbens
On 2007-08-31, Erik Max Francis <[EMAIL PROTECTED]> 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. > > _Troll_ and _frolic_ aren't pronounced with the same

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

2007-08-31 Thread Paul Rubin
Michele Simionato <[EMAIL PROTECTED]> writes: > > http://archive.eiffel.com/doc/manuals/technology/contract/ariane/page... > > That paper contains only a good think: a link to the contrarian view > http://home.flash.net/~kennieg/ariane.html#s3.1.5 I like the contrarian article much better than th

OT: pronounciation [was: list index()]

2007-08-31 Thread Tim Golden
Tim Golden wrote: > Erik Max Francis wrote: >> Paddy 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. >> _Troll_ and _frolic_ aren't pronounced with t

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

2007-08-31 Thread Ricardo Aráoz
Russ wrote: >> I've always wondered... Are the compilers (or interpreters), which take >> these programs to machine code, also formally proven correct? > > No, they are not formally proven correct (too complicated for that), > but I believe they are certified to a higher level than your "typical"

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

2007-08-31 Thread Paul Rubin
Ricardo Aráoz <[EMAIL PROTECTED]> writes: > In that case why don't we just 'certify to a higher level' the programs > and get done with this formal proofs? We should remember that the level > of security of a 'System' is the same as the level of security of it's > weakest component, so either we fo

Re: list index()

2007-08-31 Thread Richie Hindle
[Carsten] > .. If we start labeling > people, this thread will earn you a label that rhymes with "roll". [Hendrik] > 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

Re: Registering a python function in C

2007-08-31 Thread Hrvoje Niksic
fernando <[EMAIL PROTECTED]> writes: > Could someone post an example on how to register a python function as > a callback in a C function? If I understand correctly, your C function receives a Python function (as a function object of type PyObject *), which you need to call from C. To do that, c

Re: list index()

2007-08-31 Thread Carsten Haese
On Thu, 30 Aug 2007 21:33:43 -0700, TheFlyingDutchman wrote > On Aug 30, 9:06 pm, "Carsten Haese" <[EMAIL PROTECTED]> wrote: > > On Thu, 30 Aug 2007 20:17:00 -0700, zzbbaadd wrote > > > > > Well IN was what I was looking for and would have saved this thread. > > > However I don't believe IN showed

Re: python + gcov

2007-08-31 Thread labrach
> I always bit the bullet and finally just did that. and here the steps to follow ... http://plexity.blogspot.com/2006/02/profiling-python-extensions.html laurent -- http://mail.python.org/mailman/listinfo/python-list

Pylons, SQLAlchemy, too many connections problem.

2007-08-31 Thread Adam Kubica
Hello. I have pylons 0.96 (SVN) and current SQLAlchemy (0.3.10), and I have bug that doesn't exist earlier. My connection code: import sqlalchemy.mods.threadlocal from sqlalchemy import DynamicMetaData, objectstore metadata = DynamicMetaData( case_sensitive = False ) def db_connect( dsn ):

Re: Pylons, SQLAlchemy, too many connections problem.

2007-08-31 Thread Bruno Desthuilliers
Adam Kubica a écrit : > Hello. > > I have pylons 0.96 (SVN) and current SQLAlchemy (0.3.10), and I have bug > that > doesn't exist earlier. > > My connection code: > > import sqlalchemy.mods.threadlocal > from sqlalchemy import DynamicMetaData, objectstore > > metadata = DynamicMetaData( case_s

win32com problem: more than one instance

2007-08-31 Thread Thomas Rademacher
Hello, I start my script convert.py simultaneously in any dos-shells several times. But I get every time the same solidworks instance. I see in the proccess (task) manager only one solidworks.exe Therefore I get for all simultaneous conversions the same output file. I tested the same code with ex

Re: win32com problem: more than one instance

2007-08-31 Thread Tim Golden
Thomas Rademacher wrote: > Hello, > > I start my script convert.py simultaneously in any dos-shells several > times. But I get every time the same solidworks instance. > I see in the proccess (task) manager only one solidworks.exe > Therefore I get for all simultaneous conversions the same output

Re: Pylons, SQLAlchemy, too many connections problem.

2007-08-31 Thread Adam Kubica
On Fri, 31 Aug 2007 14:03:48 +0200, Adam Kubica wrote: > Hello. > > I have pylons 0.96 (SVN) and current SQLAlchemy (0.3.10), and I have bug > that > doesn't exist earlier. > > My connection code: > > import sqlalchemy.mods.threadlocal > from sqlalchemy import DynamicMetaData, objectstore > >

Google spreadsheets

2007-08-31 Thread Michele Simionato
I would like to upload a tab-separated file to a Google spreadsheet from Python. Does anybody have a recipe handy? TIA, Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Python doesn't see the directories I create

2007-08-31 Thread Neil Cerutti
On 2007-08-31, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > In message <[EMAIL PROTECTED]>, Neil > Cerutti wrote: >> Keeping in mind which came first, isn't it at least as >> accurate to attribute this problem to Python's choice of >> escape character? > > No, it's Microsoft's fault. The use of

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

2007-08-31 Thread Neil Cerutti
On 2007-08-31, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Russ wrote: >> Yes, thanks for reminding me about that. With SPARK Ada, it is >> possible for some real (non-trivial) applications to formally >> (i.e., mathematically) *prove* correctness by static analysis. >> I doubt that is possible with

Re: reload(sys)

2007-08-31 Thread Sönmez Kartal
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 setdefaultencoding is not named > > when I imported sys module. After, I import

How to use "Resource Editor" in wxPython ?

2007-08-31 Thread codemania
Disappointing me extremely, with the "generate python" function within Resource Editor, I only get a segment of python code which load xrc(xml format) file, rather than real python code in which I could append my own code. Does that mean RE(Resource Editor) is of little use? I hope not, maybe the

Re: pure python for sms

2007-08-31 Thread Gerardo Herzig
Neil Hodgson wrote: >Gerardo Herzig: > > > >>Hi dudes. Im looking for a python implementation for sending sms to a >>cell phone. I was try using some free pages, but i want to use a python. >>Do i need a cellphone conected to my machine? Or can i send sms to some >>cell via some python librar

Re: Let's Unite Against Jews and Mongrels!

2007-08-31 Thread Wildemar Wildenburger
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! /W -- http://mail.python.org/mailman/listinfo/python

Re: pure python for sms

2007-08-31 Thread Francesco Guerrieri
On 8/31/07, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > Well, im not triyng to send a SMS `FROM' a cellphone, im trying to send > a SMS `TO' a cellphone. Here (in Argentina) are several sites who lets > you send a sms for free. You also can receive SMS responses via this page > http://sms.personal.

Re: create Powerpoint via com

2007-08-31 Thread kyosohma
On Aug 30, 11:55 pm, Alan Isaac <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > > OK, creating bulleted lists, or tables, > or adding pictures is all straightforward. > How about chart creation (in Ppt 2003)? > I do not see how to do this with Python. > > Thanks, > Alan Alan, You pro

Re: How to use "Resource Editor" in wxPython ?

2007-08-31 Thread kyosohma
On Aug 31, 7:49 am, codemania <[EMAIL PROTECTED]> wrote: > Disappointing me extremely, with the "generate python" function within > Resource Editor, I only get a segment of python code which load > xrc(xml format) file, rather than real python code in which I could > append my own code. > > Does th

Re: fcntl problems

2007-08-31 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
On Aug 31, 12:23 am, Miles <[EMAIL PROTECTED]> wrote: > Sorry, that last quote-only reply was accidental. :) > > On 8/30/07, mhearne808 wrote: > > I've been doing some experiments, and here are some specific examples > > to try. > > [snipped examples] > > > From these last two experiments I can onl

Re: pure python for sms

2007-08-31 Thread Paul Boddie
On 31 Aug, 15:36, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > Neil Hodgson wrote: > >This is likely to cost some money similar to sending an SMS from a > >'phone. [...] > Well, im not triyng to send a SMS `FROM' a cellphone, im trying to send > a SMS `TO' a cellphone. Yes, but he did write "

Re: list index()

2007-08-31 Thread TheFlyingDutchman
> > Fair enough, but that's a tutorial. It would be foolish to demand that a > tutorial be a complete reference for everything that can be done with a list. I wasn't demanding anything of the page. I was pointing out how I made the assumption there was no way to find out if a list has a value oth

Re: list index()

2007-08-31 Thread BJörn Lindqvist
On 8/30/07, Carsten Haese <[EMAIL PROTECTED]> wrote: > Is the Pythonic way > > try: > i = somelist.index(thing) > # Do something with i > except IndexError: > # Do something if thing not found That is not the Pythonic way. "# Do something with i" might also raise an IndexError and they

Re: reload(sys)

2007-08-31 Thread Marc 'BlackJack' Rintsch
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.setdefaultencoding('utf-8')"... >> >> > My first try wasn't successful since setdefaultencodi

Re: create Powerpoint via com

2007-08-31 Thread Alan Isaac
>>How about chart creation (in Ppt 2003)? >>I do not see how to do this with Python. [EMAIL PROTECTED] wrote: > You probably need to browse the COM object using PythonWin, which is a > part of the ActiveState distro. You can also use Python's builtin > function, dir, to find out various methods of

Re: fcntl problems

2007-08-31 Thread Miles
On 8/31/07, mhearne808 wrote: > I have a script that will be run from a cron job once a minute. One > of the things this script will do is open a file to stash some > temporary results. I expect that this script will always finish its > work in less than 15 seconds, but I didn't want to depend on

Question involving a Python app...

2007-08-31 Thread sberry
I am a Flash developer (also a Python dev) and I use an editor called SEPY Actionscript Editor. The latest release version does not support Flash CS3, so I downloaded the source from subversion, edited it, and recompiled to get a version that worked with CS3. Right now, in order to run the progra

Re: Important Research Project

2007-08-31 Thread mecej4
E.D.G. wrote: > "dave_w" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > My main Perl program is presently about 3500 lines of code long and 160 KB > in size. So I am not too anxious to translate it into another language. > Apparently, having painted himself into a corner, our w

Fatal Python error using ctypes & python exceptions

2007-08-31 Thread mmacrobert
Hi Everyone, I've created a 'C' dll that is accessed via ctypes library containing a bunch of functions. I've successfully been able to use the functions. However, I would like to throw python exceptions from some of them. I throw them using: ::PyErr_SetString(::PyExc_RuntimeError, theErrorString)

Re: Question involving a Python app...

2007-08-31 Thread Simon Brunning
On 8/31/07, sberry <[EMAIL PROTECTED]> wrote: > So, how do I create an executable (on Windows) > to install the program so it will run without the aforementioned > framework being installed? Check out py2exe. -- Cheers, Simon B. [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/pytho

Re: strings (dollar.cents) into floats

2007-08-31 Thread Steve Holden
Ben Finney wrote: > Wildemar Wildenburger <[EMAIL PROTECTED]> writes: > >> But what use is there for floats, then? When is it OK to use them? > > When one is willing to sacrifice decimal precision for speed of > calculation, and doesn't need the numbers to stay precise. E.g. when > performing mil

Re: MySQLdb ImportError

2007-08-31 Thread Steve Holden
Sjoerd wrote: > Hello! > > When I try to import the MySQLdb lib python generates an error: > > Traceback (most recent call last): > File "", line 1, in > import MySQLdb > File "C:\Python25\lib\site-packages\MySQLdb\__init__.py", line 19, > in > import _mysql > ImportError: DLL load

Re: Setting a read-only attribute

2007-08-31 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I have an object and wish to set an attribute on it which, > unfortunately for me, is read-only. > > How can I go about this? > This seems like a bizarre requirement. Why is the attribute read-only in the first place? How is the read-only mechanism enforced? Is the obj

Re: fcntl problems

2007-08-31 Thread Hrvoje Niksic
"mhearne808[insert-at-sign-here]gmail[insert-dot-here]com" <[EMAIL PROTECTED]> writes: > I think I'm still confused. What Miles tried to tell you is that you should call fcnt.flock from both PA and PB. In the example you posted, you failed to call it from PB. No lock call, so no locking happen

Re: fcntl problems

2007-08-31 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
On Aug 31, 8:42 am, Miles <[EMAIL PROTECTED]> wrote: > On 8/31/07, mhearne808 wrote: > > I have a script that will be run from a cron job once a minute. One > > of the things this script will do is open a file to stash some > > temporary results. I expect that this script will always finish its >

Re: Biased random?

2007-08-31 Thread Jeffrey Barish
Robert Kern wrote: > Ivan Voras wrote: >> Jeffrey Barish wrote: >> >>> If you take the difference between two uniformly distributed random >>> variables, the probability density function forms an isosceles triangle >>> centered at 0. Take the absolute value of that variable and the pdf is >>> a

Re: Question involving a Python app...

2007-08-31 Thread kyosohma
On Aug 31, 9:52 am, sberry <[EMAIL PROTECTED]> wrote: > I am a Flash developer (also a Python dev) and I use an editor called > SEPY Actionscript Editor. The latest release version does not support > Flash CS3, so I downloaded the source from subversion, edited it, and > recompiled to get a versio

RE: win32com problem: more than one instance

2007-08-31 Thread Stefan Schukat
Hello Thomas, excel registers its COM objects with REGCLS_SINGLEUSE that means one COM object is created per process. In Solidworks it seems that that they register with REGCLS_MULTIPLEUSE, which means on process can serve more than one COM object. Hence you have no chance to get multiple insta

Ayuda

2007-08-31 Thread Dr. José Contreras
Gente Inteligente y Distinguida, soy un aficionado y apelo a Ustedes, para resolver éste problema. Para WebMaster de Google, me solicita instalar o ejecución de pitón, cómo comprenderán no dispongo de ningún guru de web, por lo que solicito en la medida de sus posibilidades me ayuden a ejecutar pit

Re: fcntl problems

2007-08-31 Thread Miles
On 8/31/07, mhearne808 wrote: > Looking at my flock(3) man page, I'm guessing that "35" is the error > code for EWOULDBLOCK. Which system header file am I supposed to look > in to figure that magic number out? I got the error number by looking at the IOError exception raised when playing with the

Re: Setting a read-only attribute

2007-08-31 Thread [EMAIL PROTECTED]
On Aug 31, 6:14 pm, Alexandre Badez <[EMAIL PROTECTED]> wrote: > On Aug 30, 11:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > I have an object and wish to set an attribute on it which, > > unfortunately for me, is read-only. > > > How can I go about this? > > > Cheers. > > -T > > Cou

Do you have any complete example for creating msi file(doing file copying)

2007-08-31 Thread siddhatha veedaluru
Thank you for the help that you are going to give me. I have a project where in which i want to create a msi file just as python-package while installing python on the system. Just copying the files to the user given target directory. i want to create similar msi file for my project that jus

Re: strings (dollar.cents) into floats

2007-08-31 Thread sturlamolden
On 31 Aug, 02:12, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > I've heard (ok, read) that several times now and I understand the > argument. But what use is there for floats, then? When is it OK to use them? There are fractions that can be exactly represented by floats that cannot be exactl

escaping only double quotes

2007-08-31 Thread cesco
Hi, I have a string which is constructed like this: string = "Butler's 15\" TV" s = """my string goes here "%s" """ % string the single string, unfortunately, gets escaped which is something I want to avoid because I have to load the data into a database using the json format and I get an "inval

Re: Question involving a Python app...

2007-08-31 Thread sberry
On Aug 31, 8:25 am, [EMAIL PROTECTED] wrote: > On Aug 31, 9:52 am, sberry <[EMAIL PROTECTED]> wrote: > > > > > I am a Flash developer (also a Python dev) and I use an editor called > > SEPY Actionscript Editor. The latest release version does not support > > Flash CS3, so I downloaded the source f

Looking for Delaunay triangulation module...

2007-08-31 Thread Grant Edwards
Can anybody point me to a Delaunay triangulation module (for Win32)? I'm currently using http://flub.stuffwillmade.org/delny/ under Linux, but I have been unable to find a build for Windows. I don't have the tools (or skills) to build libqhull and Pythion extensions on Win32). I've also found th

So what exactly is a complex number?

2007-08-31 Thread Lamonte Harris
Like in math where you put letters that represent numbers for place holders to try to find the answer type complex numbers? -- http://mail.python.org/mailman/listinfo/python-list

JavaScript

2007-08-31 Thread zowtar
Guys, anybody know if is possible "to press" a button linked a javascript function using python? My Firefox send something like that: POST /msgs.aspx TOKEN=B8B83BGDBC191B9FE0A0BE1393294FAB&sig=gpaiOqbp0Nr %2BoecRLF4FGGDOAao %3D&toUserId=1331299&rawAddedDate=118854&fromUserId=23029&Action.delet

Re: Fatal Python error using ctypes & python exceptions

2007-08-31 Thread Thomas Heller
mmacrobert schrieb: > Hi Everyone, > I've created a 'C' dll that is accessed via ctypes library containing > a bunch of functions. I've successfully been able to use the > functions. However, I would like to throw python exceptions from some > of them. > > I throw them using: ::PyErr_SetString(::P

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

2007-08-31 Thread Alex Martelli
Paul Rubin wrote: ... > Hi Alex, I'm a little confused: does Production Systems mean stuff > like the Google search engine, which (as you described further up in > your message) achieves its reliability at least partly by massive > redundancy and failover when somethin

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

2007-08-31 Thread Alex Martelli
Michele Simionato <[EMAIL PROTECTED]> wrote: ... > I would not call that an attack. If you want to see an attack, wait > for > Alex replying to you observations about the low quality of code at > Google! ;) I'm not going to deny that Google Groups has glitches, particularly in its user interfac

Re: list index()

2007-08-31 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > Why wouldn't "the one obvious way" be: > > def inAnotB(A, B): > inA = set(os.listdir(A)) > inBs = set(os.listdir(B)) > return inA.difference(inBs) If you want a set as the result, that's one possibility (although possibly a bi

Re: So what exactly is a complex number?

2007-08-31 Thread Carsten Haese
On Thu, 2007-08-30 at 20:11 -0500, Lamonte Harris wrote: > Like in math where you put letters that represent numbers for place > holders to try to find the answer type complex numbers? Is English your native language? I'm having a hard time decoding your question. -- Carsten Haese http://informi

Complex Numbers

2007-08-31 Thread Greg Lindstrom
> -- Forwarded message -- > From: "Lamonte Harris" <[EMAIL PROTECTED]> > To: python-list@python.org > Date: Thu, 30 Aug 2007 20:11:14 -0500 > Subject: So what exactly is a complex number? > Like in math where you put letters that represent numbers for place > holders to try to find

Re: strings (dollar.cents) into floats

2007-08-31 Thread Steve Holden
sturlamolden wrote: > On 31 Aug, 02:12, Wildemar Wildenburger > <[EMAIL PROTECTED]> wrote: > >> I've heard (ok, read) that several times now and I understand the >> argument. But what use is there for floats, then? When is it OK to use them? > > There are fractions that can be exactly represented

Re: So what exactly is a complex number?

2007-08-31 Thread Chris Mellon
On 8/31/07, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Thu, 2007-08-30 at 20:11 -0500, Lamonte Harris wrote: > > Like in math where you put letters that represent numbers for place > > holders to try to find the answer type complex numbers? > > Is English your native language? I'm having a hard

Re: Setting a read-only attribute

2007-08-31 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Aug 31, 6:14 pm, Alexandre Badez <[EMAIL PROTECTED]> wrote: >> On Aug 30, 11:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> >> wrote: >> >>> I have an object and wish to set an attribute on it which, >>> unfortunately for me, is read-only. >>> How can I go about this?

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

2007-08-31 Thread Steve Holden
Russ wrote: >> I've always wondered... Are the compilers (or interpreters), which take >> these programs to machine code, also formally proven correct? > > No, they are not formally proven correct (too complicated for that), > but I believe they are certified to a higher level than your "typical"

Re: strings (dollar.cents) into floats

2007-08-31 Thread Chris Mellon
On 8/31/07, Steve Holden <[EMAIL PROTECTED]> wrote: > sturlamolden wrote: > > On 31 Aug, 02:12, Wildemar Wildenburger > > <[EMAIL PROTECTED]> wrote: > > > >> I've heard (ok, read) that several times now and I understand the > >> argument. But what use is there for floats, then? When is it OK to use

Re: escaping only double quotes

2007-08-31 Thread iapain
> string = "Butler's 15\" TV" > s = """my string goes here "%s" """ % string Couldn't find anything wrong in string = "Butler's 15\" TV" s = "my string goes here %s" % string -- http://mail.python.org/mailman/listinfo/python-list

Re: escaping only double quotes

2007-08-31 Thread iapain
You could write a simple escape function. def escape(html): "Return the given TEXT with ampersands, quotes and carets encoded." return html.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace("'", ''') -- http://mail.python.org/mailman/listinfo/python-list

Re: JavaScript

2007-08-31 Thread iapain
>python has modules for forms and other things... and for it? Check out httplib and urlib2, it might be useful for you. -- http://mail.python.org/mailman/listinfo/python-list

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

2007-08-31 Thread gsxg
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 kbhit() and getch() many times in C, bu

platform system may be Windows or Microsoft since Vista

2007-08-31 Thread p . lavarre
Let's suppose you get Python for Vista Windows today from http://www.python.org/download/. Should you then conclude that the tests: if platform.system() in ('Windows', 'Microsoft'): if not (platform.system() in ('Windows', 'Microsoft')): are now exactly what you should write for that 2.5.1 Pytho

Re: list index()

2007-08-31 Thread MRAB
On Aug 31, 11:05 am, Jon Ribbens <[EMAIL PROTECTED]> wrote: > On 2007-08-31, Erik Max Francis <[EMAIL PROTECTED]> 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 > >

Re: So what exactly is a complex number?

2007-08-31 Thread iapain
> > On Thu, 2007-08-30 at 20:11 -0500, Lamonte Harris wrote: > > > Like in math where you put letters that represent numbers for place > > > holders to try to find the answer type complex numbers? You shouldnt worry about it in python, its pretty large to handle all your calc. -- http://mail.pyt

Re: So what exactly is a complex number?

2007-08-31 Thread Matt McCredie
> So what exactly is a complex number? It is a math construct, and has almost nothing to do with Python, other than the fact that Python has a data type for them. So, here is a list of better ways to get information about complex numbers than asking python-list: 1. Google it: http://www.google.co

Re: strings (dollar.cents) into floats

2007-08-31 Thread MRAB
On Aug 31, 5:28 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 8/31/07, Steve Holden <[EMAIL PROTECTED]> wrote: > > > sturlamolden wrote: > > > On 31 Aug, 02:12, Wildemar Wildenburger > > > <[EMAIL PROTECTED]> wrote: > > > >> I've heard (ok, read) that several times now and I understand the > >

Re: Biased random?

2007-08-31 Thread Ivan Voras
Mark Dickinson wrote: > That's because the call to abs() usually collapses two values to one > (e.g. -2 and 2 both end up being 2), > but there's only one integer n for which abs(n) == 0. Ah. Need to sleep more. signature.asc Description: OpenPGP digital signature -- http://mail.python.org/ma

Re: strings (dollar.cents) into floats

2007-08-31 Thread David H Wild
In article <[EMAIL PROTECTED]>, Chris Mellon <[EMAIL PROTECTED]> wrote: > I believe that to the degree that "real" accounting was done in those > currencies it did in fact use non-decimal bases. Just as people don't > use decimal time values (except us crazy computer folk), you're write > 1 poun

Re: So what exactly is a complex number?

2007-08-31 Thread Lamonte Harris
>Is English your native language? I'm having a hard time decoding your question. dont be an ass About the complex numbers I get what they are in python now. Thanks Paul Boddie -Lamonte. On 8/31/07, Paul Boddie <[EMAIL PROTECTED]> wrote: > > On 31 Aug, 18:12, "Chris Mellon" <[EMAIL PROTECTED]

low level ethernet device access in linux

2007-08-31 Thread Tom Brown
Hi, I have a windows application, written in delphi, that communicates to our devices using raw ethernet frames. I am trying to port this application to linux using python. However, when I try to open a socket, I get this error: File "/home/tbrown/projects/discovery/trunk/comm.py", line 9, in

Python 3000 released as 3.0a1

2007-08-31 Thread Guido van Rossum
[Bcc: [EMAIL PROTECTED] The first Python 3000 release is out -- Python 3.0a1. Be the first one on your block to download it! http://python.org/download/releases/3.0/ Excerpts: Python 3000 (a.k.a. "Py3k", and released as Python 3.0) is a new version of the language that is incompatible with t

  1   2   3   >